com.thoughtworks.qdox.model

Class JavaMethod

Implemented Interfaces:
Comparable, Member, Serializable

public class JavaMethod
extends AbstractInheritableJavaEntity
implements Member

Field Summary

private boolean
constructor
private Type[]
exceptions
private JavaParameter[]
parameters
protected Type
returns

Fields inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity

comment, lineNumber, modifiers, name, parent, tags

Constructor Summary

JavaMethod()
JavaMethod(JavaClass parent)
JavaMethod(JavaClass parent, int lineNumber)

Method Summary

int
compareTo(Object o)
boolean
equals(Object obj)
String
getCallSignature()
String
getDeclarationSignature(boolean withModifiers)
Type[]
getExceptions()
JavaParameter
getParameterByName(String name)
JavaParameter[]
getParameters()
JavaClass
getParentClass()
String
getPropertyName()
Type
getPropertyType()
Type
getReturns()
private String
getSignature(boolean withModifiers, boolean isDeclaration)
DocletTag[]
getTagsByName(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)
Deprecated. Don't call this - the parent is set in the constructor.
void
setReturns(Type returns)
boolean
signatureMatches(String name, Type[] parameterTypes)
protected void
writeBody(IndentBuffer result)
protected void
writeBody(IndentBuffer result, boolean withModifiers, boolean isDeclaration, boolean isPrettyPrint)

Methods inherited from class com.thoughtworks.qdox.model.AbstractInheritableJavaEntity

getTagByName, getTagsByName

Methods inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity

commentHeader, getComment, getLineNumber, getModifiers, getName, getNamedParameter, getParent, getSource, getTagByName, getTags, getTagsByName, isAbstract, isFinal, isModifierPresent, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, setComment, setModifiers, setName, setTags, toString, write, writeAccessibilityModifier, writeAllModifiers, writeBody, writeNonAccessibilityModifiers

Field Details

constructor

private boolean constructor

exceptions

private Type[] exceptions

parameters

private JavaParameter[] parameters

returns

protected Type returns

Constructor Details

JavaMethod

public JavaMethod()

JavaMethod

public JavaMethod(JavaClass parent)

JavaMethod

public JavaMethod(JavaClass parent,
                  int lineNumber)

Method Details

compareTo

public int compareTo(Object o)

equals

public boolean equals(Object obj)

getCallSignature

public String getCallSignature()
Specified by:
getCallSignature in interface Member
Since:
1.3

getDeclarationSignature

public String getDeclarationSignature(boolean withModifiers)
Specified by:
getDeclarationSignature in interface Member
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)
Overrides:
getTagsByName in interface AbstractInheritableJavaEntity

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()
Overrides:
isPublic in interface AbstractJavaEntity

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)
Overrides:
writeBody in interface AbstractJavaEntity

writeBody

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