Class MethodInfo

java.lang.Object
com.jme3.network.service.rmi.MethodInfo

public final class MethodInfo extends Object
Internal information about shared methods. This is part of the data that is passed over the wire when an object is shared.
Author:
Paul Speed
  • Field Details

    • NULL_INFO

      public static final MethodInfo NULL_INFO
      Sentinel used to represent a null method info entry.
  • Constructor Details

    • MethodInfo

      public MethodInfo()
      For serialization only.
    • MethodInfo

      public MethodInfo(short id, Method m)
      Creates metadata for a shared method.
      Parameters:
      id - the shared method id
      m - the reflected method
  • Method Details

    • invoke

      public Object invoke(Object target, Object... parms)
      Invokes the reflected method on the specified target.
      Parameters:
      target - the invocation target
      parms - the invocation parameters
      Returns:
      the invocation result
    • getId

      public short getId()
      Returns the shared method id.
      Returns:
      the method id
    • getCallType

      public CallType getCallType()
      Returns the call type for the shared method.
      Returns:
      the call type
    • matches

      public boolean matches(Method m)
      Returns true if the reflected method matches this method metadata.
      Parameters:
      m - the reflected method to compare
      Returns:
      true if the method signatures match
    • methodToString

      public static String methodToString(Method m)
      Converts a reflected method into its serialized signature representation.
      Parameters:
      m - the reflected method
      Returns:
      the serialized signature
    • getCallType

      public static CallType getCallType(Method m)
      Resolves the call type for a reflected method.
      Parameters:
      m - the reflected method
      Returns:
      the call type
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object