public class FuzzyClassContract extends AbstractFuzzyMatcher<Class<?>>
| Modifier and Type | Class and Description |
|---|---|
static class |
FuzzyClassContract.Builder
Represents a class contract builder.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
calculateRoundNumber()
Calculate the round number indicating when this matcher should be applied.
|
com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<Class<?>>> |
getBaseclassContracts()
Retrieve an immutable list of every baseclass contract.
|
com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<MethodInfo>> |
getConstructorContracts()
Retrieve an immutable list of every constructor contract.
|
com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<Field>> |
getFieldContracts()
Retrieve an immutable list of every field contract.
|
com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<Class<?>>> |
getInterfaceContracts()
Retrieve an immutable list of every interface contract.
|
com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<MethodInfo>> |
getMethodContracts()
Retrieve an immutable list of every method contract.
|
boolean |
isMatch(Class<?> value,
Object parent)
Determine if the given value is a match.
|
static FuzzyClassContract.Builder |
newBuilder()
Construct a new fuzzy class contract builder.
|
String |
toString() |
and, combineRounds, combineRounds, compareTo, getRoundNumber, inverted, orpublic static FuzzyClassContract.Builder newBuilder()
public com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<Field>> getFieldContracts()
This list is ordered in descending order of priority.
public com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<MethodInfo>> getMethodContracts()
This list is ordered in descending order of priority.
public com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<MethodInfo>> getConstructorContracts()
This list is ordered in descending order of priority.
public com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<Class<?>>> getBaseclassContracts()
This list is ordered in descending order of priority.
public com.google.common.collect.ImmutableList<AbstractFuzzyMatcher<Class<?>>> getInterfaceContracts()
This list is ordered in descending order of priority.
protected int calculateRoundNumber()
AbstractFuzzyMatcherMatchers with a lower round number are applied before matchers with a higher round number.
By convention, this round number should be negative, except for zero in the case of a matcher
that accepts any value. A good implementation should return the inverted tree depth (class hierachy)
of the least specified type used in the matching. Thus Integer will have a lower round number than
Number.
calculateRoundNumber in class AbstractFuzzyMatcher<Class<?>>public boolean isMatch(Class<?> value, Object parent)
AbstractFuzzyMatcherisMatch in class AbstractFuzzyMatcher<Class<?>>value - - the value to match.parent - - the parent container, or NULL if this value is the root.Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.