|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.validation.rules.AbstractCriterion
org.eclipse.actf.validation.rules.TypeCriterion
public class TypeCriterion
Criterion for a generic component type.
Field Summary |
---|
Fields inherited from class org.eclipse.actf.validation.rules.AbstractCriterion |
---|
attributes, parent, parts, ruleSet |
Constructor Summary | |
---|---|
TypeCriterion()
|
Method Summary | |
---|---|
boolean |
apply(IValidationContext context,
Object target)
apply this rule to the given target using the given context. |
protected String |
getAliasValue(String aliasName)
|
Class |
getTargetClass()
Returns the class against which target objects are teste |
void |
initialize(Object content)
initialize this rule with any content that might be necessary for its application to a target during the invocation of the apply method. |
boolean |
isPolymorphic()
Whether the object being tested must be an instance only of the target class or if it can be an instance of the target class or any of its subclasses |
Methods inherited from class org.eclipse.actf.validation.rules.AbstractCriterion |
---|
addPart, equals, getAttribute, getParent, getParts, getRuleSet, hashCode, setAttribute, setParent, setParts, setRuleSet |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeCriterion()
Method Detail |
---|
public boolean apply(IValidationContext context, Object target) throws Exception
ICriterion
Note that the context object can be used to retrieve a great deal of information about the current validation process. In particular, it can be used to update the validation report being generated with the violations that result from an application of this rule to the given target.
context
- context under which rule is being evaluated (supplied by engine)target
- object to which rule is to be applied
Exception
ICriterion.initialize(Object)
,
IValidationContext
,
ValidationContextConstants
public void initialize(Object content) throws Exception
ICriterion
apply
method.
The specified content may take any form. It may be an XML element, a
.properties file, a string, etc. This method may be invoked any time prior to calling
apply
.
content
- - initialization content for the rule
Exception
ICriterion.apply(IValidationContext, Object)
protected String getAliasValue(String aliasName)
public Class getTargetClass()
public boolean isPolymorphic()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |