org.eclipse.internal.xtend.xtend.ast
Class Check

java.lang.Object
  extended by org.eclipse.internal.xtend.expression.ast.SyntaxElement
      extended by org.eclipse.internal.xtend.xtend.ast.Check
All Implemented Interfaces:
ISyntaxElement

public class Check
extends SyntaxElement

Author:
Bernd Kolb, Dennis Huebner, Patrick Schoenbach, Achim Demelt, Jan Koehnlein, Karsten Thoms

Field Summary
 
Fields inherited from class org.eclipse.internal.xtend.expression.ast.SyntaxElement
end, line, start
 
Constructor Summary
Check(Identifier type, Identifier f, Expression guard, boolean errorSeverity, Expression msg, Expression constraint)
           
 
Method Summary
protected  void addIssueForException(org.eclipse.emf.mwe.core.issues.Issues issues, java.lang.Exception exception, java.lang.Object element)
           
 void analyze(ExecutionContext ctx, java.util.Set<AnalysationIssue> issues)
           
 Expression getConstraint()
           
 Expression getGuard()
           
 Expression getMsg()
           
 Identifier getType()
           
 boolean isErrorCheck()
           
 java.lang.String toString()
           
 void validate(ExecutionContext ctx, java.util.Collection<?> colToCheck, org.eclipse.emf.mwe.core.issues.Issues issues, boolean warnIfNothingChecked)
          Executes the check.
 
Methods inherited from class org.eclipse.internal.xtend.expression.ast.SyntaxElement
accept, getEnd, getFileName, getLine, getNameString, getStart, setEnd, setFileName, setLine, setStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Check

public Check(Identifier type,
             Identifier f,
             Expression guard,
             boolean errorSeverity,
             Expression msg,
             Expression constraint)
Method Detail

analyze

public final void analyze(ExecutionContext ctx,
                          java.util.Set<AnalysationIssue> issues)

validate

public void validate(ExecutionContext ctx,
                     java.util.Collection<?> colToCheck,
                     org.eclipse.emf.mwe.core.issues.Issues issues,
                     boolean warnIfNothingChecked)
Executes the check.

Parameters:
ctx - The current execution context
colToCheck - Collection of objects on which the check is evaluated
issues - Errors and warnings are reported to this instance
warnIfNothingChecked - true: If this check is not evaluated for any elements an warning will be added to issues

addIssueForException

protected void addIssueForException(org.eclipse.emf.mwe.core.issues.Issues issues,
                                    java.lang.Exception exception,
                                    java.lang.Object element)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isErrorCheck

public boolean isErrorCheck()

getConstraint

public Expression getConstraint()

getGuard

public Expression getGuard()

getMsg

public Expression getMsg()

getType

public Identifier getType()