Class RepositoryId

java.lang.Object
com.sun.corba.ee.impl.util.RepositoryId

public class RepositoryId extends Object
  • Field Details

    • IDL_IDENTIFIER_CHARS

      public static final byte[] IDL_IDENTIFIER_CHARS
    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • defaultServerURL

      private static final String defaultServerURL
    • useCodebaseOnly

      private static final boolean useCodebaseOnly
    • classToRepStr

      private static final Map<Class<?>,String> classToRepStr
    • classIDLToRepStr

      private static final Map<Class<?>,String> classIDLToRepStr
    • classSeqToRepStr

      private static final Map<Class<?>,String> classSeqToRepStr
    • repStrToByteArray

      private static final Map<String,byte[]> repStrToByteArray
    • repStrToClass

      private static final Map<String,Class<?>> repStrToClass
    • repId

      private String repId
    • isSupportedFormat

      private boolean isSupportedFormat
    • typeString

      private String typeString
    • versionString

      private String versionString
    • isSequence

      private boolean isSequence
    • isRMIValueType

      private boolean isRMIValueType
    • isIDLType

      private boolean isIDLType
    • completeClassName

      private String completeClassName
    • unqualifiedName

      private String unqualifiedName
    • definedInId

      private String definedInId
    • clazz

      private Class clazz
    • suid

      private String suid
    • actualSuid

      private String actualSuid
    • suidLong

      private long suidLong
    • actualSuidLong

      private long actualSuidLong
    • kSequenceKeyword

      private static final String kSequenceKeyword
      See Also:
    • kValuePrefix

      private static final String kValuePrefix
      See Also:
    • kIDLPrefix

      private static final String kIDLPrefix
      See Also:
    • kIDLNamePrefix

      private static final String kIDLNamePrefix
      See Also:
    • kIDLClassnamePrefix

      private static final String kIDLClassnamePrefix
      See Also:
    • kSequencePrefix

      private static final String kSequencePrefix
      See Also:
    • kCORBAPrefix

      private static final String kCORBAPrefix
      See Also:
    • kArrayPrefix

      private static final String kArrayPrefix
      See Also:
    • kValuePrefixLength

      private static final int kValuePrefixLength
    • kIDLPrefixLength

      private static final int kIDLPrefixLength
    • kSequencePrefixLength

      private static final int kSequencePrefixLength
    • kInterfaceHashCode

      private static final String kInterfaceHashCode
      See Also:
    • kInterfaceOnlyHashStr

      private static final String kInterfaceOnlyHashStr
      See Also:
    • kExternalizableHashStr

      private static final String kExternalizableHashStr
      See Also:
    • kInitialValueTag

      public static final int kInitialValueTag
      See Also:
    • kNoTypeInfo

      public static final int kNoTypeInfo
      See Also:
    • kSingleRepTypeInfo

      public static final int kSingleRepTypeInfo
      See Also:
    • kPartialListTypeInfo

      public static final int kPartialListTypeInfo
      See Also:
    • kChunkedMask

      public static final int kChunkedMask
      See Also:
    • kPreComputed_StandardRMIUnchunked

      public static final int kPreComputed_StandardRMIUnchunked
    • kPreComputed_CodeBaseRMIUnchunked

      public static final int kPreComputed_CodeBaseRMIUnchunked
    • kPreComputed_StandardRMIChunked

      public static final int kPreComputed_StandardRMIChunked
    • kPreComputed_CodeBaseRMIChunked

      public static final int kPreComputed_CodeBaseRMIChunked
    • kPreComputed_StandardRMIUnchunked_NoRep

      public static final int kPreComputed_StandardRMIUnchunked_NoRep
    • kPreComputed_CodeBaseRMIUnchunked_NoRep

      public static final int kPreComputed_CodeBaseRMIUnchunked_NoRep
    • kPreComputed_StandardRMIChunked_NoRep

      public static final int kPreComputed_StandardRMIChunked_NoRep
    • kPreComputed_CodeBaseRMIChunked_NoRep

      public static final int kPreComputed_CodeBaseRMIChunked_NoRep
    • kWStringValueVersion

      public static final String kWStringValueVersion
      See Also:
    • kWStringValueHash

      public static final String kWStringValueHash
      See Also:
    • kWStringStubValue

      public static final String kWStringStubValue
      See Also:
    • kWStringTypeStr

      public static final String kWStringTypeStr
      See Also:
    • kWStringValueRepID

      public static final String kWStringValueRepID
      See Also:
    • kAnyRepID

      public static final String kAnyRepID
      See Also:
    • kClassDescValueHash

      public static final String kClassDescValueHash
    • kClassDescStubValue

      public static final String kClassDescStubValue
      See Also:
    • kClassDescTypeStr

      public static final String kClassDescTypeStr
      See Also:
    • kClassDescValueRepID

      public static final String kClassDescValueRepID
    • kObjectValueHash

      public static final String kObjectValueHash
      See Also:
    • kObjectStubValue

      public static final String kObjectStubValue
      See Also:
    • kSequenceValueHash

      public static final String kSequenceValueHash
      See Also:
    • kPrimitiveSequenceValueHash

      public static final String kPrimitiveSequenceValueHash
      See Also:
    • kSerializableValueHash

      public static final String kSerializableValueHash
      See Also:
    • kSerializableStubValue

      public static final String kSerializableStubValue
      See Also:
    • kExternalizableValueHash

      public static final String kExternalizableValueHash
      See Also:
    • kExternalizableStubValue

      public static final String kExternalizableStubValue
      See Also:
    • kRemoteValueHash

      public static final String kRemoteValueHash
      See Also:
    • kRemoteStubValue

      public static final String kRemoteStubValue
      See Also:
    • kRemoteTypeStr

      public static final String kRemoteTypeStr
      See Also:
    • kRemoteValueRepID

      public static final String kRemoteValueRepID
      See Also:
    • kSpecialArrayTypeStrings

      public static final Hashtable<String,StringBuffer> kSpecialArrayTypeStrings
    • kSpecialCasesRepIDs

      public static final Hashtable<Class<?>,String> kSpecialCasesRepIDs
    • kSpecialCasesStubValues

      public static final Hashtable<Class<?>,String> kSpecialCasesStubValues
    • kSpecialCasesVersions

      public static final Hashtable<Class<?>,String> kSpecialCasesVersions
    • kSpecialCasesClasses

      public static final Hashtable<String,Class<?>> kSpecialCasesClasses
    • kSpecialCasesArrayPrefix

      public static final Hashtable<Class<?>,String> kSpecialCasesArrayPrefix
    • kSpecialPrimitives

      public static final Hashtable<String,String> kSpecialPrimitives
    • ASCII_HEX

      private static final byte[] ASCII_HEX
      Used to convert ascii to hex.
    • cache

      public static final RepositoryIdCache cache
    • kjava_rmi_Remote

      public static final String kjava_rmi_Remote
    • korg_omg_CORBA_Object

      public static final String korg_omg_CORBA_Object
  • Constructor Details

    • RepositoryId

      RepositoryId()
    • RepositoryId

      RepositoryId(String aRepId)
  • Method Details

    • init

      RepositoryId init(String aRepId)
    • getUnqualifiedName

      public final String getUnqualifiedName()
    • getDefinedInId

      public final String getDefinedInId()
    • getTypeString

      public final String getTypeString()
    • getVersionString

      public final String getVersionString()
    • getSerialVersionUID

      public final String getSerialVersionUID()
    • getActualSerialVersionUID

      public final String getActualSerialVersionUID()
    • getSerialVersionUIDAsLong

      public final long getSerialVersionUIDAsLong()
    • getActualSerialVersionUIDAsLong

      public final long getActualSerialVersionUIDAsLong()
    • isRMIValueType

      public final boolean isRMIValueType()
    • isIDLType

      public final boolean isIDLType()
    • getRepositoryId

      public final String getRepositoryId()
    • getByteArray

      public static byte[] getByteArray(String repStr)
    • setByteArray

      public static void setByteArray(String repStr, byte[] repStrBytes)
    • isSequence

      public final boolean isSequence()
    • isSupportedFormat

      public final boolean isSupportedFormat()
    • getClassName

      public final String getClassName()
    • getAnyClassFromType

      public final Class<?> getAnyClassFromType() throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • getClassFromType

      public final Class<?> getClassFromType() throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • getClassFromType

      public final Class<?> getClassFromType(Class<?> expectedType, String codebase) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • getClassFromType

      public final Class<?> getClassFromType(String url) throws ClassNotFoundException, MalformedURLException
      Throws:
      ClassNotFoundException
      MalformedURLException
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • useFullValueDescription

      public static boolean useFullValueDescription(Class clazz, String repositoryID) throws IOException
      Checks to see if the FullValueDescription should be retrieved.
      Parameters:
      clazz - The type to get description for
      repositoryID - The repository ID
      Returns:
      If full description should be retrieved
      Throws:
      IOException - If suids do not match or if the repositoryID is not an RMIValueType.
    • useFullValueDescription

      public static boolean useFullValueDescription(Class<?> clazz, ClassInfoCache.ClassInfo cinfo, String repositoryID) throws IOException
      Checks to see if the FullValueDescription should be retrieved.
      Parameters:
      clazz - The type to get description for
      cinfo - The ClassInfo for the type.
      repositoryID - The repository ID
      Returns:
      If full description should be retrieved
      Throws:
      IOException - If suids do not match or if the repositoryID is not an RMIValueType.
    • createHashString

      private static String createHashString(Class<?> clazz)
    • createSequenceRepID

      public static String createSequenceRepID(Object ser)
      Creates a repository ID for a sequence. This is for expert users only as this method assumes the object passed is an array. If passed an object that is not an array, it will produce a rep id for a sequence of zero length. This would be an error.
      Parameters:
      ser - The Java object to create a repository ID for
      Returns:
      Created repository ID
    • createSequenceRepID

      public static String createSequenceRepID(Class<?> clazz)
      Creates a repository ID for a sequence. This is for expert users only as this method assumes the object passed is an array. If passed an object that is not an array, it will produce a malformed rep id.
      Parameters:
      clazz - The Java class to create a repository ID for
      Returns:
      Created repository ID
    • createForSpecialCase

      public static String createForSpecialCase(Class<?> clazz)
    • createForSpecialCase

      public static String createForSpecialCase(Class<?> clazz, ClassInfoCache.ClassInfo cinfo)
    • createForSpecialCase

      public static String createForSpecialCase(Serializable ser)
    • createForJavaType

      public static String createForJavaType(Serializable ser) throws TypeMismatchException
      Creates a repository ID for a normal Java Type.
      Parameters:
      ser - The Java object to create a repository ID for
      Returns:
      Created repository ID
      Throws:
      TypeMismatchException - if ser implements the org.omg.CORBA.portable.IDLEntity interface which indicates it is an IDL Value type.
    • createForJavaType

      public static String createForJavaType(Class<?> clz) throws TypeMismatchException
      Throws:
      TypeMismatchException
    • createForJavaType

      public static String createForJavaType(Class<?> clz, ClassInfoCache.ClassInfo cinfo) throws TypeMismatchException
      Creates a repository ID for a normal Java Type.
      Parameters:
      clz - The Java class to create a repository ID for
      cinfo - ClassInfo; may be null
      Returns:
      Created repository ID
      Throws:
      TypeMismatchException - if ser implements the * org.omg.CORBA.portable.IDLEntity interface which indicates it is an IDL Value type.
    • createForIDLType

      public static String createForIDLType(Class<?> ser, int major, int minor) throws TypeMismatchException
      Creates a repository ID for an IDL Java Type.
      Parameters:
      ser - The IDL Value object to create a repository ID for
      major - The major version number
      minor - The minor version number
      Returns:
      Created repository ID
      Throws:
      TypeMismatchException - if ser does not implement the org.omg.CORBA.portable.IDLEntity interface which indicates it is an IDL Value type.
    • getIdFromHelper

      private static String getIdFromHelper(Class<?> clazz)
    • createForAnyType

      public static String createForAnyType(Class<?> type)
    • createForAnyType

      public static String createForAnyType(Class<?> type, ClassInfoCache.ClassInfo cinfo)
      Createa a repository ID for the type if it is either a java type or an IDL type.
      Parameters:
      type - The type to create rep. id for
      cinfo - The ClassInfo for the type (pre-computed elsewhere to save time)
      Returns:
      The rep. id.
    • isAbstractBase

      public static boolean isAbstractBase(Class<?> clazz)
    • isAnyRequired

      public static boolean isAnyRequired(Class clazz)
    • fromHex

      public static long fromHex(String hexNumber)
    • convertToISOLatin1

      public static String convertToISOLatin1(String name)
      Convert strings with illegal IDL identifier characters.

      Section 5.5.7 of OBV spec.

      Parameters:
      name - String to convert
      Returns:
      Converted String
    • convertFromISOLatin1

      private static String convertFromISOLatin1(String name)
      Convert strings with ISO Latin 1 escape sequences back to original strings.

      Section 5.5.7 of OBV spec.

    • delete

      private static String delete(String str, int from, int to)
    • replace

      private static String replace(String target, String arg, String source)
    • computeValueTag

      public static int computeValueTag(boolean codeBasePresent, int typeInfo, boolean chunkedEncoding)
    • isCodeBasePresent

      public static boolean isCodeBasePresent(int value_tag)
    • getTypeInfo

      public static int getTypeInfo(int value_tag)
    • isChunkedEncoding

      public static boolean isChunkedEncoding(int value_tag)
    • getServerURL

      public static String getServerURL()