|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.javasource.JAnnotatedElementHelper
org.exolab.javasource.JConstructor
public final class JConstructor
A class for handling source code for a constructor of a JClass.
Constructor Summary | |
---|---|
protected |
JConstructor(AbstractJClass declaringClass)
Creates a new JConstructor for the provided declaring class. |
Method Summary | |
---|---|
void |
addException(JClass exp)
Adds the given Exception to this JConstructor's throws clause. |
void |
addParameter(JParameter parameter)
Adds the given parameter to this JConstructor's list of parameters. |
AbstractJClass |
getDeclaringClass()
Returns the class in which this JConstructor has been declared. |
JClass[] |
getExceptions()
Returns the exceptions that this JConstructor lists in its throws clause. |
JModifiers |
getModifiers()
Returns the modifiers for this JConstructor. |
int |
getParameterCount()
Returns the amount of parameters. |
JParameter[] |
getParameters()
Returns an array of JParameters consisting of the parameters of this JConstructor in declared order. |
JSourceCode |
getSourceCode()
Returns the source code for this JConstructor. |
void |
print(JSourceWriter jsw)
Prints this JConstructor to the provided JSourceWriter. |
void |
setModifiers(JModifiers modifiers)
Sets the modifiers on this JConstructor. |
void |
setSourceCode(JSourceCode sourceCode)
Sets the source code for this constructor. |
void |
setSourceCode(java.lang.String sourceCode)
Sets the source code for this constructor. |
java.lang.String |
toString()
|
Methods inherited from class org.exolab.javasource.JAnnotatedElementHelper |
---|
addAnnotation, getAnnotation, getAnnotations, hasAnnotations, isAnnotationPresent, printAnnotations, removeAnnotation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected JConstructor(AbstractJClass declaringClass)
declaringClass
- The class this constructor creates.Method Detail |
---|
public JClass[] getExceptions()
public void addException(JClass exp)
exp
- The JClass representing the Exception.public JParameter[] getParameters()
public int getParameterCount()
public void addParameter(JParameter parameter)
parameter
- The parameter to add to the this JConstructor's list of
parameters.public AbstractJClass getDeclaringClass()
public JModifiers getModifiers()
public void setModifiers(JModifiers modifiers)
modifiers
- Modifiers to set on this constructor.public JSourceCode getSourceCode()
public void setSourceCode(java.lang.String sourceCode)
sourceCode
- Source code to apply to this constructor.public void setSourceCode(JSourceCode sourceCode)
sourceCode
- Source code to apply to this constructor.public void print(JSourceWriter jsw)
jsw
- The JSourceWriter to print the constructor to.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |