Package org.apache.bcel.generic
Class ArrayType
java.lang.Object
org.apache.bcel.generic.Type
org.apache.bcel.generic.ReferenceType
org.apache.bcel.generic.ArrayType
Denotes array type, such as int[][]
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionArrayType(byte type, int dimensions) Convenience constructor for array type, for example int[]Convenience constructor for reference array type, for example Object[]Constructor for array of given type -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the basic type of array, that is, forint[][][]the basic type is int.Gets the name of referenced class.intGets the number of dimensions of array.Gets the element type of array, that is, forint[][][]the element type isint[][].inthashCode()Gets the hash code of this Type.booleanisElementType(Type type) Tests whether the given type is the element type of this array type, that is, forint[][][]the element type isint[][].Methods inherited from class org.apache.bcel.generic.ReferenceType
firstCommonSuperclass, getFirstCommonSuperclass, isAssignmentCompatibleWith, isCastableToMethods inherited from class org.apache.bcel.generic.Type
consumed, encode, getArgumentTypes, getArgumentTypesSize, getMethodSignature, getReturnType, getReturnTypeSize, getSignature, getSignature, getSize, getType, getType, getType, getTypes, getTypeSize, internalTypeNameToSignature, normalizeForStackOrLocal, size, toString
-
Field Details
-
dimensions
private final int dimensions -
basicType
-
-
Constructor Details
-
ArrayType
public ArrayType(byte type, int dimensions) Convenience constructor for array type, for example int[]- Parameters:
type- array type, for example T_INT.dimensions- array dimensions.
-
ArrayType
Convenience constructor for reference array type, for example Object[]- Parameters:
className- complete name of class (String, for example).dimensions- array dimensions.
-
ArrayType
Constructor for array of given type- Parameters:
type- type of array (may be an array itself).dimensions- array dimensions.
-
-
Method Details
-
equals
-
getBasicType
Gets the basic type of array, that is, forint[][][]the basic type is int.- Returns:
- basic type of array, that is, for
int[][][]the basic type is int.
-
getClassName
Gets the name of referenced class.- Overrides:
getClassNamein classType- Returns:
- name of referenced class.
- Since:
- 6.7.0
-
getDimensions
public int getDimensions()Gets the number of dimensions of array.- Returns:
- number of dimensions of array.
-
getElementType
Gets the element type of array, that is, forint[][][]the element type isint[][].- Returns:
- element type of array, that is, for
int[][][]the element type isint[][].
-
hashCode
public int hashCode()Description copied from class:TypeGets the hash code of this Type. -
isElementType
Tests whether the given type is the element type of this array type, that is, forint[][][]the element type isint[][].- Parameters:
type- the type to test.- Returns:
- true if the given type is the element type of this array type, that is, for
int[][][]the element type isint[][]. - Since:
- 6.13.0
-