Package | Description |
---|---|
com.comphenix.protocol.reflect | |
com.comphenix.protocol.reflect.fuzzy | |
com.comphenix.protocol.reflect.instances | |
com.comphenix.protocol.utility |
Modifier and Type | Method and Description |
---|---|
java.lang.reflect.Constructor<?> |
FuzzyReflection.getConstructor(AbstractFuzzyMatcher<MethodInfo> matcher)
Retrieve the first constructor that matches.
|
java.util.List<java.lang.reflect.Constructor<?>> |
FuzzyReflection.getConstructorList(AbstractFuzzyMatcher<MethodInfo> matcher)
Retrieve a list of every constructor that matches the given matcher.
|
java.lang.reflect.Field |
FuzzyReflection.getField(AbstractFuzzyMatcher<java.lang.reflect.Field> matcher)
Retrieve the first field that matches.
|
java.util.List<java.lang.reflect.Field> |
FuzzyReflection.getFieldList(AbstractFuzzyMatcher<java.lang.reflect.Field> matcher)
Retrieve a list of every field that matches the given matcher.
|
java.lang.reflect.Method |
FuzzyReflection.getMethod(AbstractFuzzyMatcher<MethodInfo> matcher)
Retrieve the first method that matches.
|
java.util.List<java.lang.reflect.Method> |
FuzzyReflection.getMethodList(AbstractFuzzyMatcher<MethodInfo> matcher)
Retrieve a list of every method that matches the given matcher.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractFuzzyMember<T extends java.lang.reflect.Member>
Represents a matcher that matches members.
|
class |
FuzzyClassContract
Determine if a given class implements a given fuzzy (duck typed) contract.
|
class |
FuzzyFieldContract
Represents a field matcher.
|
class |
FuzzyMethodContract
Represents a contract for matching methods or constructors.
|
Modifier and Type | Field and Description |
---|---|
protected AbstractFuzzyMatcher<java.lang.Class<?>> |
AbstractFuzzyMember.declaringMatcher |
Modifier and Type | Method and Description |
---|---|
AbstractFuzzyMatcher<T> |
AbstractFuzzyMatcher.and(AbstractFuzzyMatcher<T> other)
Require that this and the given matcher be TRUE.
|
AbstractFuzzyMatcher<java.lang.Class<?>> |
AbstractFuzzyMember.getDeclaringMatcher()
Retrieve a class matcher for the declaring class of the member.
|
AbstractFuzzyMatcher<java.lang.Class<?>> |
FuzzyMethodContract.getReturnMatcher()
Retrieve the class matcher for the return type.
|
AbstractFuzzyMatcher<java.lang.Class<?>> |
FuzzyFieldContract.getTypeMatcher()
Retrieve the class matcher that matches the type of a field.
|
AbstractFuzzyMatcher<T> |
AbstractFuzzyMatcher.inverted()
Create a fuzzy matcher that returns the opposite result of the current matcher.
|
static AbstractFuzzyMatcher<java.lang.Class<?>> |
FuzzyMatchers.matchAll()
Retrieve a fuzzy matcher that will match any class.
|
static AbstractFuzzyMatcher<java.lang.Class<?>> |
FuzzyMatchers.matchAnyOf(java.lang.Class<?>... classes)
Construct a class matcher that matches any of the given classes exactly.
|
static AbstractFuzzyMatcher<java.lang.Class<?>> |
FuzzyMatchers.matchAnyOf(java.util.Set<java.lang.Class<?>> classes)
Construct a class matcher that matches any of the given classes exactly.
|
static AbstractFuzzyMatcher<java.lang.Class<?>> |
FuzzyMatchers.matchArray(AbstractFuzzyMatcher<java.lang.Class<?>> componentMatcher)
Construct a class matcher that matches an array with a given component matcher.
|
static AbstractFuzzyMatcher<java.lang.Class<?>> |
FuzzyMatchers.matchDerived(java.lang.Class<?> matcher)
Construct a class matcher that matches derived types of the given class.
|
static AbstractFuzzyMatcher<java.lang.Class<?>> |
FuzzyMatchers.matchExact(java.lang.Class<?> matcher)
Construct a class matcher that matches types exactly.
|
static AbstractFuzzyMatcher<java.lang.Class<?>> |
FuzzyMatchers.matchParent()
Match the parent class of a method, field or constructor.
|
static AbstractFuzzyMatcher<java.lang.Class<?>> |
FuzzyMatchers.matchRegex(java.util.regex.Pattern regex,
int priority)
Construct a class matcher based on the canonical names of classes.
|
static AbstractFuzzyMatcher<java.lang.Class<?>> |
FuzzyMatchers.matchRegex(java.lang.String regex,
int priority)
Construct a class matcher based on the canonical names of classes.
|
static AbstractFuzzyMatcher<java.lang.Class<?>> |
FuzzyMatchers.matchSuper(java.lang.Class<?> matcher)
Construct a class matcher that matches super types of the given class.
|
AbstractFuzzyMatcher<T> |
AbstractFuzzyMatcher.or(AbstractFuzzyMatcher<T> other)
Require that either this or the other given matcher be TRUE.
|
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<java.lang.Class<?>>> |
FuzzyClassContract.getBaseclassContracts()
Retrieve an immutable list of every baseclass contract.
|
com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<MethodInfo>> |
FuzzyClassContract.getConstructorContracts()
Retrieve an immutable list of every constructor contract.
|
com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<java.lang.reflect.Field>> |
FuzzyClassContract.getFieldContracts()
Retrieve an immutable list of every field contract.
|
com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<java.lang.Class<?>>> |
FuzzyClassContract.getInterfaceContracts()
Retrieve an immutable list of every interface contract.
|
com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<MethodInfo>> |
FuzzyClassContract.getMethodContracts()
Retrieve an immutable list of every method contract.
|
Modifier and Type | Method and Description |
---|---|
AbstractFuzzyMatcher<T> |
AbstractFuzzyMatcher.and(AbstractFuzzyMatcher<T> other)
Require that this and the given matcher be TRUE.
|
FuzzyClassContract.Builder |
FuzzyClassContract.Builder.baseclass(AbstractFuzzyMatcher<java.lang.Class<?>> matcher)
Add a new base class contract.
|
int |
AbstractFuzzyMatcher.compareTo(AbstractFuzzyMatcher<T> obj) |
FuzzyClassContract.Builder |
FuzzyClassContract.Builder.constructor(AbstractFuzzyMatcher<MethodInfo> matcher)
Add a new constructor contract.
|
FuzzyMethodContract.Builder |
FuzzyMethodContract.Builder.declaringClassMatching(AbstractFuzzyMatcher<java.lang.Class<?>> classMatcher) |
FuzzyFieldContract.Builder |
FuzzyFieldContract.Builder.declaringClassMatching(AbstractFuzzyMatcher<java.lang.Class<?>> classMatcher) |
AbstractFuzzyMember.Builder<T> |
AbstractFuzzyMember.Builder.declaringClassMatching(AbstractFuzzyMatcher<java.lang.Class<?>> classMatcher)
Require that a member is defined by a class that matches the given matcher.
|
FuzzyMethodContract.Builder |
FuzzyMethodContract.Builder.exceptionMatches(AbstractFuzzyMatcher<java.lang.Class<?>> classMatcher)
Add a throwable exception that must match the given matcher,
|
FuzzyMethodContract.Builder |
FuzzyMethodContract.Builder.exceptionMatches(AbstractFuzzyMatcher<java.lang.Class<?>> classMatcher,
int index)
Add a throwable exception that must match the given matcher and index.
|
FuzzyClassContract.Builder |
FuzzyClassContract.Builder.field(AbstractFuzzyMatcher<java.lang.reflect.Field> matcher)
Add a new field contract.
|
FuzzyClassContract.Builder |
FuzzyClassContract.Builder.interfaces(AbstractFuzzyMatcher<java.lang.Class<?>> matcher)
Add a new interface contract.
|
static AbstractFuzzyMatcher<java.lang.Class<?>> |
FuzzyMatchers.matchArray(AbstractFuzzyMatcher<java.lang.Class<?>> componentMatcher)
Construct a class matcher that matches an array with a given component matcher.
|
static FuzzyFieldContract |
FuzzyFieldContract.matchType(AbstractFuzzyMatcher<java.lang.Class<?>> matcher)
Match a field by its type.
|
FuzzyClassContract.Builder |
FuzzyClassContract.Builder.method(AbstractFuzzyMatcher<MethodInfo> matcher)
Add a new method contract.
|
AbstractFuzzyMatcher<T> |
AbstractFuzzyMatcher.or(AbstractFuzzyMatcher<T> other)
Require that either this or the other given matcher be TRUE.
|
FuzzyMethodContract.Builder |
FuzzyMethodContract.Builder.parameterMatches(AbstractFuzzyMatcher<java.lang.Class<?>> classMatcher)
Add a new required parameter whose type must match the given class matcher.
|
FuzzyMethodContract.Builder |
FuzzyMethodContract.Builder.parameterMatches(AbstractFuzzyMatcher<java.lang.Class<?>> classMatcher,
int index)
Add a new required parameter whose type must match the given class matcher and index.
|
FuzzyMethodContract.Builder |
FuzzyMethodContract.Builder.returnTypeMatches(AbstractFuzzyMatcher<java.lang.Class<?>> classMatcher)
Set a matcher that must match the return type of a matching method.
|
FuzzyFieldContract.Builder |
FuzzyFieldContract.Builder.typeMatches(AbstractFuzzyMatcher<java.lang.Class<?>> matcher) |
Constructor and Description |
---|
BannedGenerator(AbstractFuzzyMatcher<java.lang.Class<?>> classMatcher)
Construct a generator that ensures any class that matches the given matcher is never constructed.
|
Modifier and Type | Method and Description |
---|---|
static AbstractFuzzyMatcher<java.lang.Class<?>> |
MinecraftReflection.getMinecraftObjectMatcher()
Retrieve a abstract fuzzy class matcher for Minecraft objects.
|