public static enum MethodLookupEngine.Default extends Enum<MethodLookupEngine.Default> implements MethodLookupEngine
Class.getMethods()
.
However, conflicting interface methods are represented by
MethodLookupEngine.ConflictingInterfaceMethod
instances.Modifier and Type | Class and Description |
---|---|
static class |
MethodLookupEngine.Default.Factory
A factory for creating
MethodLookupEngine.Default lookup
engines. |
protected static class |
MethodLookupEngine.Default.MethodBucket
A method bucket is used to identify unique methods of all super types and interfaces of a given type.
|
MethodLookupEngine.ConflictingInterfaceMethod, MethodLookupEngine.Default, MethodLookupEngine.Finding, MethodLookupEngine.OverriddenClassMethod
Enum Constant and Description |
---|
DEFAULT_LOOKUP_DISABLED
A default implementation of a method lookup engine that does not look up Java 8 default methods.
|
DEFAULT_LOOKUP_ENABLED
A default implementation of a method lookup engine that looks up Java 8 default methods.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Map<TypeDescription,Set<MethodDescription>> |
apply(MethodLookupEngine.Default.MethodBucket methodBucket,
Collection<TypeDescription> interfaces,
Collection<TypeDescription> defaultMethodRelevantInterfaces)
Applies default method extraction.
|
MethodLookupEngine.Finding |
process(TypeDescription typeDescription)
Retrieves all methods that can be called on a given type.
|
String |
toString() |
static MethodLookupEngine.Default |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MethodLookupEngine.Default[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MethodLookupEngine.Default DEFAULT_LOOKUP_ENABLED
public static final MethodLookupEngine.Default DEFAULT_LOOKUP_DISABLED
public static MethodLookupEngine.Default[] values()
for (MethodLookupEngine.Default c : MethodLookupEngine.Default.values()) System.out.println(c);
public static MethodLookupEngine.Default valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic MethodLookupEngine.Finding process(TypeDescription typeDescription)
MethodLookupEngine
Class.getMethods()
, methods of identical
signature of incompatible interfaces must only be returned once. These methods should be represented by some
sort of virtual method description which is fully aware of its state. All virtually invokable methods must be
contained in this lookup. Static methods, constructors and private methods must however only be contained
for the actual class's type.
The
process
in interface MethodLookupEngine
typeDescription
- The type for which all invokable methods should be looked up.protected abstract Map<TypeDescription,Set<MethodDescription>> apply(MethodLookupEngine.Default.MethodBucket methodBucket, Collection<TypeDescription> interfaces, Collection<TypeDescription> defaultMethodRelevantInterfaces)
methodBucket
- The method bucket that is used for performing a method extraction.interfaces
- The interfaces of the instrumented type.defaultMethodRelevantInterfaces
- The interfaces of the instrumented type that are relevant for
default method extraction.public String toString()
toString
in class Enum<MethodLookupEngine.Default>
Copyright © 2014–2015. All rights reserved.