Class RemoteClass.Method

java.lang.Object
org.glassfish.rmic.RemoteClass.Method
All Implemented Interfaces:
Cloneable
Enclosing class:
RemoteClass

public class RemoteClass.Method extends Object implements Cloneable
A RemoteClass.Method object encapsulates RMI-specific information about a particular remote method in the remote implementation class represented by the outer instance.
  • Field Details

    • memberDef

      private MemberDefinition memberDef
      Member definition for this method, from one of the remote interfaces that this method was found in. Note that this member definition may be only one of several member defintions that correspond to this remote method object, if several of this class's remote interfaces contain methods with the same name and type signature. Therefore, this member definition may declare more exceptions thrown that this remote method does.
    • methodHash

      private long methodHash
      stub "method hash" to identify this method
    • exceptions

      private ClassDeclaration[] exceptions
      Exceptions declared to be thrown by this remote method. This list can include superfluous entries, such as unchecked exceptions and subclasses of other entries.
  • Constructor Details

    • Method

      Method(MemberDefinition memberDef)
      Create a new Method object corresponding to the given method definition.
  • Method Details

    • getMemberDefinition

      public MemberDefinition getMemberDefinition()
      Return the definition of the actual class member corresponing to this method of a remote interface. REMIND: Can this method be removed?
    • getName

      public Identifier getName()
      Return the name of this method.
    • getType

      public Type getType()
      Return the type of this method.
    • getExceptions

      public ClassDeclaration[] getExceptions()
      Return an array of the exception classes declared to be thrown by this remote method. For methods with the same name and type signature inherited from multiple remote interfaces, the array will contain the set of exceptions declared in all of the interfaces' methods that can be legally thrown in each of them.
    • getMethodHash

      public long getMethodHash()
      Return the "method hash" used to identify this remote method in the JDK 1.2 version of the stub protocol.
    • toString

      public String toString()
      Return the string representation of this method.
      Overrides:
      toString in class Object
    • getOperationString

      public String getOperationString()
      Return the string representation of this method appropriate for the construction of a java.rmi.server.Operation object.
    • getNameAndDescriptor

      public String getNameAndDescriptor()
      Return a string consisting of this method's name followed by its method descriptor, using the Java VM's notation for method descriptors (see section 4.3.3 of The Java Virtual Machine Specification).
    • clone

      protected Object clone()
      Cloning is supported by returning a shallow copy of this object.
      Overrides:
      clone in class Object
    • mergeWith

      private RemoteClass.Method mergeWith(RemoteClass.Method other)
      Return a new Method object that is a legal combination of this method object and another one. This requires determining the exceptions declared by the combined method, which must be (only) all of the exceptions declared in both old Methods that may thrown in either of them.
    • collectCompatibleExceptions

      private void collectCompatibleExceptions(ClassDeclaration[] from, ClassDeclaration[] with, Vector<ClassDeclaration> list) throws ClassNotFound
      Add to the supplied list all exceptions in the "from" array that are subclasses of an exception in the "with" array.
      Throws:
      ClassNotFound
    • computeMethodHash

      private long computeMethodHash()
      Compute the "method hash" of this remote method. The method hash is a long containing the first 64 bits of the SHA digest from the UTF encoded string of the method name and descriptor. REMIND: Should this method share implementation code with the outer class's computeInterfaceHash() method?