Class AbstractFuzzyMember<T extends Member>
java.lang.Object
com.comphenix.protocol.reflect.fuzzy.AbstractFuzzyMember<T>
- Type Parameters:
T- - type that it matches.
- All Implemented Interfaces:
AbstractFuzzyMatcher<T>
- Direct Known Subclasses:
FuzzyFieldContract,FuzzyMethodContract
public abstract class AbstractFuzzyMember<T extends Member>
extends Object
implements AbstractFuzzyMatcher<T>
Represents a matcher that matches members.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbstractFuzzyMember.Builder<T extends AbstractFuzzyMember<?>>Represents a builder of a fuzzy member contract. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractFuzzyMatcher<Class<?>> protected intprotected intprotected Patternprotected booleanWhether this contract can be modified. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractFuzzyMember(AbstractFuzzyMember<T> other) -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieve a class matcher for the declaring class of the member.Generate a view of this matcher as a key-value map.intRetrieve a bit field of everyModifierthat must not be present for the member to match.intRetrieve a bit field of everyModifierthat is required for the member to match.Retrieve the regular expression pattern that is used to match the name of a member.inthashCode()booleanDetermine if the given value is a match.protected voidCalled before a builder is building a member and copying its state.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.comphenix.protocol.reflect.fuzzy.AbstractFuzzyMatcher
and, inverted, or
-
Field Details
-
modifiersRequired
protected int modifiersRequired -
modifiersBanned
protected int modifiersBanned -
nameRegex
-
declaringMatcher
-
sealed
protected transient boolean sealedWhether this contract can be modified.
-
-
Constructor Details
-
AbstractFuzzyMember
protected AbstractFuzzyMember() -
AbstractFuzzyMember
-
-
Method Details
-
prepareBuild
protected void prepareBuild()Called before a builder is building a member and copying its state.Use this to prepare any special values.
-
getModifiersRequired
public int getModifiersRequired()Retrieve a bit field of everyModifierthat is required for the member to match.- Returns:
- A required modifier bit field.
-
getModifiersBanned
public int getModifiersBanned()Retrieve a bit field of everyModifierthat must not be present for the member to match.- Returns:
- A banned modifier bit field.
-
getNameRegex
Retrieve the regular expression pattern that is used to match the name of a member.- Returns:
- The regex matching a name, or NULL if everything matches.
-
getDeclaringMatcher
Retrieve a class matcher for the declaring class of the member.- Returns:
- An object matching the declaring class.
-
isMatch
Description copied from interface:AbstractFuzzyMatcherDetermine if the given value is a match.- Specified by:
isMatchin interfaceAbstractFuzzyMatcher<T extends Member>- Parameters:
value- - the value to match.parent- - the parent container, or NULL if this value is the root.- Returns:
- TRUE if it is a match, FALSE otherwise.
-
toString
-
getKeyValueView
Generate a view of this matcher as a key-value map.Used by
toString()to print a representation of this object.- Returns:
- A modifiable key-value view.
-
equals
-
hashCode
public int hashCode()
-