Class Claim
java.lang.Object
org.refcodes.decoupling.Claim
- All Implemented Interfaces:
Comparable<Claim>, AliasAccessor, TypeAccessor, Diagnosable, Schemable<DiagnosticOptions>
- Direct Known Subclasses:
FactoryClaim, InitializerClaim
public class Claim
extends Object
implements AliasAccessor, TypeAccessor, Diagnosable, Comparable<Claim>
A claim describes a
Claim required by a Dependency.-
Nested Class Summary
Nested classes/interfaces inherited from interface AliasAccessor
AliasAccessor.AliasBuilder<B>, AliasAccessor.AliasMutator, AliasAccessor.AliasPropertyNested classes/interfaces inherited from interface TypeAccessor
TypeAccessor.TypeBuilder<T,B>, TypeAccessor.TypeMutator<T>, TypeAccessor.TypeProperty<T> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClaim()Instantiates a newClaim.Constructs aClaimfor the given type (the alias is, if not provided, derived from type).Constructs aClaimfor the given type (the alias is, if not provided, derived from type).Constructs aClaimfor the given type (the alias is, if not provided, derived from type). -
Method Summary
Modifier and TypeMethodDescriptionintbooleangetAlias()getType()inthashCode()booleanisClaim(Dependency<?> aDependency) Determines whether the givenDependencydeclaration matches thisClaiminstance.toSchema()toString()
-
Field Details
-
CLAIM_STEREOTYPE
- See Also:
-
_alias
-
_type
-
-
Constructor Details
-
Claim
protected Claim()Instantiates a newClaim. -
Claim
-
Claim
-
Claim
-
-
Method Details
-
getAlias
- Specified by:
getAliasin interfaceAliasAccessor
-
getType
- Specified by:
getTypein interfaceTypeAccessor
-
isClaim
Determines whether the givenDependencydeclaration matches thisClaiminstance.- Parameters:
aDependency- TheDependencydeclaration which to match against thisClaiminstance.- Returns:
- True in case the
Claiminstance can be satisfied by the givenDependencydeclaration.
-
toSchema
- Specified by:
toSchemain interfaceSchemable<DiagnosticOptions>
-
compareTo
- Specified by:
compareToin interfaceComparable<Claim>
-
hashCode
-
equals
-
toString
-