| Modifier and Type | Field and Description |
|---|---|
java.util.List |
parameters
List of ArrayLists holding type, name pairs for each parameter
|
java.util.Set |
thrown
List of types for each exception declared to be thrown
|
java.util.List<java.lang.String> |
typeParameters
List of Type Parameters (as String) defined in method signature
|
accessorModifiers, declaringClassName, modifiers, name, type, typeSignatureDEFAULT_MODIFIERS, DUPLICATE_PARAM_NAME, DUPLICATE_THROW_CLAUSE, GENERIC_SETTINGS_ERROR, INVALID_DIMENSION, INVALID_IDENTIFIER, INVALID_IDENTIFIER_NULL, INVALID_MODIFIERS, INVALID_PARAM_IDENTIFIER, INVALID_PARAM_IDENTIFIER_NULL, INVALID_PARAM_TYPE_NULL, INVALID_THROW_TYPE_NULL, INVALID_TYPE_NULL, PARAM_TYPE_NOT_FOUND, PRIMITIVE_FIELD_TYPES, PRIMITIVE_METHOD_TYPES, THROW_TYPE_NOT_FOUND, TYPE_NOT_FOUND, VALID| Constructor and Description |
|---|
MethodInfo()
Default Constructor
-------------------------------------------------------------------------
|
MethodInfo(JavaMethod javaMethod)
Initialize from JavaMethod
-------------------------------------------------------------------------
|
MethodInfo(MethodInfo mi)
Copy Constructor
-------------------------------------------------------------------------
|
MethodInfo(SourceMethod srcMethod) |
MethodInfo(java.lang.String returnType,
java.lang.String name,
int modifiers) |
| Modifier and Type | Method and Description |
|---|---|
void |
addException(java.lang.String exception) |
void |
addParameter(java.lang.String type,
java.lang.String name) |
int |
compareTo(java.lang.Object o) |
java.lang.Object |
copyTo(java.lang.Object target)
Copyable interface
-------------------------------------------------------------------------
|
protected void |
copyToImpl(MethodInfo copy) |
SourceMethod |
createSourceConstructor(SourceFile srcFile,
boolean addDefaultImpl)
Helper method for creating a new SourceMethod from a MethodInfo.
|
SourceMethod |
createSourceConstructor(SourceFile srcFile,
SourceBlock srcBlock)
Helper method for creating a new SourceMethod from a MethodInfo.
|
SourceMethod |
createSourceConstructor(SourceFile srcFile,
java.lang.String stmt)
Helper method for creating a new SourceMethod from a MethodInfo.
|
SourceMethod |
createSourceConstructor(SourceFile srcFile,
java.lang.String[] stmts)
Helper method for creating a new SourceMethod from a MethodInfo.
|
SourceMethod |
createSourceMethod(SourceFile srcFile,
boolean addDefaultImpl)
Helper method for creating a new SourceMethod from a MethodInfo.
|
SourceMethod |
createSourceMethod(SourceFile srcFile,
SourceBlock srcBlock)
Helper method for creating a new SourceMethod from a MethodInfo.
|
SourceMethod |
createSourceMethod(SourceFile srcFile,
java.lang.String stmt)
Helper method for creating a new SourceMethod from a MethodInfo.
|
SourceMethod |
createSourceMethod(SourceFile srcFile,
java.lang.String[] stmts)
Helper method for creating a new SourceMethod from a MethodInfo.
|
boolean |
equals(java.lang.Object o) |
protected boolean |
equalsImpl(MethodInfo methodInfo) |
FieldInfo |
getField() |
java.util.Collection |
getJavaMethodAnnotations() |
boolean |
isGetter() |
boolean |
isSetter() |
void |
removeException(java.lang.String exception) |
java.lang.String |
render() |
java.lang.String |
toString() |
int |
validate()
Validate the settings of the MethodInfo.
|
copyToImpl, createLocalVariable, createLocalVariable, createLocalVariableDeclaration, createLocalVariableDeclaration, createSourceFieldDecl, createSourceFieldDecl, equalsImpl, getJavaFieldAnnotations, getJavaFieldAnnotations, getName, hashCode, makeGetter, makeGetter, makeSetter, makeSetter, setJavaFieldAnnotationspublic java.util.List parameters
public java.util.Set thrown
public java.util.List<java.lang.String> typeParameters
public MethodInfo()
public MethodInfo(java.lang.String returnType,
java.lang.String name,
int modifiers)
public MethodInfo(JavaMethod javaMethod)
public MethodInfo(SourceMethod srcMethod)
public MethodInfo(MethodInfo mi)
public java.lang.Object copyTo(java.lang.Object target)
copyTo in interface CopyablecopyTo in class FieldInfotarget - The target object to which the state of
this object should be copied. If target
is null, then the copyTo method will
return a new instance of this class.this
object was copied. If the target was
non-null, then the return value is the same as the
target object that was passed in; otherwise, the
return value is a new instance of this class.protected final void copyToImpl(MethodInfo copy)
public boolean isGetter()
public boolean isSetter()
public FieldInfo getField()
public java.util.Collection getJavaMethodAnnotations()
public int validate()
public void addParameter(java.lang.String type,
java.lang.String name)
public void addException(java.lang.String exception)
public void removeException(java.lang.String exception)
public int compareTo(java.lang.Object o)
protected final boolean equalsImpl(MethodInfo methodInfo)
public SourceMethod createSourceConstructor(SourceFile srcFile, boolean addDefaultImpl)
srcFile - the SourceFile containing the target (primary) classaddDefaultImpl - if true, adds a default method implementationpublic SourceMethod createSourceConstructor(SourceFile srcFile, java.lang.String stmt)
srcFile - the SourceFile containing the target (primary) classstmt - String single line text statement to add to the method bodypublic SourceMethod createSourceConstructor(SourceFile srcFile, java.lang.String[] stmts)
srcFile - the SourceFile containing the target (primary) classstmts - String [] multiple text statements to add to the method bodypublic SourceMethod createSourceConstructor(SourceFile srcFile, SourceBlock srcBlock)
srcFile - the SourceFile containing the target (primary) classsrcBlock - SourceBlock pre-build SourceBlock to assign as the method bodypublic SourceMethod createSourceMethod(SourceFile srcFile, boolean addDefaultImpl)
srcFile - the SourceFile containing the target (primary) classaddDefaultImpl - if true, adds a default method implementationpublic SourceMethod createSourceMethod(SourceFile srcFile, java.lang.String stmt)
srcFile - the SourceFile containing the target (primary) classstmt - String single line text statement to add to the method bodypublic SourceMethod createSourceMethod(SourceFile srcFile, java.lang.String[] stmts)
srcFile - the SourceFile containing the target (primary) classstmts - String [] multiple text statements to add to the method bodypublic SourceMethod createSourceMethod(SourceFile srcFile, SourceBlock srcBlock)
srcFile - the SourceFile containing the target (primary) classsrcBlock - SourceBlock pre-build SourceBlock to assign as the method body