javassist.util.proxy

Class RuntimeSupport

public class RuntimeSupport extends Object

Runtime support routines that the classes generated by ProxyFactory use.

See Also: ProxyFactory

Field Summary
static MethodHandlerdefault_interceptor
A method handler that only executes a method.
Method Summary
static MethodfindMethod(Object self, String name, String desc)
Finds a method with the given name and descriptor.
static MethodfindSuperMethod(Object self, String name, String desc)
Finds a method that has the given name and descriptor and is declared in the super class.
static StringmakeDescriptor(Method m)
Makes a descriptor for a given method.
static StringmakeDescriptor(Class[] params, Class retType)
Makes a descriptor for a given method.
static SerializedProxymakeSerializedProxy(Object proxy)
Converts a proxy object to an object that is writable to an object stream.

Field Detail

default_interceptor

public static MethodHandler default_interceptor
A method handler that only executes a method.

Method Detail

findMethod

public static Method findMethod(Object self, String name, String desc)
Finds a method with the given name and descriptor. It searches only the class of self.

Throws: RuntimeException if the method is not found.

findSuperMethod

public static Method findSuperMethod(Object self, String name, String desc)
Finds a method that has the given name and descriptor and is declared in the super class.

Throws: RuntimeException if the method is not found.

makeDescriptor

public static String makeDescriptor(Method m)
Makes a descriptor for a given method.

makeDescriptor

public static String makeDescriptor(Class[] params, Class retType)
Makes a descriptor for a given method.

Parameters: params parameter types. retType return type.

makeSerializedProxy

public static SerializedProxy makeSerializedProxy(Object proxy)
Converts a proxy object to an object that is writable to an object stream. This method is called by writeReplace() in a proxy class.

Since: 3.4

Javassist, a Java-bytecode translator toolkit.
Copyright (C) 1999-2006 Shigeru Chiba. All Rights Reserved.