Class CompoundType

java.lang.Object
org.glassfish.rmic.iiop.Type
org.glassfish.rmic.iiop.CompoundType
All Implemented Interfaces:
Cloneable, Constants, Constants, ContextElement, Constants, RuntimeConstants
Direct Known Subclasses:
ClassType, InterfaceType

public abstract class CompoundType extends Type
A CompoundType is an abstract base class for all IIOP class and interface types.
  • Field Details

    • methods

      protected CompoundType.Method[] methods
    • interfaces

      protected InterfaceType[] interfaces
    • members

      protected CompoundType.Member[] members
    • classDef

      protected ClassDefinition classDef
    • classDecl

      protected ClassDeclaration classDecl
    • isCORBAObject

      protected boolean isCORBAObject
    • isIDLEntity

      protected boolean isIDLEntity
    • isAbstractBase

      protected boolean isAbstractBase
    • isValueBase

      protected boolean isValueBase
    • isCORBAUserException

      protected boolean isCORBAUserException
    • isException

      protected boolean isException
    • isCheckedException

      protected boolean isCheckedException
    • isRemoteExceptionOrSubclass

      protected boolean isRemoteExceptionOrSubclass
    • idlExceptionName

      protected String idlExceptionName
    • qualifiedIDLExceptionName

      protected String qualifiedIDLExceptionName
  • Constructor Details

    • CompoundType

      protected CompoundType(ContextStack stack, int typeCode, ClassDefinition classDef)
      Create a CompoundType instance for the given class. NOTE: This constructor is ONLY for SpecialClassType and SpecialInterfaceType.
    • CompoundType

      protected CompoundType(ContextStack stack, ClassDefinition classDef, int typeCode)
      Create a CompoundType instance for the given class. The resulting object is not yet completely initialized.
  • Method Details

    • isCORBAObject

      public boolean isCORBAObject()
      Return true if this type implements org.omg.CORBA.Object.
    • isIDLEntity

      public boolean isIDLEntity()
      Return true if this type implements org.omg.CORBA.portable.IDLEntity.
    • isValueBase

      public boolean isValueBase()
      Return true if this type implements org.omg.CORBA.portable.ValueBase.
    • isAbstractBase

      public boolean isAbstractBase()
      Return true if this type is a CORBA abstract interface.
    • isException

      public boolean isException()
      Return true if this type is an exception.
    • isCheckedException

      public boolean isCheckedException()
      Return true if this type is a "checked" exception. Result if valid iff isException() returns true.
    • isRemoteExceptionOrSubclass

      public boolean isRemoteExceptionOrSubclass()
      Return true if this type is a java.rmi.RemoteException or one of its subclasses. Result if valid iff isException() returns true.
    • isCORBAUserException

      public boolean isCORBAUserException()
      Return true if this type is exactly org.omg.CORBA.UserException.
    • isIDLEntityException

      public boolean isIDLEntityException()
      Return true if this type implements isIDLEntity() && isException().
    • isBoxed

      public boolean isBoxed()
      Return true if isIDLEntity() && !isValueBase() && !isAbstractBase() && !isCORBAObject() && !isIDLEntityException().
    • getIDLExceptionName

      public String getIDLExceptionName()
      If this type represents an exception, return the IDL name including the "Ex" mangling, otherwise return null.
    • getQualifiedIDLExceptionName

      public String getQualifiedIDLExceptionName(boolean global)
      If this type represents an exception, return the qualified IDL name including the "Ex" mangling, otherwise return null.
      Parameters:
      global - If true, prepends "::".
    • 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
    • getClassDeclaration

      public ClassDeclaration getClassDeclaration()
      Return the ClassDeclaration for this type.
    • getClassDefinition

      public ClassDefinition getClassDefinition()
      Return the ClassDefinition for this type.
    • getSuperclass

      public ClassType getSuperclass()
      Return the parent class of this type. Returns null if this type is an interface or if there is no parent.
    • getInterfaces

      public InterfaceType[] getInterfaces()
      Return an array of interfaces directly implemented by this type.

      The order of the array returned is arbitrary.

    • getMethods

      public CompoundType.Method[] getMethods()
      Return an array of Type.Method objects representing all of the methods implemented directly by this type.
    • getMembers

      public CompoundType.Member[] getMembers()
      Return an array of Type.Member objects representing all of the data members directly implemented by this interface.
    • forCompound

      static CompoundType forCompound(ClassDefinition classDef, ContextStack stack)
      Create a CompoundType object for the given class. 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.
    • destroy

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

      protected Class<?> loadClass()
      Specified by:
      loadClass in class Type
    • printExtends

      protected boolean printExtends(IndentingWriter writer, boolean useQualifiedNames, boolean useIDLNames, boolean globalIDLNames) throws IOException
      Throws:
      IOException
    • printImplements

      protected void printImplements(IndentingWriter writer, String prefix, boolean useQualifiedNames, boolean useIDLNames, boolean globalIDLNames) throws IOException
      Throws:
      IOException
    • printMembers

      protected void printMembers(IndentingWriter writer, boolean useQualifiedNames, boolean useIDLNames, boolean globalIDLNames) throws IOException
      Throws:
      IOException
    • printMethods

      protected void printMethods(IndentingWriter writer, boolean useQualifiedNames, boolean useIDLNames, boolean globalIDLNames) throws IOException
      Throws:
      IOException
    • printMethod

      protected void printMethod(CompoundType.Method it, IndentingWriter writer, boolean useQualifiedNames, boolean useIDLNames, boolean globalIDLNames) throws IOException
      Throws:
      IOException
    • setFlags

      private void setFlags()
    • initialize

      protected boolean initialize(Vector<InterfaceType> directInterfaces, Vector<CompoundType.Method> directMethods, Vector<CompoundType.Member> directMembers, ContextStack stack, boolean quiet)
      Initialize this instance.
    • makeType

      protected static Type makeType(Type theType, ClassDefinition classDef, ContextStack stack)
    • isRemoteException

      public static boolean isRemoteException(ClassType ex, BatchEnvironment env)
    • isConformingRemoteMethod

      protected boolean isConformingRemoteMethod(CompoundType.Method method, boolean quiet) throws ClassNotFound
      Throws:
      ClassNotFound
    • isIDLEntityException

      protected boolean isIDLEntityException(Type type, CompoundType.Method method, boolean quiet) throws ClassNotFound
      Throws:
      ClassNotFound
    • swapInvalidTypes

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

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

      private boolean isConformingConstantType(MemberDefinition member)
    • isConformingConstantType

      private boolean isConformingConstantType(Type theType, MemberDefinition member)
    • updateParentClassMethods

      protected Vector<CompoundType.Method> updateParentClassMethods(ClassDefinition current, Vector<CompoundType.Method> currentMethods, boolean quiet, ContextStack stack) throws ClassNotFound
      Throws:
      ClassNotFound
    • addAllMethods

      protected Vector<CompoundType.Method> addAllMethods(ClassDefinition current, Vector<CompoundType.Method> directMethods, boolean noMultiInheritedMethods, boolean quiet, ContextStack stack) throws ClassNotFound
      Throws:
      ClassNotFound
    • inheritsFrom

      protected boolean inheritsFrom(ContextStack stack, ClassDefinition def, ClassDefinition otherDef) throws ClassNotFound
      Throws:
      ClassNotFound
    • addRemoteInterfaces

      protected Vector<InterfaceType> addRemoteInterfaces(Vector<InterfaceType> list, boolean allowNonConforming, ContextStack stack) throws ClassNotFound
      Throws:
      ClassNotFound
    • addNonRemoteInterfaces

      protected Vector<InterfaceType> addNonRemoteInterfaces(Vector<InterfaceType> list, ContextStack stack) throws ClassNotFound
      Throws:
      ClassNotFound
    • addAllMembers

      protected boolean addAllMembers(Vector<CompoundType.Member> allMembers, boolean onlyConformingConstants, boolean quiet, ContextStack stack)
    • addConformingConstants

      protected boolean addConformingConstants(Vector<CompoundType.Member> allMembers, boolean quiet, ContextStack stack)
    • getMethodExceptions

      protected ValueType[] getMethodExceptions(MemberDefinition member, boolean quiet, ContextStack stack) throws Exception
      Throws:
      Exception
    • getVisibilityString

      protected static String getVisibilityString(MemberDefinition member)
    • assertNotImpl

      protected boolean assertNotImpl(Type type, boolean quiet, ContextStack stack, CompoundType enclosing, boolean dataMember)