edu.umd.cs.findbugs.ba.type
Class ArrayType
java.lang.Object
edu.umd.cs.findbugs.graph.AbstractVertex<InheritanceGraphEdge,ObjectType>
edu.umd.cs.findbugs.ba.type.ObjectType
edu.umd.cs.findbugs.ba.type.ArrayType
- All Implemented Interfaces:
- ReferenceType, Type, GraphVertex<ObjectType>, java.lang.Comparable<ObjectType>
public class ArrayType
- extends ObjectType
Constructor Summary |
ArrayType(int numDimensions,
Type baseType)
|
ArrayType(java.lang.String signature,
int numDimensions,
Type baseType)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
brackets
private static final java.lang.String brackets
- See Also:
- Constant Field Values
numDimensions
private int numDimensions
baseType
private Type baseType
ArrayType
ArrayType(int numDimensions,
Type baseType)
ArrayType
ArrayType(java.lang.String signature,
int numDimensions,
Type baseType)
makeArraySignature
public static java.lang.String makeArraySignature(int numDimensions,
Type baseType)
typeFromSignature
static ArrayType typeFromSignature(TypeRepository repos,
java.lang.String signature)
throws InvalidSignatureException
- Throws:
InvalidSignatureException
getNumDimensions
public int getNumDimensions()
getBaseType
public Type getBaseType()
getElementType
public Type getElementType(TypeRepository repos)
getTypeCode
public int getTypeCode()
- Description copied from interface:
Type
- Return the type code value as defined in
org.apache.bcel.Constants or
ExtendedTypes
.
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
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
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
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object