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 Details

    • M_OVERLOADED

      protected final byte M_OVERLOADED
      Flags a method as overloaded.
      See Also:
    • M_READ

      protected final byte M_READ
      Flags a method as the accessor of a read-write property.
      See Also:
    • M_WRITE

      protected final byte M_WRITE
      Flags a method as the mutator of a read-write property.
      See Also:
    • M_READONLY

      protected final byte M_READONLY
      Flags a method as the accessor of a read-only property.
      See Also:
    • M_INHERITED

      protected final byte M_INHERITED
      Flags a method as being inherited.
      See Also:
    • M_WRITEOBJECT

      protected final byte M_WRITEOBJECT
      Flags a method as being the writeObject() method used for serialization.
      See Also:
    • F_CONSTANT

      protected final byte F_CONSTANT
      Flags a field as being a constant (public final static).
      See Also:
    • F_SPFFIELD

      protected final byte F_SPFFIELD
      Flags a field as being the special public final static java.io.ObjectStreamField[] serialPersistentFields field.
      See Also:
    • 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 entries i where (m_flags[i]&M_READ) != 0 are 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 Details

    • ContainerAnalysis

      protected ContainerAnalysis(Class cls)
  • Method Details

    • 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 the fields and f_flags arrays.
    • analyzeInterfaces

      protected void analyzeInterfaces() throws RMIIIOPViolationException
      Analyze the interfaces of the class. This will fill in the interfaces array.
      Throws:
      RMIIIOPViolationException
    • analyzeMethods

      protected void analyzeMethods()
      Analyze the methods of the class. This will fill in the methods and m_flags arrays.
    • 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 RMIIIOPViolationException
      Analyse constants. This will fill in the constants array.
      Throws:
      RMIIIOPViolationException
    • analyzeAttributes

      protected void analyzeAttributes() throws RMIIIOPViolationException
      Analyse attributes. This will fill in the attributes array.
      Throws:
      RMIIIOPViolationException
    • analyzeOperations

      protected void analyzeOperations() throws RMIIIOPViolationException
      Analyse operations. This will fill in the operations array. This implementation just creates an empty array; override in subclasses for a real analysis.
      Throws:
      RMIIIOPViolationException
    • fixupOverloadedOperationNames

      protected void fixupOverloadedOperationNames() throws RMIIIOPViolationException
      Fixup overloaded operation names. As specified in section 1.3.2.6.
      Throws:
      RMIIIOPViolationException
    • fixupCaseNames

      protected void fixupCaseNames() throws RMIIIOPViolationException
      Fixup 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.
    • escapeIRName

      protected String escapeIRName(String name)
      Escape non-ISO characters for an IR name.
    • 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.