com.thoughtworks.qdox.model
Class JavaMethod

java.lang.Object
  extended by com.thoughtworks.qdox.model.AbstractBaseJavaEntity
      extended by com.thoughtworks.qdox.model.AbstractJavaEntity
          extended by com.thoughtworks.qdox.model.AbstractInheritableJavaEntity
              extended by com.thoughtworks.qdox.model.JavaMethod
All Implemented Interfaces:
Member, Serializable, Comparable

public class JavaMethod
extends AbstractInheritableJavaEntity
implements Member

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity
modifiers
 
Fields inherited from class com.thoughtworks.qdox.model.AbstractBaseJavaEntity
name, parent
 
Constructor Summary
JavaMethod()
           
JavaMethod(String name)
           
JavaMethod(Type returns, String name)
           
 
Method Summary
 void addParameter(JavaParameter javaParameter)
           
 int compareTo(Object o)
           
 boolean equals(Object obj)
           
 String getCallSignature()
           
 String getDeclarationSignature(boolean withModifiers)
           
 Type[] getExceptions()
           
 JavaParameter getParameterByName(String name)
           
 JavaParameter[] getParameters()
           
 String getPropertyName()
           
 Type getPropertyType()
           
 Type getReturns()
           
 String getSourceCode()
          Get the original source code of the body of this method.
 DocletTag[] getTagsByName(String name, boolean inherited)
           
 TypeVariable[] getTypeParameters()
           
 int hashCode()
           
 boolean isConstructor()
           
 boolean isPropertyAccessor()
           
 boolean isPropertyMutator()
           
 boolean isPublic()
           
 void setConstructor(boolean constructor)
           
 void setExceptions(Type[] exceptions)
           
 void setReturns(Type returns)
           
 void setSourceCode(String sourceCode)
           
 void setTypeParameters(TypeVariable[] typeParameters)
           
 boolean signatureMatches(String name, Type[] parameterTypes)
           
 String toString()
           
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
 
Methods inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity
getCodeBlock, getComment, getModifiers, getNamedParameter, getParentClass, getSource, getTagByName, getTags, getTagsByName, isAbstract, isFinal, isNative, isPrivate, isProtected, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, setComment, setModifiers, setParentClass, setTags, write, writeAccessibilityModifier, writeAllModifiers, writeNonAccessibilityModifiers
 
Methods inherited from class com.thoughtworks.qdox.model.AbstractBaseJavaEntity
getAnnotations, getLineNumber, getName, getParent, setAnnotations, setLineNumber, setName, setParent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaMethod

public JavaMethod()

JavaMethod

public JavaMethod(String name)

JavaMethod

public JavaMethod(Type returns,
                  String name)
Method Detail

getReturns

public Type getReturns()

getParameters

public JavaParameter[] getParameters()

getParameterByName

public JavaParameter getParameterByName(String name)

getExceptions

public Type[] getExceptions()

isConstructor

public boolean isConstructor()

writeBody

protected void writeBody(IndentBuffer result)
Specified by:
writeBody in class AbstractJavaEntity

writeBody

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

getDeclarationSignature

public String getDeclarationSignature(boolean withModifiers)
Specified by:
getDeclarationSignature in interface Member
Since:
1.3

getCallSignature

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

setReturns

public void setReturns(Type returns)

addParameter

public void addParameter(JavaParameter javaParameter)

setExceptions

public void setExceptions(Type[] exceptions)

setConstructor

public void setConstructor(boolean constructor)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

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.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isPublic

public boolean isPublic()
Overrides:
isPublic in class AbstractJavaEntity

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

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

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

getTagsByName

public DocletTag[] getTagsByName(String name,
                                 boolean inherited)
Specified by:
getTagsByName in class AbstractInheritableJavaEntity

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

getSourceCode

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

Returns:
Code as string.

setSourceCode

public void setSourceCode(String sourceCode)

setTypeParameters

public void setTypeParameters(TypeVariable[] typeParameters)

getTypeParameters

public TypeVariable[] getTypeParameters()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2011. All Rights Reserved.