|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.designwizard.design.AbstractEntity
org.designwizard.design.MethodNode
public class MethodNode
A MethodNode
provides information about a single method or a constructor
on a class or interface.
To get access to a desired method extracted, do not use the constructor of this class. Instead, use the
class DesignWizard
as it follows:
DesignWizard dw = new DesignWizard("/home/user/application/classes"); MethodNode c = dw.getMethod("MyAplicationClassExample.method(java.lang.String,int)");
ClassNode
,
ClassNode.getAllMethods()
,
org.designwizard.design.ClassNode#getMethod(String)
,
ClassNode.getDeclaredMethods()
,
ClassNode.getInheritedMethods()
,
ClassNode.getDeclaredMethod(String)
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.designwizard.design.Entity |
---|
Entity.TypesOfEntities |
Field Summary | |
---|---|
static java.lang.String |
CONSTRUCTOR_IDENTIFIER
|
Fields inherited from class org.designwizard.design.AbstractEntity |
---|
modifiers, name, relations, type |
Constructor Summary | |
---|---|
MethodNode(java.lang.String signature,
boolean isConstructor)
Creates a new Method. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object other)
Verifies if this entity is equals the other entity. |
java.util.Set<FieldNode> |
getAccessedFields()
Returns a Set of FieldNode objects representing the
fields accessed by this MethodNode . |
java.util.Set<ClassNode> |
getCalleeClasses()
Returns the classes that are referenced by this MethodNode |
java.util.Set<MethodNode> |
getCalleeMethods()
Returns the methods that are called by this MethodNode. |
java.util.Set<PackageNode> |
getCalleePackages()
Returns a Set of PackageNode containing the packages that are referenced
by this Entity . |
java.util.Set<ClassNode> |
getCallerClasses()
Returns the classes that reference this Method. |
java.util.Set<MethodNode> |
getCallerMethods()
Returns the Methods that calls this method. |
java.util.Set<PackageNode> |
getCallerPackages()
Returns a Set of PackageNode containing the packages that reference this Entity . |
java.util.Set<ClassNode> |
getCatchedExceptions()
Returns a java.util.Set of ClassNode objects that represent
the types of the exceptions catched by the underlying method
represented by this MethodNode object. |
java.lang.String |
getClassName()
Returns the name of the class that represents this Entity object. |
ClassNode |
getClassNode()
Returns the ClassNode that represents this Entity object. |
ClassNode |
getDeclaringClass()
Returns the ClassNode object representing the class or interface
that declares the method represented by this MethodNode object. |
java.util.List<java.lang.String[]> |
getImpactOfAChange()
Return all methods impacted by a change in this method. |
PackageNode |
getPackage()
Gets the PackageNode object that represents
the package of this method. |
java.util.Set<ClassNode> |
getParameters()
Returns a java.util.Set of ClassNode objects that represent the formal
parameter types of the method represented by this Method object. |
ClassNode |
getReturnType()
Returns a ClassNode object that represents the formal return type
of the method represented by this MethodNode object. |
java.lang.String |
getShortName()
Returns the short name of the method represented by this MethodNode
object, as a String . |
java.util.Set<ClassNode> |
getThrownExceptions()
Returns a java.util.Set of ClassNode objects that represent
the types of the exceptions declared to be thrown
by the underlying method
represented by this Method object. |
int |
hashCode()
|
boolean |
isConstructor()
Verifies whether this MethodNode is a constructor. |
boolean |
isStatic()
Verifies whether this MethodNode is static or not. |
void |
setParameters(java.util.Set<ClassNode> methodParameters)
|
java.lang.String |
toString()
Method that returns the description of this design element. |
Methods inherited from class org.designwizard.design.AbstractEntity |
---|
addModifier, addModifiers, addRelation, containsModifiers, containsRelation, getModifiers, getName, getRelations, getTypeOfEntity, getVisibility, isAbstract, removeRelation |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.designwizard.design.Entity |
---|
addModifier, addModifiers, addRelation, containsModifiers, containsRelation, getModifiers, getName, getRelations, getTypeOfEntity, getVisibility, isAbstract, removeRelation |
Field Detail |
---|
public static final java.lang.String CONSTRUCTOR_IDENTIFIER
Constructor Detail |
---|
public MethodNode(java.lang.String signature, boolean isConstructor)
signature
- the signature of the Method. The signature is composed by its name and parameters.
Example: ClassXPTO.setName(java.lang.String)isConstructor
- true if the method is a constructor; false otherwise.Method Detail |
---|
public java.lang.String getShortName()
MethodNode
object, as a String
.
getShortName
in interface Entity
getShortName
in class AbstractEntity
Entity
.public boolean isConstructor()
MethodNode
is a constructor.
MethodNode
object is a constructor; false otherwise.public ClassNode getReturnType()
ClassNode
object that represents the formal return type
of the method represented by this MethodNode
object.
public ClassNode getDeclaringClass()
ClassNode
object representing the class or interface
that declares the method represented by this MethodNode
object.
public boolean isStatic()
MethodNode
is static or not.
public java.util.Set<ClassNode> getCatchedExceptions()
java.util.Set
of ClassNode
objects that represent
the types of the exceptions catched by the underlying method
represented by this MethodNode
object. Returns an empty set
if the method catches no exceptions.
java.util.Set
of ClassNode
objects that represent
the types of the exceptions catched by the underlying method
represented by this MethodNode
object.public java.util.List<java.lang.String[]> getImpactOfAChange()
getImpactOfAChange
in interface Entity
public java.util.Set<ClassNode> getThrownExceptions()
java.util.Set
of ClassNode
objects that represent
the types of the exceptions declared to be thrown
by the underlying method
represented by this Method
object. Returns an empty set if the method declares no
exceptions in its throws
clause.
public java.util.Set<FieldNode> getAccessedFields()
Set
of FieldNode
objects representing the
fields accessed by this MethodNode
.
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class AbstractEntity
public java.lang.String toString()
toString
in class AbstractEntity
public ClassNode getClassNode()
Entity
ClassNode
that represents this Entity
object.
For instance, if this Entity
object is a FieldNode
, this method will return the
ClassNode
that contains the field. The same is applied to MethodNode
s objects.
getClassNode
in interface Entity
ClassNode
object that represents this Entity
object.public java.lang.String getClassName()
Entity
Entity
object.
For instance, if this Entity
object is a FieldNode
, this method will return the
name of the class that contains the field. The same is applied to MethodNode
s objects. In the case of
ClassNode
objects, calling this method has the same effect as the designwizard.design.ClassNode.getName()
method.
getClassName
in interface Entity
Entity
object.public void setParameters(java.util.Set<ClassNode> methodParameters)
public java.util.Set<ClassNode> getParameters()
java.util.Set
of ClassNode
objects that represent the formal
parameter types of the method represented by this Method
object. Returns an empty set
if the underlying method takes no parameters.
public PackageNode getPackage()
PackageNode
object that represents
the package of this method.
getPackage
in interface Entity
public java.util.Set<MethodNode> getCallerMethods()
getCallerMethods
in interface Entity
public java.util.Set<MethodNode> getCalleeMethods()
getCalleeMethods
in interface Entity
public java.util.Set<ClassNode> getCallerClasses()
getCallerClasses
in interface Entity
getCallerClasses
in class AbstractEntity
public java.util.Set<ClassNode> getCalleeClasses()
MethodNode
getCalleeClasses
in interface Entity
getCalleeClasses
in class AbstractEntity
public java.util.Set<PackageNode> getCalleePackages()
Entity
Set
of PackageNode
containing the packages that are referenced
by this Entity
.
getCalleePackages
in interface Entity
Set
containing the packages that are referenced
by this Entity
.public java.util.Set<PackageNode> getCallerPackages()
Entity
Set
of PackageNode
containing the packages that reference this Entity
.
getCallerPackages
in interface Entity
Set
containing the packages that reference this Entity
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |