Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.bcel.generic
Class ArrayType

    java.lang.Object
      |
      +--org.apache.bcel.generic.Type
            |
            +--org.apache.bcel.generic.ReferenceType
                  |
                  +--org.apache.bcel.generic.ArrayType

All Implemented Interfaces:
  java.io.Serializable

public final class ArrayType
extends ReferenceType

Denotes array type, such as int[][]

Version:
  $Id: ArrayType.java,v 1.1.1.1 2001/10/29 20:00:06 jvanzyl Exp $
Author:
  M. Dahm
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.apache.bcel.generic.Type
`BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, INT, LONG, NO_ARGS, NULL, OBJECT, SHORT, signature, STRING, STRINGBUFFER, THROWABLE, type, UNKNOWN, VOID`

Constructor Summary
`ArrayType(byte type, int dimensions)` Convenience constructor for array type, e.g. int[]
`ArrayType(java.lang.String class_name, int dimensions)` Convenience constructor for reference array type, e.g.
`ArrayType(Type type, int dimensions)` Constructor for array of given type

Method Summary
`boolean` | `equals(java.lang.Object type)`
`Type` | `getBasicType()`
`int` | `getDimensions()`
`Type` | `getElementType()`
`int` | `hashcode()`

Methods inherited from class org.apache.bcel.generic.ReferenceType
`firstCommonSuperclass, getFirstCommonSuperclass, isAssignmentCompatibleWith, isCastableTo`

Methods inherited from class org.apache.bcel.generic.Type
`getArgumentTypes, getMethodSignature, getReturnType, getSignature, getSignature, getSize, getType, getType, getType, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ArrayType

    public ArrayType(byte type,
                     int dimensions)

  Convenience constructor for array type, e.g. int[]

Parameters:
  `type` - array type, e.g. T_INT

### ArrayType

    public ArrayType(java.lang.String class_name,
                     int dimensions)

  Convenience constructor for reference array type, e.g. Object[]

Parameters:
  `class_name` - complete name of class (java.lang.String, e.g.)

### ArrayType

    public ArrayType(Type type,
                     int dimensions)

  Constructor for array of given type

Parameters:
  `type` - type of array (may be an array itself)

Method Detail

### getBasicType

    public Type getBasicType()

  Returns:
    basic type of array, i.e., for int[][][] the basic type is int

### getElementType

    public Type 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

    public int hashcode()

  Returns:
    a hash code value for the object.

### equals

    public boolean equals(java.lang.Object type)

  Overrides:
    `equals` in class `java.lang.Object`
  Returns:
    true if both type objects refer to the same array type.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2003 Apache Software Foundation. All Rights Reserved.