edu.umd.cs.findbugs.ba.type2
Class ClassType

java.lang.Object
  extended by edu.umd.cs.findbugs.graph.AbstractVertex<InheritanceGraphEdge,ObjectType>
      extended by edu.umd.cs.findbugs.ba.type2.ObjectType
          extended by edu.umd.cs.findbugs.ba.type2.ClassType
All Implemented Interfaces:
ReferenceType, Type, GraphVertex<ObjectType>, java.lang.Comparable<ObjectType>

public class ClassType
extends ObjectType

Type of objects that are instances of a class. This includes all class and interface types, but excludes array types.


Field Summary
 
Fields inherited from class edu.umd.cs.findbugs.ba.type2.ObjectType
KNOWN, UNCHECKED, UNKNOWN
 
Method Summary
 void accept(TypeVisitor visitor)
          Accept an TypeVisitor.
 boolean equals(java.lang.Object o)
           
 java.lang.String getClassName()
           
 int getTypeCode()
          Return the type code value as defined in org.apache.bcel.Constants or ExtendedTypes.
 int hashCode()
           
 boolean isArray()
          Is this type an array type?
 boolean isInterface()
          Determine if this type is an interface type (as opposed to a class or array type).
 boolean isValidArrayBaseType()
          Is this a valid array base type?
 void setIsInterface(boolean isInterface)
          Mark the type as an interface.
 void setUnknown()
          Mark the type as unknown: a check to determine whether it was a class or interface failed.
 java.lang.String toString()
           
 
Methods inherited from class edu.umd.cs.findbugs.ba.type2.ObjectType
getSignature, getState, isBasicType, isReferenceType, isValidArrayElementType
 
Methods inherited from class edu.umd.cs.findbugs.graph.AbstractVertex
compareTo, getLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

setIsInterface

public void setIsInterface(boolean isInterface)
Mark the type as an interface. The user is responsible for ensuring that a class type is not marked as both a class and and interface, and that the type is marked as one or the other before isInterface() is called.


setUnknown

public void setUnknown()
Mark the type as unknown: a check to determine whether it was a class or interface failed.


getTypeCode

public int getTypeCode()
Description copied from interface: Type
Return the type code value as defined in org.apache.bcel.Constants or ExtendedTypes.


getClassName

public java.lang.String getClassName()

isValidArrayBaseType

public boolean isValidArrayBaseType()
Description copied from interface: Type
Is this a valid array base type?


accept

public void accept(TypeVisitor visitor)
Description copied from interface: Type
Accept an TypeVisitor.

Parameters:
visitor - the visitor

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isInterface

public boolean isInterface()
Description copied from class: ObjectType
Determine if this type is an interface type (as opposed to a class or array type). Note that for ClassTypes, the type must have been explicitly marked as a class or interface before this method is called. Otherwise, an IllegalStateException will be thrown.

Specified by:
isInterface in class ObjectType

isArray

public boolean isArray()
Description copied from class: ObjectType
Is this type an array type?

Specified by:
isArray in class ObjectType

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object