public final class TypeCondition extends VariableConditionAdapter
Modifier and Type | Field and Description |
---|---|
private boolean |
isReference |
private boolean |
nonNull |
private TypeResolver |
resolver |
Constructor and Description |
---|
TypeCondition(TypeResolver tr,
boolean isReference,
boolean nonNull)
create a type condition
|
Modifier and Type | Method and Description |
---|---|
boolean |
check(SchemaVariable p_var,
SVSubstitute candidate,
SVInstantiations svInst,
Services services)
checks if the condition for a correct instantiation is fulfilled
|
boolean |
getIsReference() |
boolean |
getNonNull() |
TypeResolver |
getResolver() |
TypeResolver |
getTypeResolver() |
java.lang.String |
toString() |
check
private final TypeResolver resolver
private final boolean nonNull
private final boolean isReference
public TypeCondition(TypeResolver tr, boolean isReference, boolean nonNull)
tr
- the TypeResolver for the type to be checkedisReference
- check for reference or primitive typenonNull
- if Sort null should be allowed (only important when
isReference is set to true)public TypeResolver getResolver()
public boolean getIsReference()
public boolean getNonNull()
public boolean check(SchemaVariable p_var, SVSubstitute candidate, SVInstantiations svInst, Services services)
VariableConditionAdapter
check
in class VariableConditionAdapter
p_var
- the template Variable to be instantiatedsvInst
- the MatchCondition with the current matching state and in particular
the SVInstantiations that are already known to be neededservices
- the program information objectpublic java.lang.String toString()
toString
in class java.lang.Object
public TypeResolver getTypeResolver()
resolver
.