public final class JConstructor extends JAnnotatedElementHelper
| Modifier | Constructor and Description |
|---|---|
protected |
JConstructor(JClass declaringClass)
Creates a new JConstructor for the provided declaring class.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
JClass |
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.
|
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()
Return the string representation of this constructor.
|
addAnnotation, getAnnotation, getAnnotations, hasAnnotations, isAnnotationPresent, main, printAnnotations, removeAnnotationprotected JConstructor(JClass declaringClass)
declaringClass - the class this constructor createspublic void addException(JClass exp)
exp - the JClass representing the Exceptionpublic JClass[] getExceptions()
public void addParameter(JParameter parameter)
parameter - the parameter to add to the this JConstructor's list of
parameters.public JClass getDeclaringClass()
public JModifiers getModifiers()
public JParameter[] getParameters()
public JSourceCode getSourceCode()
public void print(JSourceWriter jsw)
jsw - the JSourceWriter to print the constructor topublic void setModifiers(JModifiers modifiers)
modifiers - modifiers to set on this constructorpublic void setSourceCode(java.lang.String sourceCode)
sourceCode - source code to apply to this constructorpublic void setSourceCode(JSourceCode sourceCode)
sourceCode - source code to apply to this constructorpublic java.lang.String toString()
toString in class java.lang.Object{@inheritDoc}Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com