Package ftbsc.lll.proxies.impl
Class MethodProxy
- java.lang.Object
-
- ftbsc.lll.proxies.AbstractProxy
-
- ftbsc.lll.proxies.impl.MethodProxy
-
public class MethodProxy extends AbstractProxy
A container for information about class methods to be used in ASM patching.- Since:
- 0.3.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MethodProxy.Builder
A builder object forMethodProxy
.
-
Field Summary
Fields Modifier and Type Field Description TypeProxy[]
parameters
An array ofTypeProxy
each representing the parameters of the method.TypeProxy
returnType
TheTypeProxy
for the return type of the method.-
Fields inherited from class ftbsc.lll.proxies.AbstractProxy
descriptor, modifiers, name, parent, proxyType
-
-
Constructor Summary
Constructors Modifier Constructor Description MethodProxy(java.lang.reflect.Method m)
A public constructor, builds a proxy from aMethod
obtained from reflection.protected
MethodProxy(java.lang.String name, int modifiers, QualifiableProxy parent, org.objectweb.asm.Type[] parameters, org.objectweb.asm.Type returnType)
A protected constructor, called only from the builder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MethodProxy.Builder
builder(java.lang.String name)
Returns a new instance ofMethodProxy.Builder
.boolean
equals(java.lang.Object obj)
Indicates whether the given object is a proxy for the same element as this.
-
-
-
Constructor Detail
-
MethodProxy
protected MethodProxy(java.lang.String name, int modifiers, QualifiableProxy parent, org.objectweb.asm.Type[] parameters, org.objectweb.asm.Type returnType)
A protected constructor, called only from the builder.- Parameters:
name
- the name of the methodmodifiers
- the modifiers of the methodparent
- theQualifiableProxy
for the parentparameters
- the parameters of the methodreturnType
- the return type of the method
-
MethodProxy
public MethodProxy(java.lang.reflect.Method m)
A public constructor, builds a proxy from aMethod
obtained from reflection.- Parameters:
m
- theMethod
object corresponding to this.
-
-
Method Detail
-
builder
public static MethodProxy.Builder builder(java.lang.String name)
Returns a new instance ofMethodProxy.Builder
.- Parameters:
name
- the name of the method- Returns:
- the builder object for method proxies
-
equals
public boolean equals(java.lang.Object obj)
Indicates whether the given object is a proxy for the same element as this.- Overrides:
equals
in classAbstractProxy
- Parameters:
obj
- the object to perform- Returns:
- true if it's equal
-
-