public class JavaMethod extends AbstractInheritableJavaEntity implements Member
Modifier and Type | Field and Description |
---|---|
private boolean |
constructor |
private Type[] |
exceptions |
private JavaParameter[] |
parameters |
private Type |
returns |
private java.lang.String |
sourceCode |
modifiers, name
Constructor and Description |
---|
JavaMethod() |
JavaMethod(java.lang.String name) |
JavaMethod(Type returns,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCallSignature() |
java.lang.String |
getDeclarationSignature(boolean withModifiers) |
Type[] |
getExceptions() |
JavaParameter |
getParameterByName(java.lang.String name) |
JavaParameter[] |
getParameters() |
JavaClass |
getParentClass() |
java.lang.String |
getPropertyName() |
Type |
getPropertyType() |
Type |
getReturns() |
private java.lang.String |
getSignature(boolean withModifiers,
boolean isDeclaration) |
java.lang.String |
getSourceCode()
Get the original source code of the body of this method.
|
DocletTag[] |
getTagsByName(java.lang.String name,
boolean inherited) |
int |
hashCode() |
boolean |
isConstructor() |
boolean |
isPropertyAccessor() |
boolean |
isPropertyMutator() |
boolean |
isPublic() |
void |
setConstructor(boolean constructor) |
void |
setExceptions(Type[] exceptions) |
void |
setParameters(JavaParameter[] parameters) |
void |
setParentClass(JavaClass parentClass) |
void |
setReturns(Type returns) |
void |
setSourceCode(java.lang.String sourceCode) |
boolean |
signatureMatches(java.lang.String name,
Type[] parameterTypes) |
protected void |
writeBody(IndentBuffer result) |
protected void |
writeBody(IndentBuffer result,
boolean withModifiers,
boolean isDeclaration,
boolean isPrettyPrint) |
getTagByName
commentHeader, getComment, getLineNumber, getModifiers, getName, getNamedParameter, getParent, getSource, getTagByName, getTags, getTagsByName, isAbstract, isFinal, isNative, isPrivate, isProtected, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, setComment, setLineNumber, setModifiers, setName, setParent, setTags, toString, write, writeAccessibilityModifier, writeAllModifiers, writeNonAccessibilityModifiers
private Type returns
private JavaParameter[] parameters
private Type[] exceptions
private boolean constructor
private java.lang.String sourceCode
public JavaMethod()
public JavaMethod(java.lang.String name)
public JavaMethod(Type returns, java.lang.String name)
public Type getReturns()
public JavaParameter[] getParameters()
public JavaParameter getParameterByName(java.lang.String name)
public Type[] getExceptions()
public boolean isConstructor()
protected void writeBody(IndentBuffer result)
writeBody
in class AbstractJavaEntity
protected void writeBody(IndentBuffer result, boolean withModifiers, boolean isDeclaration, boolean isPrettyPrint)
private java.lang.String getSignature(boolean withModifiers, boolean isDeclaration)
public java.lang.String getDeclarationSignature(boolean withModifiers)
getDeclarationSignature
in interface Member
public java.lang.String getCallSignature()
getCallSignature
in interface Member
public void setReturns(Type returns)
public void setParameters(JavaParameter[] parameters)
public void setExceptions(Type[] exceptions)
public void setConstructor(boolean constructor)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean signatureMatches(java.lang.String name, Type[] parameterTypes)
name
- method nameparameterTypes
- parameter types or null if there are no parameters.public int hashCode()
hashCode
in class java.lang.Object
public JavaClass getParentClass()
public void setParentClass(JavaClass parentClass)
public boolean isPublic()
isPublic
in class AbstractJavaEntity
public boolean isPropertyAccessor()
public boolean isPropertyMutator()
public Type getPropertyType()
public java.lang.String getPropertyName()
public DocletTag[] getTagsByName(java.lang.String name, boolean inherited)
getTagsByName
in class AbstractInheritableJavaEntity
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.lang.String getSourceCode()
public void setSourceCode(java.lang.String sourceCode)