Package org.jboss.weld.resolution
Class AbstractAssignabilityRules
java.lang.Object
org.jboss.weld.resolution.AbstractAssignabilityRules
- All Implemented Interfaces:
AssignabilityRules
- Direct Known Subclasses:
BeanTypeAssignabilityRules,EventTypeAssignabilityRules
Base class for AssignabilityRules implementations.
- Author:
- Jozef Hartinger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanboundsMatch(Type[] upperBounds, Type[] stricterUpperBounds) Returns true iff for each upper bound T, there is at least one bound from stricterUpperBounds assignable to T.protected booleanlowerBoundsOfWildcardMatch(Type[] beanParameterBounds, WildcardType requiredParameter) protected booleanlowerBoundsOfWildcardMatch(Type parameter, WildcardType requiredParameter) booleanCheck whether requiredType matches a type in beanTypesbooleanCheck whether at least one of the requiredTypes matches a type in beanTypesprotected booleanupperBoundsOfWildcardMatch(WildcardType requiredParameter, Type parameter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.weld.resolution.AssignabilityRules
matches
-
Constructor Details
-
AbstractAssignabilityRules
public AbstractAssignabilityRules()
-
-
Method Details
-
matches
Description copied from interface:AssignabilityRulesCheck whether at least one of the requiredTypes matches a type in beanTypes- Specified by:
matchesin interfaceAssignabilityRules- Parameters:
requiredTypes- the requiredTypesbeanTypes- the beanTypes- Returns:
- can we assign some type from requiredTypes to some type in beanTypes
-
matches
Description copied from interface:AssignabilityRulesCheck whether requiredType matches a type in beanTypes- Specified by:
matchesin interfaceAssignabilityRules- Parameters:
requiredType- the requiredTypebeanTypes- the beanTypes- Returns:
- can we assign requiredType to some type in beanTypes
-
boundsMatch
Returns true iff for each upper bound T, there is at least one bound from stricterUpperBounds assignable to T. This reflects that stricterUpperBounds are at least as strict as upperBounds are.Arguments passed to this method must be legal java bounds, i.e. bounds returned by
TypeVariable.getBounds(),WildcardType.getUpperBounds()orWildcardType.getLowerBounds(). -
lowerBoundsOfWildcardMatch
-
lowerBoundsOfWildcardMatch
protected boolean lowerBoundsOfWildcardMatch(Type[] beanParameterBounds, WildcardType requiredParameter) -
upperBoundsOfWildcardMatch
-