Package | Description |
---|---|
com.headius.invokebinder |
Modifier and Type | Method and Description |
---|---|
Signature |
Signature.appendArg(String name,
Class<?> type)
Append an argument (name + type) to the signature.
|
Signature |
Signature.appendArgs(String[] names,
Class<?>... types)
Append an argument (name + type) to the signature.
|
Signature |
Signature.argName(int index,
String name)
Set the argument name at the given index.
|
Signature |
Signature.argType(int index,
Class<?> type)
Set the argument type at the given index.
|
Signature |
Signature.asFold(Class<?> retval)
Produce a new signature based on this one with a different return type.
|
Signature |
SmartBinder.baseSignature()
Get the signature this binder started with.
|
Signature |
Signature.changeReturn(Class<?> retval)
Create a new signature based on this one with a different return type.
|
Signature |
Signature.collect(String newName,
String oldPattern)
Collect sequential arguments matching pattern into an array.
|
Signature |
Signature.dropArg(int index)
Drops the argument at the given index.
|
Signature |
Signature.dropArg(String name)
Drops the first argument with the given name.
|
Signature |
Signature.dropFirst()
Drop the first argument from this signature.
|
Signature |
Signature.dropFirst(int n)
Drop the specified number of first arguments from this signature.
|
Signature |
Signature.dropLast()
Drop the last argument from this signature.
|
Signature |
Signature.dropLast(int n)
Drop the specified number of last arguments from this signature.
|
Signature |
Signature.exclude(String... excludeArgs)
Create a new signature containing the same return value as this one, but
omitting the specified arguments.
|
static Signature |
Signature.from(Class<?> retval,
Class<?>[] argTypes,
String... argNames)
Create a new signature based on the given return value, argument types, and argument names
|
Signature |
Signature.insertArg(int index,
String name,
Class<?> type)
Insert an argument (name + type) into the signature.
|
Signature |
Signature.insertArg(String beforeName,
String name,
Class<?> type)
Insert an argument (name + type) into the signature before the argument
with the given name.
|
Signature |
Signature.insertArgs(int index,
String[] names,
Class<?>... types)
Insert arguments (names + types) into the signature.
|
Signature |
Signature.insertArgs(String beforeName,
String[] names,
Class<?>... types)
Insert arguments (names + types) into the signature before the argument
with the given name.
|
Signature |
Signature.permute(String... permuteArgs)
Create a new signature containing the same return value as this one, but
only the specified arguments.
|
Signature |
Signature.prependArg(String name,
Class<?> type)
Prepend an argument (name + type) to the signature.
|
Signature |
Signature.prependArgs(String[] names,
Class<?>... types)
Prepend arguments (names + types) to the signature.
|
Signature |
Signature.replaceArg(String oldName,
String newName,
Class<?> newType)
Replace the named argument with a new name and type.
|
static Signature |
Signature.returning(Class<?> retval)
Create a new signature returning the given type.
|
Signature |
SmartHandle.signature()
Get the Signature of this SmartHandle.
|
Signature |
SmartBinder.signature()
Get the current Signature for this binder.
|
Signature |
Signature.spread(String... names)
Spread the trailing [] argument into its component type assigning given names.
|
Signature |
Signature.spread(String[] names,
Class<?>... types)
Spread the trailing [] argument into its component type assigning given names.
|
Signature |
Signature.spread(String baseName,
int count)
Spread the trailing [] argument into its component type assigning given names.
|
Modifier and Type | Method and Description |
---|---|
SmartHandle |
SmartHandle.cast(Signature incoming)
Create a new SmartHandle that casts arguments from the given signature to
the current signature's type with the new argument names.
|
SmartBinder |
SmartBinder.cast(Signature target)
Cast the incoming arguments to the types in the given signature.
|
SmartHandle |
SmartHandle.convert(Signature incoming)
Create a new SmartHandle that converts arguments from the given signature to
the current signature's type with the new argument names.
|
static SmartHandle |
SmartHandle.findStaticQuiet(MethodHandles.Lookup lookup,
Class<?> target,
String name,
Signature signature)
Create a new SmartHandle by performing a lookup on the given target class
for the given method name with the given signature.
|
static SmartBinder |
SmartBinder.from(MethodHandles.Lookup lookup,
Signature inbound)
Create a new SmartBinder from the given Signature, using the given
Lookup for any handle lookups.
|
static SmartBinder |
SmartBinder.from(Signature inbound)
Create a new SmartBinder from the given Signature.
|
static SmartHandle |
SmartHandle.from(Signature signature,
MethodHandle handle)
Create a new SmartHandle from the given Signature and MethodHandle.
|
SmartBinder |
SmartBinder.permute(Signature target)
Using the argument names and order in the target Signature, permute the
arguments in this SmartBinder.
|
int[] |
Signature.to(Signature other)
Generate an array of argument offsets based on permuting this signature
to the given signature.
|
Copyright © 2017. All rights reserved.