|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--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.
Field Summary | |
private java.util.Vector |
bUsedFields
This field contains, for each field, the info about which class use it. |
private java.util.Vector |
bUsedMethods
This field contains, for each method, the info about which class invoke it. |
private java.util.Vector |
ojFields
This field contains all fields of the class. |
private java.util.Vector |
ojMethods
This field contains all methods of the class. |
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 |
|
Field Detail |
private java.util.Vector ojMethods
private java.util.Vector bUsedMethods
private java.util.Vector ojFields
private java.util.Vector bUsedFields
Constructor Detail |
public PreGraph()
Method Detail |
public int numberOfMethods()
public OJMethod methodAt(int index)
index
- index of element to returnpublic 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.public int[] methodUsedBy(int index)
index
- index of methodpublic int numberOfFields()
public OJField fieldAt(int index)
index
- index of element to returnpublic 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 inpublic int[] fieldUsedBy(int index)
index
- index of methodpublic boolean insertMethod(OJMethod Method, int className)
Method
- method to insert into the graph.className
- a number that representing class that use the method.public void insertFields(OJField Fields, int[] classesName)
Method
- method to insert in the graphclassName
- a number that representing class that use the methodpublic java.util.Vector DangerousFields()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |