Class FuzzyClassContract

java.lang.Object
com.comphenix.protocol.reflect.fuzzy.FuzzyClassContract
All Implemented Interfaces:
AbstractFuzzyMatcher<Class<?>>

public class FuzzyClassContract extends Object implements AbstractFuzzyMatcher<Class<?>>
Determine if a given class implements a given fuzzy (duck typed) contract.
  • Method Details

    • newBuilder

      public static FuzzyClassContract.Builder newBuilder()
      Construct a new fuzzy class contract builder.
      Returns:
      A new builder.
    • getFieldContracts

      public com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<Field>> getFieldContracts()
      Retrieve an immutable list of every field contract.

      This list is ordered in descending order of priority.

      Returns:
      List of every field contract.
    • getMethodContracts

      public com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<MethodInfo>> getMethodContracts()
      Retrieve an immutable list of every method contract.

      This list is ordered in descending order of priority.

      Returns:
      List of every method contract.
    • getConstructorContracts

      public com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<MethodInfo>> getConstructorContracts()
      Retrieve an immutable list of every constructor contract.

      This list is ordered in descending order of priority.

      Returns:
      List of every constructor contract.
    • getBaseclassContracts

      public com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<Class<?>>> getBaseclassContracts()
      Retrieve an immutable list of every baseclass contract.

      This list is ordered in descending order of priority.

      Returns:
      List of every baseclass contract.
    • getInterfaceContracts

      public com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<Class<?>>> getInterfaceContracts()
      Retrieve an immutable list of every interface contract.

      This list is ordered in descending order of priority.

      Returns:
      List of every interface contract.
    • isMatch

      public boolean isMatch(Class<?> value, Object parent)
      Description copied from interface: AbstractFuzzyMatcher
      Determine if the given value is a match.
      Specified by:
      isMatch in interface AbstractFuzzyMatcher<Class<?>>
      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

      public String toString()
      Overrides:
      toString in class Object