Package javassist.bytecode.analysis

# Class MultiArrayType

java.lang.Object
javassist.bytecode.analysis.Type
javassist.bytecode.analysis.MultiArrayType

public class MultiArrayType extends Type
Represents an array of `MultiType` instances.

Author:
  Jason T. Greene

## Field Summary

### Fields inherited from class javassist.bytecode.analysis.Type

`BOGUS, BOOLEAN, BYTE, CHAR, CLONEABLE, DOUBLE, FLOAT, INTEGER, LONG, OBJECT, RETURN_ADDRESS, SERIALIZABLE, SHORT, THROWABLE, TOP, UNINIT, VOID`

## Constructor Summary

Constructors
Constructor
Description
`MultiArrayType(MultiType component, int dims)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`Type`
`getComponent()`
Returns the array component if this type is an array.
`CtClass`
`getCtClass()`
Returns the class this type represents.
`int`
`getDimensions()`
Returns the number of dimensions of this array.
`int`
`getSize()`
Gets the word size of this type.
`int`
`hashCode()`
`boolean`
`isArray()`
Returns whether or not this type is an array.
`boolean`
`isAssignableFrom(Type type)`
Determines whether this type is assignable, to the passed type.
`boolean`
`isAssignableTo(Type type)`
`boolean`
`isReference()`
Returns whether or not this type is a normal java reference, i.e.
`String`
`toString()`

### Methods inherited from class javassist.bytecode.analysis.Type

`get, isSpecial, merge`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### MultiArrayType

public MultiArrayType(MultiType component, int dims)

## Method Details

### getCtClass

public CtClass getCtClass()
Description copied from class: `Type`
Returns the class this type represents. If the type is special, null will be returned.

Overrides:
  `getCtClass` in class `Type`
Returns:
  the class for this type, or null if special

### getDimensions

public int getDimensions()
Description copied from class: `Type`
Returns the number of dimensions of this array. If the type is not an array zero is returned.

Overrides:
  `getDimensions` in class `Type`
Returns:
  zero if not an array, otherwise the number of array dimensions.

### getComponent

public Type getComponent()
Description copied from class: `Type`
Returns the array component if this type is an array. If the type is not an array null is returned.

Overrides:
  `getComponent` in class `Type`
Returns:
  the array component if an array, otherwise null

### getSize

public int getSize()
Description copied from class: `Type`
Gets the word size of this type. Double-word types, such as long and double will occupy two positions on the local variable table or stack.

Overrides:
  `getSize` in class `Type`
Returns:
  the number of words needed to hold this type

### isArray

public boolean isArray()
Description copied from class: `Type`
Returns whether or not this type is an array.

Overrides:
  `isArray` in class `Type`
Returns:
  true if an array, false if not

### isAssignableFrom

public boolean isAssignableFrom(Type type)
Description copied from class: `Type`
Determines whether this type is assignable, to the passed type. A type is assignable to another if it is either the same type, or a sub-type.

Overrides:
  `isAssignableFrom` in class `Type`
Parameters:
  `type` - the type to test assignability to
Returns:
  true if this is assignable to type, otherwise false

### isReference

public boolean isReference()
Description copied from class: `Type`
Returns whether or not this type is a normal java reference, i.e. it is or extends java.lang.Object.

Overrides:
  `isReference` in class `Type`
Returns:
  true if a java reference, false if a primitive or special

### isAssignableTo

public boolean isAssignableTo(Type type)

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Type`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Type`

### toString

public String toString()

Overrides:
  `toString` in class `Type`