Class IDLTypesUtil
java.lang.Object
com.sun.corba.ee.impl.presentation.rmi.IDLTypesUtil
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeNameForProperty(String propertyName) Return IDL Type name for primitive types as defined in Section 1.3.3 of Java2IDL spec or null if not a primitive type.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.private booleanhasCorrespondingReadProperty(Method writeProperty, Class c, String readPropertyPrefix) booleanSection 1.2.5 Checks if a class is an array of a primitive, Remote Interface,IDLEntity,Exception,Serializablevalue or CORBAObject.booleanbooleanSection 1.2.8 Checks if a class is assignable toIDLEntitybooleanisException(Class c) Section 1.2.6 Checks if a class is anExceptionprivate booleanisHasCorrespondingReadProperty(Method readProperty, Class c) booleanSection 1.2.7 If the class is a CORBAObjectbooleanisPrimitive(Class c) Section 1.2.2 Primitive Types Checks if a class is a primitive typebooleanisPropertyAccessorMethod(Method method, Class clazz) Return true if given method is legal property accessor as defined in Section 1.3.4.3 of Java2IDL spec.booleanprivate booleanImplements Section 1.2.3, #2.booleanChecks if a class if a valid Java RMI/IIOP interfacebooleanSection 1.2.4 Checks if a class is aSerializablevalueprivate booleanreadHasCorrespondingIsProperty(Method readProperty, Class c) private voidImplements 1.2.3 #6private voidImplements Section 1.2.3, #5.private voidvalidateExceptions(Method method) Implements 1.2.3 #2 and #4voidValidate a class to ensure it conforms to the rules for a Java RMI/IIOP interface.private booleanvalidPropertyExceptions(Method method) Returns true if the method's throw clause conforms to the exception restrictions for properties as defined in Section 1.3.4.3 of Java2IDL spec.
-
Field Details
-
GET_PROPERTY_PREFIX
- See Also:
-
SET_PROPERTY_PREFIX
- See Also:
-
IS_PROPERTY_PREFIX
- See Also:
-
VALID_TYPE
public static final int VALID_TYPE- See Also:
-
INVALID_TYPE
public static final int INVALID_TYPE- See Also:
-
FOLLOW_RMIC
public static final boolean FOLLOW_RMIC- See Also:
-
-
Constructor Details
-
IDLTypesUtil
public IDLTypesUtil()
-
-
Method Details
-
validateRemoteInterface
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
Checks if a class if a valid Java RMI/IIOP interface- Parameters:
c- Class to check- Returns:
- If it is a remote interface
-
isPrimitive
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
Section 1.2.4 Checks if a class is aSerializablevalue- Parameters:
c- class to check- Returns:
- if the class is Serializable
-
isArray
Section 1.2.5 Checks if a class is an array of a primitive, Remote Interface,IDLEntity,Exception,Serializablevalue or CORBAObject.- Parameters:
c- Class to check- Returns:
- If the class is an array
-
isException
-
isRemoteException
-
isCheckedException
-
isObjectReference
-
isEntity
-
isPropertyAccessorMethod
-
hasCorrespondingReadProperty
-
readHasCorrespondingIsProperty
-
isHasCorrespondingReadProperty
-
getAttributeNameForProperty
-
getPrimitiveIDLTypeMapping
-
getSpecialCaseIDLTypeMapping
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
nullif it is not a special case.
-
validateExceptions
Implements 1.2.3 #2 and #4- Throws:
IDLTypeException
-
validPropertyExceptions
Returns true if the method's throw clause conforms to the exception restrictions for properties as defined in Section 1.3.4.3 of Java2IDL spec. This means that for all exceptions E declared on the method, E isChecked => RemoteException.isAssignableFrom( E ). -
isRemoteExceptionOrSuperClass
Implements Section 1.2.3, #2. -
validateDirectInterfaces
Implements Section 1.2.3, #5.- Throws:
IDLTypeException
-
validateConstants
Implements 1.2.3 #6- Throws:
IDLTypeException
-