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