Class ArrayType
java.lang.Object
org.aspectj.apache.bcel.generic.Type
org.aspectj.apache.bcel.generic.ReferenceType
org.aspectj.apache.bcel.generic.ArrayType
Denotes array type, such as int[][]
- Version:
- $Id: ArrayType.java,v 1.4 2008/08/26 15:02:04 aclement Exp $
- Author:
- M. Dahm
-
Nested Class Summary
Nested classes/interfaces inherited from class Type
Type.TypeHolder -
Field Summary
Fields inherited from class Type
BOOLEAN, BYTE, CHAR, CLASS, CLASS_ARRAY, DOUBLE, EXCEPTION, FLOAT, INT, INTEGER, ITERATOR, LIST, LONG, NO_ARGS, NULL, OBJECT, OBJECT_ARRAY, SHORT, signature, STRING, STRING_ARRAY, STRINGARRAY1, STRINGARRAY2, STRINGARRAY3, STRINGARRAY4, STRINGARRAY5, STRINGARRAY6, STRINGARRAY7, STRINGBUFFER, STRINGBUILDER, THROWABLE, type, UNKNOWN, VOIDModifier and TypeFieldDescriptionstatic final BasicTypestatic final BasicTypestatic final BasicTypestatic final ObjectTypestatic final ArrayTypestatic final BasicTypestatic final ObjectTypestatic final BasicTypestatic final BasicTypestatic final ObjectTypestatic final ObjectTypestatic final ObjectTypestatic final BasicTypestatic final Type[]static final ReferenceTypestatic final ObjectTypestatic final ArrayTypestatic final BasicTypeprotected Stringstatic final ObjectTypestatic final ArrayTypestatic final Type[]static final Type[]static final Type[]static final Type[]static final Type[]static final Type[]static final Type[]static final ObjectTypestatic final ObjectTypestatic final ObjectTypeprotected bytestatic final Typestatic final BasicType -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ReferenceType
getFirstCommonSuperclass, isAssignmentCompatibleWith, isCastableToModifier and TypeMethodDescriptionThis commutative operation returns the first common superclass (narrowest ReferenceType referencing a class, not an interface).booleanReturn true iff this is assignment compatible with another type t as defined in the JVM specification; see the AASTORE definition there.booleanisCastableTo(Type t) Return true iff this type is castable to another type t as defined in the JVM specification.Methods inherited from class Type
getArgumentSizes, getArgumentTypes, getReturnType, getSignature, getSignature, getSignature, getSize, getType, getType, getType, getTypeInternal, getTypeSize, toStringModifier and TypeMethodDescriptionstatic intgetArgumentSizes(String signature) Work out the type of each argument in the signature and return the cumulative sizes of all the types (size means number of stack slots it consumes, eg double=2, int=1).static Type[]getArgumentTypes(String signature) Convert arguments of a method (signature) to an array of Type objects.static TypegetReturnType(String signature) Convert return value of a method (signature) to a Type object.static StringgetSignature(Constructor<?> cons) static StringgetSignature(Method meth) intgetSize()bytegetType()static TypeConvert runtime java.lang.Class to BCEL Type object.static final Typestatic final Type.TypeHoldergetTypeInternal(String signature) Convert signature to a Type object.static intgetTypeSize(String signature) Return the size of the type expressed in the signature.toString()
-
Constructor Details
-
ArrayType
public ArrayType(byte type, int dimensions) Convenience constructor for array type, e.g. int[]- Parameters:
type- array type, e.g. T_INT
-
ArrayType
Convenience constructor for reference array type, e.g. Object[]- Parameters:
class_name- complete name of class (java.lang.String, e.g.)
-
ArrayType
Constructor for array of given type- Parameters:
type- type of array (may be an array itself)
-
-
Method Details
-
getBasicType
- Returns:
- basic type of array, i.e., for int[][][] the basic type is int
-
getElementType
- Returns:
- element type of array, i.e., for int[][][] the element type is int[][]
-
getDimensions
public int getDimensions()- Returns:
- number of dimensions of array
-
hashCode
-
equals
-