|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.designwizard.main.DesignWizard
public class DesignWizard
This class provides methods to get access to information about a given application. The information is extracted from
the binary files of the application when an instance of DesignWizard is created:
DesignWizard dw = new DesignWizard("/home/user/application/classes");
Once you have created an instance of DesignWizard class, you can use its methods to acquire information about the
components (Packages, Classes, Methods and Fields) of the application, such as "which are the methods that call
the class MyAplicationClassExample":
ClassNode c = dw.getClass("MyAplicationClassExample");
Set callers = c.getCallers();
| Constructor Summary | |
|---|---|
DesignWizard(java.lang.String path)
Creates a new DesignWizard. |
|
DesignWizard(java.lang.String path,
java.lang.String... internalPath)
Creates a new DesignWizard. |
|
| Method Summary | |
|---|---|
ResultOfImpact |
analyseFromEntitiesFile()
Returns a ResultManager object that contains the result of impact analysis. |
void |
generateEntitiesFile()
This method generates a file containing all the entities extracted from jar file. |
java.util.Set<ClassNode> |
getAllClasses()
Returns a java.util.Set containing ClassNode objects reflecting all
the classes extracted. |
java.util.Set<MethodNode> |
getAllMethods()
Returns a java.util.Set containing MethodNode objects reflecting all
the methods extracted. |
java.util.Set<PackageNode> |
getAllPackages()
Returns a java.util.Set containing PackageNode objects reflecting all
the packages extracted. |
ClassNode |
getClass(java.lang.Class classEntity)
Returns the ClassNode object associated with the class or
interface with the given java class. |
ClassNode |
getClass(java.lang.String className)
Returns the ClassNode object associated with the class or
interface with the given string name. |
FieldNode |
getField(java.lang.String fieldName)
Returns the FieldNode object associated with the field
with the given string name. |
MethodNode |
getMethod(java.lang.String methodSignature)
Returns the MethodNode object associated with the method or
constructor with the given string signature. |
PackageNode |
getPackage(java.lang.String fullyQualifiedNamePackage)
Returns the PackageNode object associated with the package
with the given string name. |
ResultOfImpact |
getResultOfAnalyzedEntities()
Returns the result of the analysis. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DesignWizard(java.lang.String path)
throws java.io.IOException
path - the path of the .jar file or the path of binaries (.class) to be extracted.
java.io.IOException - An exception used for signaling run-time failure of reading jar file.
public DesignWizard(java.lang.String path,
java.lang.String... internalPath)
throws java.io.IOException
path - the path of the .jar file or the path of binaries (.class) to be extracted.
java.io.IOException - An exception used for signaling run-time failure of reading jar file.| Method Detail |
|---|
public PackageNode getPackage(java.lang.String fullyQualifiedNamePackage)
throws InexistentEntityException
PackageNode object associated with the package
with the given string name.
fullyQualifiedNamePackage - the fully qualified name of the desired package.
PackageNode object for the package with the
specified name.
InexistentEntityException - if the class cannot be located
public ClassNode getClass(java.lang.String className)
throws InexistentEntityException
ClassNode object associated with the class or
interface with the given string name.
className - the fully qualified name of the desired class.
ClassNode object for the class or interface with the
specified name.
InexistentEntityException - if the class cannot be located
public ClassNode getClass(java.lang.Class classEntity)
throws InexistentEntityException
ClassNode object associated with the class or
interface with the given java class.
classEntity - the desired class.
ClassNode object for the class or interface represented
by the classEntity.
InexistentEntityException - if the class cannot be located
public MethodNode getMethod(java.lang.String methodSignature)
throws InexistentEntityException
MethodNode object associated with the method or
constructor with the given string signature. Constructors have the special identifier <init>. For example:
MethodNode constructor = dw.getMethod("foo.bar.MyClass.<init>()")
methodSignature - the signature of the desired
method (e.g foo.bar.MyClass.methodName(java.lang.Integer,AnotherType)).
MethodNode object for the method or constructor
represented by the methodName.
InexistentEntityException - if the method cannot be located
public FieldNode getField(java.lang.String fieldName)
throws InexistentEntityException
FieldNode object associated with the field
with the given string name.
fieldName - the fully qualified name the desired
field (e.g foo.bar.MyClass.fieldName).
FieldNode object for the field
with the given string name.
InexistentEntityException - if the field cannot be locatedpublic java.util.Set<ClassNode> getAllClasses()
java.util.Set containing ClassNode objects reflecting all
the classes extracted.
ClassNode objects representing the
classes extracted.public java.util.Set<MethodNode> getAllMethods()
java.util.Set containing MethodNode objects reflecting all
the methods extracted.
MethodNode objects representing the
methods extracted.public java.util.Set<PackageNode> getAllPackages()
java.util.Set containing PackageNode objects reflecting all
the packages extracted.
PackageNode objects representing the
packages extracted.public void generateEntitiesFile()
public ResultOfImpact analyseFromEntitiesFile()
throws java.io.IOException
ResultManager object that contains the result of impact analysis.
on each entity read from entities.txt.
java.io.IOExceptionResultManager.public ResultOfImpact getResultOfAnalyzedEntities()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||