Class IDLTypesUtil

java.lang.Object
com.sun.corba.ee.impl.presentation.rmi.IDLTypesUtil

public final class IDLTypesUtil extends Object
Utility class for testing RMI/IDL Types as defined in Section 1.2 of The Java Language to IDL Mapping. Note that these are static checks only. Runtime checks, such as those described in Section 1.2.3, #3, are not covered.
  • Field Details

  • Constructor Details

    • IDLTypesUtil

      public IDLTypesUtil()
  • Method Details

    • validateRemoteInterface

      public void validateRemoteInterface(Class c) throws IDLTypeException
      Validate a class to ensure it conforms to the rules for a Java RMI/IIOP interface.
      Parameters:
      c - Class to validate
      Throws:
      IDLTypeException - if not a valid RMI/IIOP interface.
    • isRemoteInterface

      public boolean isRemoteInterface(Class c)
      Checks if a class if a valid Java RMI/IIOP interface
      Parameters:
      c - Class to check
      Returns:
      If it is a remote interface
    • isPrimitive

      public boolean isPrimitive(Class c)
      Section 1.2.2 Primitive Types Checks if a class is a primitive type
      Parameters:
      c - Class to check
      Returns:
      If the class is a primitive type.
      See Also:
    • isValue

      public boolean isValue(Class c)
      Section 1.2.4 Checks if a class is a Serializable value
      Parameters:
      c - class to check
      Returns:
      if the class is Serializable
    • isArray

      public boolean isArray(Class c)
      Section 1.2.5 Checks if a class is an array of a primitive, Remote Interface, IDLEntity, Exception, Serializable value or CORBA Object.
      Parameters:
      c - Class to check
      Returns:
      If the class is an array
    • isException

      public boolean isException(Class c)
      Section 1.2.6 Checks if a class is an Exception
      Parameters:
      c - Class to check if it is an exception.
      Returns:
      True if a subclass of Exception
    • isRemoteException

      public boolean isRemoteException(Class c)
    • isCheckedException

      public boolean isCheckedException(Class c)
    • isObjectReference

      public boolean isObjectReference(Class c)
      Section 1.2.7 If the class is a CORBA Object
      Parameters:
      c - class to check if it is a CORBA Object
      Returns:
      if it is an object.
    • isEntity

      public boolean isEntity(Class c)
      Section 1.2.8 Checks if a class is assignable to IDLEntity
      Parameters:
      c - Class to check if it is an entity
      Returns:
      if the class is an entity.
    • isPropertyAccessorMethod

      public boolean isPropertyAccessorMethod(Method method, Class clazz)
      Return true if given method is legal property accessor as defined in Section 1.3.4.3 of Java2IDL spec.
      Parameters:
      method - Method to check
      clazz - Class containing method
      Returns:
      If method if a legal accessor.
    • getAttributeNameForProperty

      public String getAttributeNameForProperty(String propertyName)
    • getPrimitiveIDLTypeMapping

      public IDLType getPrimitiveIDLTypeMapping(Class c)
      Return IDL Type name for primitive types as defined in Section 1.3.3 of Java2IDL spec or null if not a primitive type.
      Parameters:
      c - the class to get the mapping for
      Returns:
      the IDLType of the primitive, or null if the class is not a primitive.
    • getSpecialCaseIDLTypeMapping

      public IDLType getSpecialCaseIDLTypeMapping(Class c)
      Return IDL Type name for special case type mappings as defined in Table 1-1 of Java2IDL spec or null if given class is not a special type.
      Parameters:
      c - class to get special case mapping for
      Returns:
      The IDLType for the special case, or null if it is not a special case.