|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mChaRM.PremChaRM.PreGraph
This class representing the structure of fields and methods used to resolve the problem of sharing out. It contains methods to insert methods/fields and to find multi-refered fields.
Constructor Summary | |
PreGraph()
|
Method Summary | |
java.util.Vector |
DangerousFields()
This method checks if fields are dangerous, in other words it control if a fields is used by more than one class. |
OJField |
fieldAt(int index)
This method return the OJField object specified by index. |
int[] |
fieldUsedBy(int index)
This method return an array that rapresent in which classes the field is used. |
boolean |
fieldUsedBy(int index,
int className)
This method check if a field is used in a class. |
void |
insertFields(OJField Fields,
int[] classesName)
Put a field in the graph. |
boolean |
insertMethod(OJMethod Method,
int className)
Put a method in the graph. |
OJMethod |
methodAt(int index)
This method return OJMethod specified by given index. |
int[] |
methodUsedBy(int index)
This method return an array that rapresent in which classes a method is called. |
boolean |
methodUsedBy(int index,
int className)
This method check if a method is used by a class. |
int |
numberOfFields()
This method return the number of fields stored. |
int |
numberOfMethods()
This method return the number of methods stored. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public PreGraph()
Method Detail |
public int numberOfMethods()
public OJMethod methodAt(int index)
index
- index of element to returnjava.lang.ArrayIndexOutOfBoundsException
- thrown when the index reified doesn't exist.public boolean methodUsedBy(int index, int className)
index
- index of method to be checked.className
- a number that representing name of class to check if method is used in.java.lang.ArrayIndexOutOfBoundsException
- thrown when the index reified doesn't exist in bUsedMethods.public int[] methodUsedBy(int index)
index
- index of methodjava.lang.ArrayIndexOutOfBoundsException
- thrown when the index reified doesn't exist in bUsedMethods.public int numberOfFields()
public OJField fieldAt(int index)
index
- index of element to returnjava.lang.ArrayIndexOutOfBoundsException
- thrown when the index reified doesn't exist in ojFields.public boolean fieldUsedBy(int index, int className)
index
- index of field to be checkedclassName
- a number that representing name of class to check if field is used injava.lang.ArrayIndexOutOfBoundsException
- thrown when the index reified doesn't exist in bUsedFields.public int[] fieldUsedBy(int index)
index
- index of methodjava.lang.ArrayIndexOutOfBoundsException
- thrown when the index reified doesn't exist in bUsedFields.public boolean insertMethod(OJMethod Method, int className)
Method
- method to insert into the graph.className
- a number that representing class that use the method.java.lang.ArrayIndexOutOfBoundsException
- thrown when the classname reified is grater than threepublic void insertFields(OJField Fields, int[] classesName)
Method
- method to insert in the graphclassName
- a number that representing class that use the methodjava.lang.ArrayIndexOutOfBoundsException
- thrown when the classname reified is grater than threepublic java.util.Vector DangerousFields()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |