Package com.tonic.renamer.hierarchy
Class ClassNode
- java.lang.Object
-
- com.tonic.renamer.hierarchy.ClassNode
-
public class ClassNode extends Object
A class in the hierarchy graph together with its supertypes and subtypes.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Set<ClassNode>getAllAncestors()Walks superclasses and interfaces transitively.Set<ClassNode>getAllDescendants()Walks subclasses and implementors transitively.ClassFilegetClassFile()List<ClassNode>getImplementors()List<ClassNode>getInterfaces()StringgetName()List<ClassNode>getSubClasses()ClassNodegetSuperClass()inthashCode()booleanisInPool()booleanisInterface()StringtoString()
-
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the name
-
getClassFile
public ClassFile getClassFile()
- Returns:
- the class file
-
isInPool
public boolean isInPool()
- Returns:
- true when a class file is attached, false for a class outside the pool
-
getSuperClass
public ClassNode getSuperClass()
- Returns:
- the super class
-
getInterfaces
public List<ClassNode> getInterfaces()
- Returns:
- an unmodifiable view of the directly implemented interfaces
-
getSubClasses
public List<ClassNode> getSubClasses()
- Returns:
- an unmodifiable view of the direct subclasses
-
getImplementors
public List<ClassNode> getImplementors()
- Returns:
- an unmodifiable view of the classes implementing this interface
-
isInterface
public boolean isInterface()
- Returns:
- true when the attached class file carries ACC_INTERFACE, false when there is none
-
getAllAncestors
public Set<ClassNode> getAllAncestors()
Walks superclasses and interfaces transitively.- Returns:
- every ancestor, in discovery order, excluding this node
-
getAllDescendants
public Set<ClassNode> getAllDescendants()
Walks subclasses and implementors transitively.- Returns:
- every descendant, in discovery order, excluding this node
-
-