|
||||||||
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 class JConstructor
A class for handling source code for a constructor of a JClass
Constructor Summary | |
---|---|
protected |
JConstructor(JClass declaringClass)
Creates a new method with the given name and returnType. |
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 Methods list of parameters |
JClass |
getDeclaringClass()
Returns the class in which this JMember has been declared |
JClass[] |
getExceptions()
Returns the exceptions that this JConstructor lists in it's throws clause. |
JModifiers |
getModifiers()
Returns the modifiers for this JConstructor |
JParameter[] |
getParameters()
Returns an array of JParameters consisting of the parameters of this Method in declared order |
JSourceCode |
getSourceCode()
|
void |
print(JSourceWriter jsw)
|
void |
setModifiers(JModifiers modifiers)
|
void |
setSourceCode(JSourceCode sourceCode)
|
void |
setSourceCode(java.lang.String sourceCode)
|
java.lang.String |
toString()
|
Methods inherited from class org.exolab.javasource.JAnnotatedElementHelper |
---|
addAnnotation, getAnnotation, getAnnotations, hasAnnotations, isAnnotationPresent, main, printAnnotations, removeAnnotation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected JConstructor(JClass declaringClass)
Method Detail |
---|
public void addException(JClass exp)
exp
- the JClass representing the Exceptionpublic JClass[] getExceptions()
public void addParameter(JParameter parameter) throws java.lang.IllegalArgumentException
parameter
- the parameter to add to the this Methods
list of parameters.
java.lang.IllegalArgumentException
- when a parameter already
exists for this Method with the same name as the new parameterpublic JClass getDeclaringClass()
public JModifiers getModifiers()
public JParameter[] getParameters()
public JSourceCode getSourceCode()
public void print(JSourceWriter jsw)
public void setModifiers(JModifiers modifiers)
public void setSourceCode(java.lang.String sourceCode)
public void setSourceCode(JSourceCode sourceCode)
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 |