01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: * $Header:$
18: */
19: package org.apache.beehive.controls.runtime.generator;
20:
21: import java.io.IOException;
22: import java.util.List;
23:
24: import com.sun.mirror.apt.Filer;
25:
26: /**
27: * The GenClass abstract class defines a base set of methods that are generally available
28: * for template usage on class-type objects
29: * <p>
30: * This is done with an abstract class (instead of an interface) so derived abstract classes
31: * can be subclassed from it w/out requiring all of the methods to be declared there.
32: */
33: abstract public class GenClass {
34: /**
35: * Returns the fully qualified classname associated with the GenClass
36: */
37: abstract public String getClassName();
38:
39: /**
40: * Returns the base package name associated with the GenClass
41: */
42: abstract public String getPackage();
43:
44: /**
45: * Returns the unqualified class name associated with the GenClass
46: */
47: abstract public String getShortName();
48:
49: /**
50: * Returns the super class for this class
51: */
52: abstract public GenClass getSuperClass();
53:
54: /**
55: * Returns true if the GenClass extends another class
56: */
57: public boolean hasSuperClass() {
58: return getSuperClass() != null;
59: }
60:
61: /**
62: * Returns the list of fully qualified class names for types that are derived
63: * from this GenClass
64: */
65: public String[] getGeneratedTypes() {
66: return null;
67: }
68:
69: /**
70: * Returns the list of generated files derived from this GenClass during the
71: * check phase of annotation processing.
72: */
73: public List<GeneratorOutput> getCheckOutput(Filer filer)
74: throws IOException {
75: return null;
76: }
77:
78: /**
79: * Returns the list of generated files derived from this GenClass during the
80: * generate phase of annotation processing.
81: */
82: public List<GeneratorOutput> getGenerateOutput(Filer filer)
83: throws IOException {
84: return null;
85: }
86: }
|