构造器概要
构造器
Create a new method without parameters
Create new method without parameters and return type
方法概要
所有方法 实例方法 具体方法
boolean
Equivalent of java.lang.reflect.Method.getReturnType()
If a class inherits this method from a generic class or interface, you can use this method to get the resolved return type
int
boolean
boolean
Returns true if this method follows the bean convention of being an accessor.
boolean
Returns true if this method follows the bean convention of being an mutator.
void
void
Define the return type of this method
void
boolean
This method is NOT varArg aware.
boolean
getCallSignature , getExceptions , getExceptionTypes , getParameterByName , getParameters , getParameterTypes , getParameterTypes , getSignature , getSourceCode , getTagsByName , isPublic , isVarArgs , setExceptions , setParameters , setSourceCode , signatureMatches
从类继承的方法 com.thoughtworks.qdox.model.impl.AbstractJavaEntity
getDeclaringClass , getModifiers , getName , isAbstract , isFinal , isNative , isPrivate , isProtected , isStatic , isStrictfp , isSynchronized , isTransient , isVolatile , setDeclaringClass , setModifiers , setName
getAnnotations , getComment , getNamedParameter , getSource , getTagByName , getTags , getTagsByName , setAnnotations , setComment , setSource , setTags
从接口继承的方法 com.thoughtworks.qdox.model.JavaMember
getModifiers , getName , isAbstract , isFinal , isNative , isPrivate , isProtected , isPublic , isStatic , isStrictfp , isSynchronized , isTransient , isVolatile
构造器详细资料
DefaultJavaMethod
public DefaultJavaMethod ()
The default constructor
DefaultJavaMethod
public DefaultJavaMethod (String name)
Create new method without parameters and return type
参数:
name - the name of the method
DefaultJavaMethod
Create a new method without parameters
参数:
returns - the return type
name - the name of this method
方法详细资料
isDefault
public boolean isDefault ()
指定者:
isDefault 在接口中 JavaMethod
返回:
true if this is a default method of an interface, otherwise false
setDefault
public void setDefault (boolean defaultMethod)
getDeclarationSignature
public String getDeclarationSignature (boolean withModifiers)
指定者:
getDeclarationSignature 在接口中 JavaMethod
参数:
withModifiers - true if modifiers should be added, otherwise false
返回:
the declaration signature
setReturns
Define the return type of this method
参数:
returns - the return type
isPropertyAccessor
public boolean isPropertyAccessor ()
Returns
true if this method follows the bean convention of being an accessor.
public String getName(); // true
public boolean isValid() // true
public String getName( String def ); // false, it has a parameter
public String gettingUp(); // false, 'get' is not followed by an uppercase character
public boolean isolate(); // false, 'is' is not followed by an uppercase character
public static String getName(); // false, it is static
指定者:
isPropertyAccessor 在接口中 JavaMethod
返回:
true if this method is a Java Bean accessor, otherwise false
isPropertyMutator
public boolean isPropertyMutator ()
Returns
true if this method follows the bean convention of being an mutator.
public void setName(String name); // true
public void setUp(); // false, it has no parameter
public void settingUp(String def); // false, 'set' is not followed by an uppercase character
public static void setName(String name); // false, it is static
指定者:
isPropertyMutator 在接口中 JavaMethod
返回:
true if this method is a Java Bean mutator, otherwise false
getPropertyType
指定者:
getPropertyType 在接口中 JavaMethod
返回:
the type of the property this method represents, or null if this method
is not a property mutator or property accessor.
getPropertyName
public String getPropertyName ()
指定者:
getPropertyName 在接口中 JavaMethod
返回:
the name of the property this method represents, or null if this method
is not a property mutator or property accessor.
getReturnType
Equivalent of java.lang.reflect.Method.getReturnType()
指定者:
getReturnType 在接口中 JavaMethod
返回:
the return type
getReturnType
public JavaType getReturnType (boolean resolve)
If a class inherits this method from a generic class or interface, you can use this method to get the resolved return type
指定者:
getReturnType 在接口中 JavaMethod
参数:
resolve - define if generic should be resolved
返回:
the return type
signatureMatches
This method is NOT varArg aware.
指定者:
signatureMatches 在接口中 JavaMethod
参数:
name - the name of the method
parameterTypes - the parameter types of the method, can be null
返回:
true if this method matches the signature, otherwise false
signatureMatches
public boolean signatureMatches (String name,
List <JavaType > parameterTypes,
boolean varArg)
指定者:
signatureMatches 在接口中 JavaMethod
参数:
name - the name of the method
parameterTypes - the parameter types, can be null
varArg - true is signature should match a varArg-method, otherwise false
返回:
true if this method matches the signature, otherwise false