Package com.sun.ejb.codegen
Class Generator
- java.lang.Object
-
- com.sun.ejb.codegen.Generator
-
- All Implemented Interfaces:
ClassGeneratorFactory
- Direct Known Subclasses:
GenericHomeGenerator,Remote30WrapperGenerator,RemoteGenerator,ServiceInterfaceGenerator
public abstract class Generator extends Object implements ClassGeneratorFactory
The base class for all code generators.
-
-
Constructor Summary
Constructors Constructor Description Generator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringgetBaseName(String fullClassName)static StringgetPackageName(String fullClassName)protected Method[]removeRedundantMethods(Method[] methods)Remove duplicates from method array.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sun.ejb.codegen.ClassGeneratorFactory
evaluate, getAnchorClass, getGeneratedClassName
-
-
-
-
Method Detail
-
getPackageName
public static String getPackageName(String fullClassName)
- Returns:
- the package name or null.
-
getBaseName
public static String getBaseName(String fullClassName)
- Returns:
- simple class name (including wrapper class and dollar sign if it is internal class)
-
removeRedundantMethods
protected Method[] removeRedundantMethods(Method[] methods)
Remove duplicates from method array.Duplicates will arise if a class/intf and super-class/intf define methods with the same signature. Potentially the throws clauses of the methods may be different (note Java requires that the superclass/intf method have a superset of the exceptions in the derived method).
- Parameters:
methods-- Returns:
- methods which can be generated in an interface
-
-