Package com.headius.invokebinder
Class SmartBinder
java.lang.Object
com.headius.invokebinder.SmartBinder
Maintains both a Binder, for building a series of transformations, and a
current Signature that maps symbolic names to arguments.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
SmartBinder
(Signature start, Binder binder) private
SmartBinder
(SmartBinder original, Signature next, Binder binder) -
Method Summary
Modifier and TypeMethodDescriptionarrayGet()
arraySet()
binder()
castReturn
(Class type) Permute all parameters except the names given.filterReturn
(SmartHandle filter) filterReturn
(MethodHandle filter) fold
(String newName, SmartHandle function) fold
(String newName, MethodHandle function) foldStatic
(String newName, Class target, String method) foldStatic
(String newName, MethodHandles.Lookup lookup, Class target, String method) foldVirtual
(String newName, MethodHandles.Lookup lookup, String method) foldVirtual
(String newName, String method) foldVoid
(SmartHandle function) foldVoid
(MethodHandle function) static SmartBinder
static SmartBinder
from
(MethodHandles.Lookup lookup, Signature inbound) invoke
(SmartHandle target) invoke
(MethodHandle target) invoker()
Produce a SmartHandle from this binder that invokes a leading MethodHandle argument with the remaining arguments.invokeStaticQuiet
(MethodHandles.Lookup lookup, Class target, String name) invokeVirtualQuiet
(MethodHandles.Lookup lookup, String name) Spread a trailing Object[] into the specified argument types.
-
Field Details
-
start
-
signatures
-
binder
-
-
Constructor Details
-
SmartBinder
-
SmartBinder
-
-
Method Details
-
signature
-
binder
-
from
-
from
-
fold
-
fold
-
foldVoid
-
foldVoid
-
foldStatic
public SmartBinder foldStatic(String newName, MethodHandles.Lookup lookup, Class target, String method) -
foldStatic
-
foldVirtual
-
foldVirtual
-
permute
-
permute
-
exclude
Permute all parameters except the names given. Blacklisting to #permute's whitelisting.- Parameters:
excludeNames
-- Returns:
- a new SmartBinder
-
spread
Spread a trailing Object[] into the specified argument types.- Parameters:
spreadTypes
- the types into which to spread the incoming Object[]- Returns:
- a new Binder
-
spread
-
insert
-
insert
-
insert
-
insert
-
insert
-
insert
-
insert
-
insert
-
insert
-
insert
-
append
-
append
-
append
-
append
-
append
-
append
-
append
-
append
-
append
-
append
-
prepend
-
prepend
-
prepend
-
prepend
-
prepend
-
prepend
-
prepend
-
prepend
-
prepend
-
prepend
-
cast
-
cast
-
castArg
-
castReturn
-
filterReturn
-
filterReturn
-
invokeVirtualQuiet
-
invokeStaticQuiet
-
invoke
-
invoke
-
printSignature
-
arrayGet
-
arraySet
-
invoker
Produce a SmartHandle from this binder that invokes a leading MethodHandle argument with the remaining arguments.- Returns:
- a SmartHandle that invokes its leading MethodHandle argument
-