1bc101806249eb883f89c4a770a8c27f9ac315837Raphael/*
2bc101806249eb883f89c4a770a8c27f9ac315837Raphael * Copyright (C) 2010 The Android Open Source Project
3bc101806249eb883f89c4a770a8c27f9ac315837Raphael *
4bc101806249eb883f89c4a770a8c27f9ac315837Raphael * Licensed under the Apache License, Version 2.0 (the "License");
5bc101806249eb883f89c4a770a8c27f9ac315837Raphael * you may not use this file except in compliance with the License.
6bc101806249eb883f89c4a770a8c27f9ac315837Raphael * You may obtain a copy of the License at
7bc101806249eb883f89c4a770a8c27f9ac315837Raphael *
8bc101806249eb883f89c4a770a8c27f9ac315837Raphael *      http://www.apache.org/licenses/LICENSE-2.0
9bc101806249eb883f89c4a770a8c27f9ac315837Raphael *
10bc101806249eb883f89c4a770a8c27f9ac315837Raphael * Unless required by applicable law or agreed to in writing, software
11bc101806249eb883f89c4a770a8c27f9ac315837Raphael * distributed under the License is distributed on an "AS IS" BASIS,
12bc101806249eb883f89c4a770a8c27f9ac315837Raphael * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13bc101806249eb883f89c4a770a8c27f9ac315837Raphael * See the License for the specific language governing permissions and
14bc101806249eb883f89c4a770a8c27f9ac315837Raphael * limitations under the License.
15bc101806249eb883f89c4a770a8c27f9ac315837Raphael */
16bc101806249eb883f89c4a770a8c27f9ac315837Raphael
17bc101806249eb883f89c4a770a8c27f9ac315837Raphaelpackage com.android.tools.layoutlib.create;
18bc101806249eb883f89c4a770a8c27f9ac315837Raphael
19bc101806249eb883f89c4a770a8c27f9ac315837Raphael/**
20bc101806249eb883f89c4a770a8c27f9ac315837Raphael * Interface describing the work to be done by {@link AsmGenerator}.
21bc101806249eb883f89c4a770a8c27f9ac315837Raphael */
22bc101806249eb883f89c4a770a8c27f9ac315837Raphaelpublic interface ICreateInfo {
23bc101806249eb883f89c4a770a8c27f9ac315837Raphael
24bc101806249eb883f89c4a770a8c27f9ac315837Raphael    /**
25bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * Returns the list of class from layoutlib_create to inject in layoutlib.
26bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * The list can be empty but must not be null.
27bc101806249eb883f89c4a770a8c27f9ac315837Raphael     */
28bc101806249eb883f89c4a770a8c27f9ac315837Raphael    public abstract Class<?>[] getInjectedClasses();
29bc101806249eb883f89c4a770a8c27f9ac315837Raphael
30bc101806249eb883f89c4a770a8c27f9ac315837Raphael    /**
31bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * Returns the list of methods to rewrite as delegates.
32bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * The list can be empty but must not be null.
33bc101806249eb883f89c4a770a8c27f9ac315837Raphael     */
34bc101806249eb883f89c4a770a8c27f9ac315837Raphael    public abstract String[] getDelegateMethods();
35bc101806249eb883f89c4a770a8c27f9ac315837Raphael
36bc101806249eb883f89c4a770a8c27f9ac315837Raphael    /**
37bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * Returns the list of classes on which to delegate all native methods.
38bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * The list can be empty but must not be null.
39bc101806249eb883f89c4a770a8c27f9ac315837Raphael     */
40bc101806249eb883f89c4a770a8c27f9ac315837Raphael    public abstract String[] getDelegateClassNatives();
41bc101806249eb883f89c4a770a8c27f9ac315837Raphael
42bc101806249eb883f89c4a770a8c27f9ac315837Raphael    /**
43bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * Returns The list of methods to stub out. Each entry must be in the form
44bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * "package.package.OuterClass$InnerClass#MethodName".
45bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * The list can be empty but must not be null.
46bc101806249eb883f89c4a770a8c27f9ac315837Raphael     */
47bc101806249eb883f89c4a770a8c27f9ac315837Raphael    public abstract String[] getOverriddenMethods();
48bc101806249eb883f89c4a770a8c27f9ac315837Raphael
49bc101806249eb883f89c4a770a8c27f9ac315837Raphael    /**
50bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * Returns the list of classes to rename, must be an even list: the binary FQCN
51bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * of class to replace followed by the new FQCN.
52bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * The list can be empty but must not be null.
53bc101806249eb883f89c4a770a8c27f9ac315837Raphael     */
54bc101806249eb883f89c4a770a8c27f9ac315837Raphael    public abstract String[] getRenamedClasses();
55bc101806249eb883f89c4a770a8c27f9ac315837Raphael
56bc101806249eb883f89c4a770a8c27f9ac315837Raphael    /**
57bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * Returns the list of classes for which the methods returning them should be deleted.
58bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * The array contains a list of null terminated section starting with the name of the class
59bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * to rename in which the methods are deleted, followed by a list of return types identifying
60bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * the methods to delete.
61bc101806249eb883f89c4a770a8c27f9ac315837Raphael     * The list can be empty but must not be null.
62bc101806249eb883f89c4a770a8c27f9ac315837Raphael     */
63bc101806249eb883f89c4a770a8c27f9ac315837Raphael    public abstract String[] getDeleteReturns();
64bc101806249eb883f89c4a770a8c27f9ac315837Raphael
651cf5df38f4bdafa1beb2674ca548ad6d9650766bDeepanshu Gupta    /**
661cf5df38f4bdafa1beb2674ca548ad6d9650766bDeepanshu Gupta     * Returns the list of classes to refactor, must be an even list: the
671cf5df38f4bdafa1beb2674ca548ad6d9650766bDeepanshu Gupta     * binary FQCN of class to replace followed by the new FQCN. All references
681cf5df38f4bdafa1beb2674ca548ad6d9650766bDeepanshu Gupta     * to the old class should be updated to the new class.
691cf5df38f4bdafa1beb2674ca548ad6d9650766bDeepanshu Gupta     * The list can be empty but must not be null.
701cf5df38f4bdafa1beb2674ca548ad6d9650766bDeepanshu Gupta     */
711cf5df38f4bdafa1beb2674ca548ad6d9650766bDeepanshu Gupta    public abstract String[] getJavaPkgClasses();
72bc101806249eb883f89c4a770a8c27f9ac315837Raphael}
73