Liferay 6.2-ce-ga5

com.liferay.portal.kernel.util
Class MethodKey

java.lang.Object
  extended by com.liferay.portal.kernel.util.MethodKey
All Implemented Interfaces:
Externalizable, Serializable

public class MethodKey
extends Object
implements Externalizable

Provides a serializable loose representation for Method, considering the declaring class, name, and parameter types of the Method, while ignoring its return type and exceptions. This means the compiler generated bridging method is considered logically the same as it source counterpart. On deserialization for a generic Method, the Method that is resolved (bridge method or source method) is runtime environment dependent. Whether it is resolved to a bridge method or source method is of no consequence, as a force cast is performed on the method's return value, assuring the same result.

See Also:
Serialized Form

Constructor Summary
MethodKey()
          The empty constructor is required by Externalizable.
MethodKey(Class<?> declaringClass, String methodName, Class<?>... parameterTypes)
           
MethodKey(Method method)
           
MethodKey(String declaringClassName, String methodName, Class<?>... parameterTypes)
          Deprecated. As of 6.2.0, replaced by MethodKey(Class, String, Class...)
 
Method Summary
 boolean equals(Object obj)
           
 Class<?> getDeclaringClass()
           
 Method getMethod()
           
 String getMethodName()
           
 Class<?>[] getParameterTypes()
           
 int hashCode()
           
 void readExternal(ObjectInput objectInput)
           
 String toString()
           
 MethodKey transform(ClassLoader classLoader)
           
 void writeExternal(ObjectOutput objectOutput)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodKey

public MethodKey()
The empty constructor is required by Externalizable. Do not use this for any other purpose.


MethodKey

public MethodKey(Class<?> declaringClass,
                 String methodName,
                 Class<?>... parameterTypes)

MethodKey

public MethodKey(Method method)

MethodKey

public MethodKey(String declaringClassName,
                 String methodName,
                 Class<?>... parameterTypes)
Deprecated. As of 6.2.0, replaced by MethodKey(Class, String, Class...)

Method Detail

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getDeclaringClass

public Class<?> getDeclaringClass()

getMethod

public Method getMethod()
                 throws NoSuchMethodException
Throws:
NoSuchMethodException

getMethodName

public String getMethodName()

getParameterTypes

public Class<?>[] getParameterTypes()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

readExternal

public void readExternal(ObjectInput objectInput)
                  throws ClassNotFoundException,
                         IOException
Specified by:
readExternal in interface Externalizable
Throws:
ClassNotFoundException
IOException

toString

public String toString()
Overrides:
toString in class Object

transform

public MethodKey transform(ClassLoader classLoader)
                    throws ClassNotFoundException
Throws:
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput objectOutput)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

Liferay 6.2-ce-ga5