Class ClassVertex
java.lang.Object
edu.umd.cs.findbugs.graph.AbstractVertex<InheritanceEdge, ClassVertex>
edu.umd.cs.findbugs.ba.ch.ClassVertex
- All Implemented Interfaces:
GraphVertex<ClassVertex>, Comparable<ClassVertex>
Vertex class - represents a class or interface in the InheritanceGraph. Edges
connect subtypes to supertypes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final ClassDescriptorprivate ClassVertexprivate static final intprivate intprivate static final intprivate final XClass -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateClassVertex(ClassDescriptor classDescriptor, boolean isInterfaceEdge) privateClassVertex(ClassDescriptor classDescriptor, XClass xclass) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassVertexcreateMissingClassVertex(ClassDescriptor classDescriptor, boolean isInterface) Factory method for ClassVertex objects representing missing classes.static ClassVertexcreateResolvedClassVertex(ClassDescriptor classDescriptor, XClass xclass) Factory method for resolved ClassVertex objects.booleaninthashCode()booleanbooleanprivate booleanisFlagSet(int flag) booleanbooleanReturn true if this ClassVertex corresponds to a resolved class, or false if the class could not be found.voidMark this ClassVertex as representing an application class.voidsetDirectSuperclass(ClassVertex target) Set the ClassVertex representing the direct superclass.voidsetFinished(boolean finished) private voidsetFlag(int flag, boolean enable) private voidMark this ClassVertex as representing an interface.toString()Methods inherited from class AbstractVertex
compareTo, getLabel, setLabel
-
Field Details
-
FINISHED
private static final int FINISHED- See Also:
-
APPLICATION_CLASS
private static final int APPLICATION_CLASS- See Also:
-
INTERFACE
private static final int INTERFACE- See Also:
-
classDescriptor
-
xclass
-
flags
private int flags -
directSuperclass
-
-
Constructor Details
-
ClassVertex
-
ClassVertex
-
-
Method Details
-
toString
-
equals
- Overrides:
equalsin classAbstractVertex<InheritanceEdge, ClassVertex>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractVertex<InheritanceEdge, ClassVertex>
-
createResolvedClassVertex
Factory method for resolved ClassVertex objects.- Parameters:
classDescriptor- ClassDescriptor naming the class or interfacexclass- object containing information about a class or interface- Returns:
- ClassVertex
-
createMissingClassVertex
public static ClassVertex createMissingClassVertex(ClassDescriptor classDescriptor, boolean isInterface) Factory method for ClassVertex objects representing missing classes.- Parameters:
classDescriptor- ClassDescriptor naming the missing class or interfaceisInterface- true if missing class is an interface, false otherwise- Returns:
- ClassVertex
-
getClassDescriptor
- Returns:
- Returns the classDescriptor.
-
getXClass
- Returns:
- Returns the xClass.
-
isResolved
public boolean isResolved()Return true if this ClassVertex corresponds to a resolved class, or false if the class could not be found. -
setFinished
public void setFinished(boolean finished) - Parameters:
finished- The finished to set.
-
isFinished
public boolean isFinished()- Returns:
- Returns the finished.
-
markAsApplicationClass
public void markAsApplicationClass()Mark this ClassVertex as representing an application class. -
isApplicationClass
public boolean isApplicationClass()- Returns:
- true if this ClassVertex represents an application class, false otherwise
-
setInterface
private void setInterface()Mark this ClassVertex as representing an interface. -
isInterface
public boolean isInterface()- Returns:
- true if this ClassVertex represents an interface, false otherwise
-
setDirectSuperclass
Set the ClassVertex representing the direct superclass.- Parameters:
target- ClassVertex representing the direct superclass.
-
getDirectSuperclass
- Returns:
- Returns the directSuperclass.
-
setFlag
private void setFlag(int flag, boolean enable) -
isFlagSet
private boolean isFlagSet(int flag)
-