dynclass
Class ClassDefinition
java.lang.Object
|
+--dynclass.ClassDefinition
- public class ClassDefinition
- extends Object
This class provides sufficient information for generating a java
Class.
ClassDefinition
public ClassDefinition(Class[] interfaces)
- Create a ClassDefinition with the given
interfaces. Implementations of
interface methods and abstract methods will be created implicitly.
- Parameters:
interfaces
- the interfaces to implement in the generated
class. null and 0-length arrays are equivalent.
ClassDefinition
public ClassDefinition(Class superclass,
Class[] interfaces)
- Create a ClassDefinition with the given superclass and
interfaces. Implementations of
interface methods and abstract methods will be created implicitly.
- Parameters:
interfaces
- the interfaces to implement in the generated
class. null and 0-length arrays are equivalent.
ClassDefinition
public ClassDefinition(Class superclass,
Class[] interfaces,
MethodDefinition[] methods)
- Create a ClassDefinition with the given superclass,
interfaces and methods to implement or override. Note that
implementations of
interface methods and abstract methods will be created implicitly,
so the only methods that need to be explicity specified are
non-abstract methods that you wish to override.
- Parameters:
interfaces
- the interfaces to implement in the generated
class. null and 0-length arrays are equivalent.methods
- the list of methods to override. In addition to
methods specified in this list, abstract methods will be implemented
in the generated class.
null and 0-length arrays are equivalent.
getSuperclass
public Class getSuperclass()
- Return the superclass of the defined class.
getInterfaces
public Class[] getInterfaces()
- Return the interfaces implemented by the defined class.
getMethodDefinitions
public List getMethodDefinitions()
- Return the methods of the defined class.
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object other)
- Overrides:
equals
in class Object