com.thoughtworks.qdox.model

Class JavaMethod

public class JavaMethod extends AbstractInheritableJavaEntity implements Member

Field Summary
booleanconstructor
Type[]exceptions
JavaParameter[]parameters
protected Typereturns
Constructor Summary
JavaMethod(JavaClass parent, int lineNumber)
JavaMethod(JavaClass parent)
JavaMethod()
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)
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)
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

protected Type returns

Constructor Detail

JavaMethod

public JavaMethod(JavaClass parent, int lineNumber)

JavaMethod

public JavaMethod(JavaClass parent)

JavaMethod

public JavaMethod()

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

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)

Deprecated: Don't call this - the parent is set in the constructor.

setReturns

public void setReturns(Type returns)

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