com.thoughtworks.qdox.model

Class JavaMethod

public class JavaMethod extends AbstractInheritableJavaEntity implements Member

Field Summary
booleanconstructor
Type[]exceptions
JavaParameter[]parameters
Typereturns
StringsourceCode
Constructor Summary
JavaMethod()
JavaMethod(String name)
JavaMethod(Type returns, String name)
Method Summary
intcompareTo(Object o)
booleanequals(Object obj)
StringgetCallSignature()
StringgetDeclarationSignature(boolean withModifiers)
Type[]getExceptions()
JavaParametergetParameterByName(String name)
JavaParameter[]getParameters()
JavaClassgetParentClass()
StringgetPropertyName()
TypegetPropertyType()
TypegetReturns()
StringgetSignature(boolean withModifiers, boolean isDeclaration)
StringgetSourceCode()
Get the original source code of the body of this method.
DocletTag[]getTagsByName(String name, boolean inherited)
inthashCode()
booleanisConstructor()
booleanisPropertyAccessor()
booleanisPropertyMutator()
booleanisPublic()
voidsetConstructor(boolean constructor)
voidsetExceptions(Type[] exceptions)
voidsetParameters(JavaParameter[] parameters)
voidsetParentClass(JavaClass parentClass)
voidsetReturns(Type returns)
voidsetSourceCode(String sourceCode)
booleansignatureMatches(String name, Type[] parameterTypes)
protected voidwriteBody(IndentBuffer result)
protected voidwriteBody(IndentBuffer result, boolean withModifiers, boolean isDeclaration, boolean isPrettyPrint)

Field Detail

constructor

private boolean constructor

exceptions

private Type[] exceptions

parameters

private JavaParameter[] parameters

returns

private Type returns

sourceCode

private String sourceCode

Constructor Detail

JavaMethod

public JavaMethod()

JavaMethod

public JavaMethod(String name)

JavaMethod

public JavaMethod(Type returns, String name)

Method Detail

compareTo

public int compareTo(Object o)

equals

public boolean equals(Object obj)

getCallSignature

public String getCallSignature()

Since: 1.3

getDeclarationSignature

public String getDeclarationSignature(boolean withModifiers)

Since: 1.3

getExceptions

public Type[] getExceptions()

getParameterByName

public JavaParameter getParameterByName(String name)

getParameters

public JavaParameter[] getParameters()

getParentClass

public JavaClass getParentClass()

getPropertyName

public String getPropertyName()

Returns: the name of the property this method represents, or null if this method is not a property mutator or property accessor.

Since: 1.3

getPropertyType

public Type getPropertyType()

Returns: the type of the property this method represents, or null if this method is not a property mutator or property accessor.

Since: 1.3

getReturns

public Type getReturns()

getSignature

private String getSignature(boolean withModifiers, boolean isDeclaration)

Since: 1.3

getSourceCode

public String getSourceCode()
Get the original source code of the body of this method.

Returns: Code as string.

getTagsByName

public DocletTag[] getTagsByName(String name, boolean inherited)

hashCode

public int hashCode()

isConstructor

public boolean isConstructor()

isPropertyAccessor

public boolean isPropertyAccessor()

Returns: true if this method is a Java Bean accessor

Since: 1.3

isPropertyMutator

public boolean isPropertyMutator()

Returns: true if this method is a Java Bean accessor

Since: 1.3

isPublic

public boolean isPublic()

setConstructor

public void setConstructor(boolean constructor)

setExceptions

public void setExceptions(Type[] exceptions)

setParameters

public void setParameters(JavaParameter[] parameters)

setParentClass

public void setParentClass(JavaClass parentClass)

setReturns

public void setReturns(Type returns)

setSourceCode

public void setSourceCode(String sourceCode)

signatureMatches

public boolean signatureMatches(String name, Type[] parameterTypes)

Parameters: name method name parameterTypes parameter types or null if there are no parameters.

Returns: true if the signature and parameters match.

writeBody

protected void writeBody(IndentBuffer result)

writeBody

protected void writeBody(IndentBuffer result, boolean withModifiers, boolean isDeclaration, boolean isPrettyPrint)

Since: 1.3