|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.openorb.util.RepoIDHelper
This class provides helper methods for repositiory id handling.
| Field Summary | |
static int |
TYPE_DEFAULT_FACTORY
A default factory type (???). |
static int |
TYPE_HELPER
A helper class type (ITFHelper.java). |
static int |
TYPE_HOLDER
A holder class type (ITFHolder.java). |
static int |
TYPE_IMPLBASE
An implbase class type (ITFImplBase.java (BOA)). |
static int |
TYPE_OPERATIONS
A operations class type (ITFOperations.java). |
static int |
TYPE_PLAIN
A plain class type (ITF.java). |
static int |
TYPE_POA
A POA class type (ITFPOA.java). |
static int |
TYPE_POATIE
A POA tie class type (ITFPOATie.java). |
static int |
TYPE_STUB
A stub class type (ITFStub.java). |
static int |
TYPE_TIE
A tie class type (_ITFTie.java). |
| Method Summary | |
static long |
calculateStructuralHash(Class clz)
Calculate the structural hash code as described in 10.6.2 RMI Hashed Format. |
static boolean |
checkID(String id)
This methods checks whether the passed repository identifier is valid or not. |
static boolean |
checkIdentifier(String name)
This methods checks an indetifier for validity in the target language. |
static Object |
createIsATest(String id)
This returns an object which can be used to test if some other repository ID is an instance of this one. |
static String |
decorate(String name,
int type)
This methods decorates a class name with the suffixes depending on the type of the class about to be created. |
static String[] |
extractClassName(Class clz)
Mangle the java class name into the package and class name parts. |
static String |
getRepoID(Class clz)
The syntax of the repository ID is the standard OMG RMI Hashed format (10.6.2 RMI Hashed Format) with an initial "RMI:" followed by the Java class name, followed by a hash code string, followed optionally by a serialization Version UID string. |
static long |
getRepoIDHash(Class clz)
The syntax of the repository ID is the standard OMG RMI Hashed format (10.6.2 RMI Hashed Format) with an initial "RMI:" followed by the Java class name, followed by a hash code string, followed optionally by a serialization Version UID string. |
static String |
idToClass(String name)
This method tries to extract the class name from the repository id. |
static String |
idToClass(String name,
int type)
This method tries to extract the class name from the repository id. |
static String |
idToClassname(String name)
Convert the repository id to a class name. |
static String |
idToPackage(String name)
Extract the Java package name from the IDL repository identifier. |
static String[] |
mangleClassName(Class clz)
Mangle the java classname, replacing non latin-1 chars with unicode escapes. |
static void |
mangleMemberNames(Class clz,
String[] memberNames)
Mangle the member names. |
static String |
unmangleClassName(String className)
Unmangle the java classname, replacing the escapes with unicode chars. |
static String |
unmangleRepoIDtoClassName(String repoID)
Unmangle the repo ID into the class name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int TYPE_PLAIN
public static final int TYPE_STUB
public static final int TYPE_HELPER
public static final int TYPE_HOLDER
public static final int TYPE_DEFAULT_FACTORY
public static final int TYPE_OPERATIONS
public static final int TYPE_IMPLBASE
public static final int TYPE_POA
public static final int TYPE_POATIE
public static final int TYPE_TIE
| Method Detail |
public static String decorate(String name,
int type)
name - The class name to be decorated.type - The type of the class about to be created.public static boolean checkID(String id)
id - The repository id to check.public static boolean checkIdentifier(String name)
([a-z][A-Z])+([a-z][A-Z_][0-9])*.name - The identifier to check.public static String idToPackage(String name)
name - The repository id to extract the package name from.public static String idToClassname(String name)
name - The repository id to extract the class name from.public static String idToClass(String name)
name - The repository id name.
public static String idToClass(String name,
int type)
name - The repository id name.type - The type of the class to create.public static Object createIsATest(String id)
Examples:
RepoIDHelper.createIsATest( "IDL:MyObj:1.0" ).equals(
"IDL:MyObj:1.0" ) == true
RepoIDHelper.createIsATest( "IDL:MyObj:1.1" ).equals(
"IDL:MyObj:1.0" ) == true
RepoIDHelper.createIsATest( "IDL:MyObj:1.0" ).equals(
"IDL:MyObj:1.1" ) == false
RepoIDHelper.createIsATest( "IDL:MyObj:2.0" ).equals(
"IDL:MyObj:1.1" ) == false
id - The repository id to test.public static String[] mangleClassName(Class clz)
clz - The class name to mangle.public static String unmangleClassName(String className)
className - The class name to unmangle.public static String[] extractClassName(Class clz)
clz - The fully qualified class name.
public static void mangleMemberNames(Class clz,
String[] memberNames)
clz - The class name to check for member name collisions.memberNames - The members to mangle.public static String unmangleRepoIDtoClassName(String repoID)
repoID - The repository id to unmangle.public static String getRepoID(Class clz)
public static long getRepoIDHash(Class clz)
public static long calculateStructuralHash(Class clz)
clz - The class to calculate the structural hash code for.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||