com.thoughtworks.qdox.model

Class JavaMethod

public class JavaMethod extends AbstractInheritableJavaEntity implements Member

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()
StringgetSourceCode()
Get the original source code of the body of this method.
DocletTag[]getTagsByName(String name, boolean inherited)
TypeVariable[]getTypeParameters()
inthashCode()
booleanisConstructor()
booleanisPropertyAccessor()
booleanisPropertyMutator()
booleanisPublic()
voidsetConstructor(boolean constructor)
voidsetExceptions(Type[] exceptions)
voidsetParameters(JavaParameter[] parameters)
voidsetParentClass(JavaClass parentClass)
voidsetReturns(Type returns)
voidsetSourceCode(String sourceCode)
voidsetTypeParameters(TypeVariable[] typeParameters)
booleansignatureMatches(String name, Type[] parameterTypes)
StringtoString()
protected voidwriteBody(IndentBuffer result)
protected voidwriteBody(IndentBuffer result, boolean withModifiers, boolean isDeclaration, boolean isPrettyPrint)

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()

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)

getTypeParameters

public TypeVariable[] getTypeParameters()

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)

setTypeParameters

public void setTypeParameters(TypeVariable[] typeParameters)

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.

toString

public String toString()

writeBody

protected void writeBody(IndentBuffer result)

writeBody

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

Since: 1.3