Class ArrayType

java.lang.Object
org.glassfish.rmic.iiop.Type
org.glassfish.rmic.iiop.ArrayType
All Implemented Interfaces:
Cloneable, Constants, Constants, ContextElement, Constants, RuntimeConstants

public class ArrayType extends Type
ArrayType is a wrapper for any of the other types. The getElementType() method can be used to get the array element type. The getArrayDimension() method can be used to get the array dimension.
  • Field Details

    • type

      private Type type
    • arrayDimension

      private int arrayDimension
    • brackets

      private String brackets
    • bracketsSig

      private String bracketsSig
  • Constructor Details

    • ArrayType

      private ArrayType(ContextStack stack, Type type, int arrayDimension)
      Create an ArrayType instance for the given type. The resulting object is not yet completely initialized.
  • Method Details

    • forArray

      public static ArrayType forArray(Type theType, ContextStack stack)
      Create an ArrayType object for the given type. If the class is not a properly formed or if some other error occurs, the return value will be null, and errors will have been reported to the supplied BatchEnvironment.
    • getSignature

      public String getSignature()
      Return signature for this type (e.g. com.acme.Dynamite would return "com.acme.Dynamite", byte = "B")
      Specified by:
      getSignature in class Type
    • getElementType

      public Type getElementType()
      Get element type. Returns null if not an array.
      Overrides:
      getElementType in class Type
    • getArrayDimension

      public int getArrayDimension()
      Get array dimension. Returns zero if not an array.
      Overrides:
      getArrayDimension in class Type
    • getArrayBrackets

      public String getArrayBrackets()
      Get brackets string. Returns "" if not an array.
      Overrides:
      getArrayBrackets in class Type
    • toString

      public String toString()
      Return a string representation of this type.
      Overrides:
      toString in class Type
    • getTypeDescription

      public String getTypeDescription()
      Return a string describing this type.
      Specified by:
      getTypeDescription in class Type
    • getTypeName

      public String getTypeName(boolean useQualifiedNames, boolean useIDLNames, boolean globalIDLNames)
      Return the name of this type. For arrays, will include "[]" if useIDLNames == false.
      Overrides:
      getTypeName in class Type
      Parameters:
      useQualifiedNames - If true, print qualified names; otherwise, print unqualified names.
      useIDLNames - If true, print IDL names; otherwise, print java names.
      globalIDLNames - If true and useIDLNames true, prepends "::".
    • swapInvalidTypes

      protected void swapInvalidTypes()
      Convert all invalid types to valid ones.
      Overrides:
      swapInvalidTypes in class Type
    • addTypes

      protected boolean addTypes(int typeCodeFilter, HashSet checked, Vector matching)
      Overrides:
      addTypes in class Type
    • loadClass

      protected Class loadClass()
      Specified by:
      loadClass in class Type
    • destroy

      protected void destroy()
      Release all resources
      Overrides:
      destroy in class Type