|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sofya.graphs.irg.IRG.ClassNode
public static class IRG.ClassNode
This class represents a node in the IRG which encapsulates the interclass relations for a particular class.
A node records the name of a class, its superclass, subclasses, implementors (for interfaces), and classes which use it (if computation of uses is enabled). To reduce memory footprint all of these references are stored as numeric indices, and the node retains a shallow reference to the name table of the enclosing graph for resolving the names.
Constructor Summary | |
---|---|
protected |
IRG.ClassNode(int name,
int superclass)
Constructs a partially initialized class relations node. |
protected |
IRG.ClassNode(int name,
int superclass,
gnu.trove.TIntArrayList subclasses,
gnu.trove.TIntArrayList implementors,
gnu.trove.TIntArrayList users,
java.lang.String[] nameTable)
Constructs a class relations node. |
Method Summary | |
---|---|
int |
getImplementorCount()
Gets the number of classes implementing this node's interface. |
java.lang.String[] |
getImplementors()
Gets a list of the names of classes implementing this node's interface. |
java.lang.String |
getName()
Gets the name of the class represented by this node. |
int |
getSubclassCount()
Gets the number of subclasses of this node's class. |
java.lang.String[] |
getSubclasses()
Gets a list of the names of subclasses of this node's class. |
java.lang.String |
getSuperclass()
Gets the superclass of this node's class. |
int |
getUserCount()
Gets the number of classes using this node's class. |
java.lang.String[] |
getUsers()
Gets a list of the names of classes which use this node's class. |
java.util.Iterator |
implementorIterator()
Returns an iterator over the names of the implementors of this node's interface. |
java.util.Iterator |
subclassIterator()
Returns an iterator over the names of the subclasses of this node's class. |
java.util.Iterator |
userIterator()
Returns an iterator over the names of the users of this node's class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected IRG.ClassNode(int name, int superclass)
This is intended for internal use during IRG construction; it enables nodes to be aggressively created when classes reveal dependencies on other classes not yet analyzed. This in turn enables a more efficient single pass analysis.
name
- Index to the name table entry containing the name
of the class represented by this node.superclass
- Index to the name table entry containing
the name of the superclass of this node's class.protected IRG.ClassNode(int name, int superclass, gnu.trove.TIntArrayList subclasses, gnu.trove.TIntArrayList implementors, gnu.trove.TIntArrayList users, java.lang.String[] nameTable)
name
- Index to the name table entry containing the name
of the class represented by this node.superclass
- Index to the name table entry containing
the name of the superclass of this node's class.subclasses
- List of name table indexes for the subclasses
of this node's class.implementors
- List of name table indexes to classes
implementing this node's interface (will be empty for concrete
(classes).users
- List of name table indexes to classes which
use this node's class.nameTable
- Reference to the name table of the containing
IRG, used to resolve names.Method Detail |
---|
public java.lang.String getName()
public java.lang.String getSuperclass()
public java.lang.String[] getSubclasses()
public java.lang.String[] getImplementors()
public java.lang.String[] getUsers()
public int getSubclassCount()
public int getImplementorCount()
public int getUserCount()
public java.util.Iterator subclassIterator()
public java.util.Iterator implementorIterator()
public java.util.Iterator userIterator()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |