org.apache.xml.utils.synthetic.reflection
Class EntryPoint
java.lang.Object
org.apache.xml.utils.synthetic.reflection.EntryPoint
- Member
public abstract class EntryPoint
extends java.lang.Object
API/behaviors shared between Constructors and Methods.
They're mostly similar, except for what they proxy and
a few specific calls (name, invoke/getInstance).
void | addExceptionType(Class exception) - Method addExceptionType
|
void | addParameter(Class type, String name) - Method addParameter
|
boolean | equals(Object obj) - Compares this against the specified
object.
|
StringBuffer | getBody() - Extension: For synthesis, we need a place to hang a
method body.
|
Class | getDeclaringClass() - Returns the Class object representing the class that
declares the constructor represented by this
Constructor object.
|
Class[] | getExceptionTypes() - Returns an array of Class objects that represent the
types of the checked exceptions thrown by the
underlying constructor represented by this
Constructor object.
|
String | getLanguage() - Extension: For synthesis, we need a place to hang a
method body.
|
int | getModifiers() - Returns the Java language modifiers for the
constructor represented by this Constructor object,
as an integer.
|
java.lang.String | getName() - Member method.
|
String[] | getParameterNames() - Method getParameterNames
(getParameterNames) @return
|
Class[] | getParameterTypes() - Returns an array of Class objects that represent the
formal parameter types, in declaration order, of the
constructor represented by this Constructor object.
|
Class | getReturnType() - Returns the Class object representing the class that
will be returned by this EntryPoint.
|
abstract int | hashCode() - Returns a hashcode for this Constructor.
|
void | setBody(String language, StringBuffer body) - Extension: For synthesis, we need a place to hang a
method body.
|
void | setDeclaringClass(Class declaringClass) - Assert the Class object representing the class that
declares the constructor represented by this
Constructor object.
|
void | setModifiers(int modifiers) - Should only be accepted before a "real" entrypoint is bound.
|
void | setName(String name) - Member method.
|
String | toSource(String basetab) - Generate Java code
|
String | toString() - Return a string describing this Constructor.
|
EntryPoint
public EntryPoint(Class declaringclass)
Insert the method's description here.
Creation date: (12-27-99 2:31:39 PM)
equals
public boolean equals(Object obj)
Compares this against the specified
object. Returns true if the objects are the same.
Two EntryPoints are the same if they were
declared by the same class, have the same name
(or are both ctors) and have the same
formal parameter types.
getBody
public StringBuffer getBody()
Extension: For synthesis, we need a place to hang a
method body. Note that this returns a mutable object,
for editing etc. Slightly sloppy first cut.
getDeclaringClass
public Class getDeclaringClass()
Returns the Class object representing the class that
declares the constructor represented by this
Constructor object.
- getDeclaringClass in interface Member
getExceptionTypes
public Class[] getExceptionTypes()
Returns an array of Class objects that represent the
types of the checked exceptions thrown by the
underlying constructor represented by this
Constructor object. Returns an array of length 0 if
the constructor throws no checked exceptions.
getLanguage
public String getLanguage()
Extension: For synthesis, we need a place to hang a
method body.
getModifiers
public int getModifiers()
Returns the Java language modifiers for the
constructor represented by this Constructor object,
as an integer. The Modifier class should be used to
decode the modifiers.
- getModifiers in interface Member
getName
public java.lang.String getName()
Member method. C'tor's name is always that of the defining class.
Methods have a "real" name.
Creation date: (12-25-99 1:32:06 PM)
getParameterNames
public String[] getParameterNames()
Method getParameterNames
(getParameterNames) @return
getParameterTypes
public Class[] getParameterTypes()
Returns an array of Class objects that represent the
formal parameter types, in declaration order, of the
constructor represented by this Constructor object.
Returns an array of length 0 if the underlying
constructor takes no parameters.
getReturnType
public Class getReturnType()
Returns the Class object representing the class that
will be returned by this EntryPoint. Needed by the Method
API, but made meaningful for Constructors as well.
hashCode
public abstract int hashCode()
Returns a hashcode for this Constructor. The
hashcode is the same as the hashcode for the
underlying constructor's declaring class name,
xor'ed (for Methods) with the method name.
(Implemented in the subclasses rather than here.)
setBody
public void setBody(String language,
StringBuffer body)
throws SynthesisException
Extension: For synthesis, we need a place to hang a
method body.
setDeclaringClass
public void setDeclaringClass(Class declaringClass)
throws SynthesisException
Assert the Class object representing the class that
declares the constructor represented by this
Constructor object.
- setDeclaringClass in interface Member
setModifiers
public void setModifiers(int modifiers)
throws SynthesisException
Should only be accepted before a "real" entrypoint is bound.
Creation date: (12-25-99 1:28:28 PM)
- setModifiers in interface Member
setName
public void setName(String name)
throws SynthesisException
Member method. C'tor's name is always that of the defining class.
Methods have a "real" name.
Creation date: (12-25-99 1:32:06 PM)
toSource
public String toSource(String basetab)
Generate Java code
toString
public String toString()
Return a string describing this Constructor. The
string is formatted as the constructor access
modifiers, if any, followed by the fully-qualified
name of the declaring class, followed by a
parenthesized, comma-separated list of the
constructor's formal parameter types. For example:
public java.util.Hashtable(int,float)
The only possible modifiers for constructors are
the access modifiers public, protected or
private. Only one of these may appear, or none
if the constructor has default (package) access.
Methods will also display their checked exceptions.
Copyright B) 2004 Apache XML Project. All Rights Reserved.