Package org.wildfly.iiop.openjdk.rmi
Class ContainerAnalysis
- java.lang.Object
-
- org.wildfly.iiop.openjdk.rmi.ClassAnalysis
-
- org.wildfly.iiop.openjdk.rmi.ContainerAnalysis
-
- Direct Known Subclasses:
InterfaceAnalysis,ValueAnalysis
public abstract class ContainerAnalysis extends ClassAnalysis
Common base class of ValueAnalysis and InterfaceAnalysis. Routines here are conforming to the "Java(TM) Language to IDL Mapping Specification", version 1.1 (01-06-07).- Version:
- $Revision: 63378 $
- Author:
- Ole Husgaard, Dimitris Andreadis
-
-
Field Summary
Fields Modifier and Type Field Description protected ValueAnalysis[]abstractBaseValuetypesArray of analysis of the abstract base valuetypes implemented/extended here.protected AttributeAnalysis[]attributesArray of attributes.protected longclassHashCodeThe class hash code, as specified in "The Common Object Request Broker: Architecture and Specification" (01-02-33), section 10.6.2.protected ConstantAnalysis[]constantsArray of Constants.protected byteF_CONSTANTFlags a field as being a constant (public final static).protected byte[]f_flagsArray with flags for all java fields.protected byteF_SPFFIELDFlags a field as being the specialpublic final static java.io.ObjectStreamField[] serialPersistentFieldsfield.protected Field[]fieldsArray of all java fields.protected InterfaceAnalysis[]interfacesArray of analysis of the interfaces implemented/extended here.protected byte[]m_flagsArray with flags for all java methods.protected byteM_INHERITEDFlags a method as being inherited.protected byteM_OVERLOADEDFlags a method as overloaded.protected byteM_READFlags a method as the accessor of a read-write property.protected byteM_READONLYFlags a method as the accessor of a read-only property.protected byteM_WRITEFlags a method as the mutator of a read-write property.protected byteM_WRITEOBJECTFlags a method as being the writeObject() method used for serialization.protected StringmemberPostfixThe prefix and postfix of members repository ID.protected StringmemberPrefixThe prefix and postfix of members repository ID.protected Method[]methodsArray of all java methods.protected int[]mutatorsIndex of the mutator for read-write attributes.protected OperationAnalysis[]operationsArray of operations.protected StringrepositoryIdThe repository ID.-
Fields inherited from class org.wildfly.iiop.openjdk.rmi.ClassAnalysis
cls
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedContainerAnalysis(Class cls)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidanalyzeAttributes()Analyse attributes.protected voidanalyzeConstants()Analyse constants.protected voidanalyzeFields()Analyze the fields of the class.protected voidanalyzeInterfaces()Analyze the interfaces of the class.protected voidanalyzeMethods()Analyze the methods of the class.protected voidanalyzeOperations()Analyse operations.protected StringattributeReadName(String name)Convert an attribute read method name in Java format to an attribute name in Java format.protected StringattributeWriteName(String name)Convert an attribute write method name in Java format to an attribute name in Java format.protected voidcalculateClassHashCode()Return the class hash code, as specified in "The Common Object Request Broker: Architecture and Specification" (01-02-33), section 10.6.2.protected voidcalculateRepositoryId()Return the IR global ID of the given class or interface.protected voiddoAnalyze()protected StringescapeIRName(String name)Escape non-ISO characters for an IR name.protected voidfixupCaseNames()Fixup names differing only in case.protected voidfixupOverloadedOperationNames()Fixup overloaded operation names.ValueAnalysis[]getAbstractBaseValuetypes()Return the abstract base valuetypes.AttributeAnalysis[]getAttributes()Return the attributes.ConstantAnalysis[]getConstants()Return the constants.protected abstract ArrayListgetContainedEntries()Return a list of all the entries contained here.StringgetIDLModuleName()Return the fully qualified IDL module name that this analysis should be placed in.StringgetIDLName()Return my unqualified IDL name.InterfaceAnalysis[]getInterfaces()Return the interfaces.StringgetJavaName()Return my unqualified java name.StringgetMemberRepositoryId(String memberName)Return a repository ID for a member.OperationAnalysis[]getOperations()Return the operations.StringgetRepositoryId()Return the repository ID.protected booleanhasNonAppExceptions(Method m)Check if a method throws anything checked other than java.rmi.RemoteException and its subclasses.protected booleanisAccessor(Method m)Check if a method is an accessor.protected booleanisMutator(Method m)Check if a method is a mutator.protected StringtoHexString(int i)Convert an integer to a 16-digit hex string.protected StringtoHexString(long l)Convert a long to a 16-digit hex string.-
Methods inherited from class org.wildfly.iiop.openjdk.rmi.ClassAnalysis
getCls
-
-
-
-
Field Detail
-
M_OVERLOADED
protected final byte M_OVERLOADED
Flags a method as overloaded.- See Also:
- Constant Field Values
-
M_READ
protected final byte M_READ
Flags a method as the accessor of a read-write property.- See Also:
- Constant Field Values
-
M_WRITE
protected final byte M_WRITE
Flags a method as the mutator of a read-write property.- See Also:
- Constant Field Values
-
M_READONLY
protected final byte M_READONLY
Flags a method as the accessor of a read-only property.- See Also:
- Constant Field Values
-
M_INHERITED
protected final byte M_INHERITED
Flags a method as being inherited.- See Also:
- Constant Field Values
-
M_WRITEOBJECT
protected final byte M_WRITEOBJECT
Flags a method as being the writeObject() method used for serialization.- See Also:
- Constant Field Values
-
F_CONSTANT
protected final byte F_CONSTANT
Flags a field as being a constant (public final static).- See Also:
- Constant Field Values
-
F_SPFFIELD
protected final byte F_SPFFIELD
Flags a field as being the specialpublic final static java.io.ObjectStreamField[] serialPersistentFieldsfield.- See Also:
- Constant Field Values
-
methods
protected Method[] methods
Array of all java methods.
-
m_flags
protected byte[] m_flags
Array with flags for all java methods.
-
mutators
protected int[] mutators
Index of the mutator for read-write attributes. Only entriesiwhere(m_flags[i]&M_READ) != 0are used. These entries contain the index of the mutator method corresponding to the accessor method.
-
fields
protected Field[] fields
Array of all java fields.
-
f_flags
protected byte[] f_flags
Array with flags for all java fields.
-
classHashCode
protected long classHashCode
The class hash code, as specified in "The Common Object Request Broker: Architecture and Specification" (01-02-33), section 10.6.2.
-
repositoryId
protected String repositoryId
The repository ID. This is in the RMI hashed format, like "RMI:java.util.Hashtable:C03324C0EA357270:13BB0F25214AE4B8".
-
memberPrefix
protected String memberPrefix
The prefix and postfix of members repository ID. These are used to calculate member repository IDs and are like "RMI:java.util.Hashtable." and ":C03324C0EA357270:13BB0F25214AE4B8".
-
memberPostfix
protected String memberPostfix
The prefix and postfix of members repository ID. These are used to calculate member repository IDs and are like "RMI:java.util.Hashtable." and ":C03324C0EA357270:13BB0F25214AE4B8".
-
interfaces
protected InterfaceAnalysis[] interfaces
Array of analysis of the interfaces implemented/extended here.
-
abstractBaseValuetypes
protected ValueAnalysis[] abstractBaseValuetypes
Array of analysis of the abstract base valuetypes implemented/extended here.
-
attributes
protected AttributeAnalysis[] attributes
Array of attributes.
-
constants
protected ConstantAnalysis[] constants
Array of Constants.
-
operations
protected OperationAnalysis[] operations
Array of operations.
-
-
Constructor Detail
-
ContainerAnalysis
protected ContainerAnalysis(Class cls)
-
-
Method Detail
-
doAnalyze
protected void doAnalyze() throws RMIIIOPViolationException- Throws:
RMIIIOPViolationException
-
getInterfaces
public InterfaceAnalysis[] getInterfaces()
Return the interfaces.
-
getAbstractBaseValuetypes
public ValueAnalysis[] getAbstractBaseValuetypes()
Return the abstract base valuetypes.
-
getAttributes
public AttributeAnalysis[] getAttributes()
Return the attributes.
-
getConstants
public ConstantAnalysis[] getConstants()
Return the constants.
-
getOperations
public OperationAnalysis[] getOperations()
Return the operations.
-
getRepositoryId
public String getRepositoryId()
Return the repository ID.
-
getMemberRepositoryId
public String getMemberRepositoryId(String memberName)
Return a repository ID for a member.- Parameters:
memberName- The Java name of the member.
-
getIDLModuleName
public String getIDLModuleName()
Return the fully qualified IDL module name that this analysis should be placed in.
-
toHexString
protected String toHexString(int i)
Convert an integer to a 16-digit hex string.
-
toHexString
protected String toHexString(long l)
Convert a long to a 16-digit hex string.
-
isAccessor
protected boolean isAccessor(Method m)
Check if a method is an accessor.
-
isMutator
protected boolean isMutator(Method m)
Check if a method is a mutator.
-
hasNonAppExceptions
protected boolean hasNonAppExceptions(Method m)
Check if a method throws anything checked other than java.rmi.RemoteException and its subclasses.
-
analyzeFields
protected void analyzeFields()
Analyze the fields of the class. This will fill in thefieldsandf_flagsarrays.
-
analyzeInterfaces
protected void analyzeInterfaces() throws RMIIIOPViolationExceptionAnalyze the interfaces of the class. This will fill in theinterfacesarray.- Throws:
RMIIIOPViolationException
-
analyzeMethods
protected void analyzeMethods()
Analyze the methods of the class. This will fill in themethodsandm_flagsarrays.
-
attributeReadName
protected String attributeReadName(String name)
Convert an attribute read method name in Java format to an attribute name in Java format.
-
attributeWriteName
protected String attributeWriteName(String name)
Convert an attribute write method name in Java format to an attribute name in Java format.
-
analyzeConstants
protected void analyzeConstants() throws RMIIIOPViolationExceptionAnalyse constants. This will fill in theconstantsarray.- Throws:
RMIIIOPViolationException
-
analyzeAttributes
protected void analyzeAttributes() throws RMIIIOPViolationExceptionAnalyse attributes. This will fill in theattributesarray.- Throws:
RMIIIOPViolationException
-
analyzeOperations
protected void analyzeOperations() throws RMIIIOPViolationExceptionAnalyse operations. This will fill in theoperationsarray. This implementation just creates an empty array; override in subclasses for a real analysis.- Throws:
RMIIIOPViolationException
-
fixupOverloadedOperationNames
protected void fixupOverloadedOperationNames() throws RMIIIOPViolationExceptionFixup overloaded operation names. As specified in section 1.3.2.6.- Throws:
RMIIIOPViolationException
-
fixupCaseNames
protected void fixupCaseNames() throws RMIIIOPViolationExceptionFixup names differing only in case. As specified in section 1.3.2.7.- Throws:
RMIIIOPViolationException
-
getContainedEntries
protected abstract ArrayList getContainedEntries()
Return a list of all the entries contained here.
-
calculateClassHashCode
protected void calculateClassHashCode()
Return the class hash code, as specified in "The Common Object Request Broker: Architecture and Specification" (01-02-33), section 10.6.2.
-
calculateRepositoryId
protected void calculateRepositoryId()
Return the IR global ID of the given class or interface. This is described in section 1.3.5.7. The returned string is in the RMI hashed format, like "RMI:java.util.Hashtable:C03324C0EA357270:13BB0F25214AE4B8".
-
getIDLName
public String getIDLName()
Return my unqualified IDL name.
-
getJavaName
public String getJavaName()
Return my unqualified java name.
-
-