Top Description Inners Fields Constructors Methods
org.springframework.aot.hint

public final Class ExecutableHint

extends MemberHint
implements Comparable<ExecutableHint>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
java.lang.reflect.Constructor, .Executable, .Method, java.util.Comparator, .List, java.util.function.Consumer, java.util.stream.Collectors, org.springframework.lang.Nullable, org.springframework.util.Assert

A hint that describes the need for reflection on a Method or Constructor.
Author
Stephane Nicoll
Since
6.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final ExecutableMode
private final List<TypeReference>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Consumer<ExecutableHint.Builder>

Returns:

a consumer to apply the mode
builtWith
(ExecutableMode
the mode to apply
mode
)

Return a Consumer that applies the given ExecutableMode to the accepted Builder.

public int
compareTo(ExecutableHint
the object to be compared.
other
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public ExecutableMode

Returns:

the mode
getMode
()

Return the mode that applies to this hint.

public List<TypeReference>

Returns:

the parameter types
getParameterTypes
()

Return the parameter types of the executable.

pack-priv static ExecutableHint.Builder

Returns:

a builder
ofConstructor
(List<TypeReference>
the parameter types of the constructor
parameterTypes
)

Initialize a builder with the parameter types of a constructor.

pack-priv static ExecutableHint.Builder

Returns:

a builder
ofMethod
(String
the name of the method
name
,
List<TypeReference>
the parameter types of the method
parameterTypes
)

Initialize a builder with the name and parameter types of a method.

Inherited from org.springframework.aot.hint.MemberHint:
getName

Field Detail

modeback to summary
private final ExecutableMode mode
parameterTypesback to summary
private final List<TypeReference> parameterTypes

Constructor Detail

ExecutableHintback to summary
private ExecutableHint(ExecutableHint.Builder builder)

Method Detail

builtWithback to summary
public static Consumer<ExecutableHint.Builder> builtWith(ExecutableMode mode)

Return a Consumer that applies the given ExecutableMode to the accepted Builder.

Parameters
mode:ExecutableMode

the mode to apply

Returns:Consumer<ExecutableHint.Builder>

a consumer to apply the mode

compareToback to summary
public int compareTo(ExecutableHint other)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
other:ExecutableHint

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
getModeback to summary
public ExecutableMode getMode()

Return the mode that applies to this hint.

Returns:ExecutableMode

the mode

getParameterTypesback to summary
public List<TypeReference> getParameterTypes()

Return the parameter types of the executable.

Returns:List<TypeReference>

the parameter types

See Also
Executable#getParameterTypes()
ofConstructorback to summary
pack-priv static ExecutableHint.Builder ofConstructor(List<TypeReference> parameterTypes)

Initialize a builder with the parameter types of a constructor.

Parameters
parameterTypes:List<TypeReference>

the parameter types of the constructor

Returns:ExecutableHint.Builder

a builder

ofMethodback to summary
pack-priv static ExecutableHint.Builder ofMethod(String name, List<TypeReference> parameterTypes)

Initialize a builder with the name and parameter types of a method.

Parameters
name:String

the name of the method

parameterTypes:List<TypeReference>

the parameter types of the method

Returns:ExecutableHint.Builder

a builder

org.springframework.aot.hint back to summary

public Class ExecutableHint.Builder

extends Object
Class Inheritance

Builder for ExecutableHint.

Field Summary

Modifier and TypeField and Description
private ExecutableMode
private final String
private final List<TypeReference>

Constructor Summary

AccessConstructor and Description
pack-priv
Builder(String name, List<TypeReference> parameterTypes)

Method Summary

Modifier and TypeMethod and Description
pack-priv ExecutableHint

Returns:

an executable hint
build
()

Create an ExecutableHint based on the state of this builder.

public ExecutableHint.Builder

Returns:

this, to facilitate method chaining
withMode
(ExecutableMode
the required mode
mode
)

Specify that the mode is required.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

modeback to summary
private ExecutableMode mode
Annotations
@Nullable
nameback to summary
private final String name
parameterTypesback to summary
private final List<TypeReference> parameterTypes

Constructor Detail

Builderback to summary
pack-priv Builder(String name, List<TypeReference> parameterTypes)

Method Detail

buildback to summary
pack-priv ExecutableHint build()

Create an ExecutableHint based on the state of this builder.

Returns:ExecutableHint

an executable hint

withModeback to summary
public ExecutableHint.Builder withMode(ExecutableMode mode)

Specify that the mode is required.

Parameters
mode:ExecutableMode

the required mode

Returns:ExecutableHint.Builder

this, to facilitate method chaining