public class EarlyExitValidator extends AbstractDeclarativeValidator
Modifier and Type | Class and Description |
---|---|
protected static class |
EarlyExitValidator.EarlyExitKind |
AbstractDeclarativeValidator.MethodWrapper, AbstractDeclarativeValidator.State, AbstractDeclarativeValidator.StateAccess
org.eclipse.emf.ecore.EValidator.Descriptor, org.eclipse.emf.ecore.EValidator.PatternMatcher, org.eclipse.emf.ecore.EValidator.Registry, org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider, org.eclipse.emf.ecore.EValidator.ValidationDelegate
CURRENT_LANGUAGE_NAME, ISSUE_SEVERITIES
INSIGNIFICANT_INDEX
Constructor and Description |
---|
EarlyExitValidator() |
Modifier and Type | Method and Description |
---|---|
void |
checkDeadCode(XBasicForLoopExpression loop) |
void |
checkDeadCode(XBlockExpression block) |
void |
checkDeadCode(XDoWhileExpression loop) |
void |
checkDeadCode(XIfExpression condition) |
void |
checkDeadCode(XSwitchExpression switchExpression) |
void |
checkDeadCode(XWhileExpression loop) |
void |
checkInvalidReturnExpression(XExpression expression) |
protected void |
collectExits(org.eclipse.emf.ecore.EObject expr,
java.util.List<XExpression> found) |
protected com.google.common.base.Optional<BooleanResult> |
getBooleanResult(XExpression expression) |
protected java.util.Map<org.eclipse.emf.ecore.EReference,EarlyExitValidator.EarlyExitKind> |
getDisallowedEarlyExitReferences() |
protected int |
markAsDeadCode(java.util.List<XCasePart> cases,
XCasePart from,
int idx,
int size) |
protected void |
markConstantBooleanCondition(XExpression predicate,
BooleanResult booleanResult,
boolean ignoreBooleanLiteral) |
void |
register(EValidatorRegistrar registrar) |
acceptError, acceptError, acceptInfo, acceptInfo, acceptWarning, acceptWarning, addIssue, addIssue, addIssue, addIssue, addIssue, addIssueToState, checkDone, checkIsFromCurrentlyCheckedResource, createDiagnostic, createDiagnostic, createMethodWrapper, error, error, error, error, error, error, error, error, getChain, getCheckMode, getContext, getCurrentMethod, getCurrentObject, getIssueSeverities, getMessageAcceptor, guard, info, info, info, info, info, info, info, info, internalValidate, isIgnored, newInstance, setInjector, setMessageAcceptor, toDiagnosticSeverity, warning, warning, warning, warning, warning, warning, warning, warning
getCurrentLanguage, getEPackages, isLanguageSpecific, isResponsible, validate, validate, validate
protected java.util.Map<org.eclipse.emf.ecore.EReference,EarlyExitValidator.EarlyExitKind> getDisallowedEarlyExitReferences()
public void checkInvalidReturnExpression(XExpression expression)
protected void collectExits(org.eclipse.emf.ecore.EObject expr, java.util.List<XExpression> found)
public void checkDeadCode(XBlockExpression block)
public void checkDeadCode(XWhileExpression loop)
protected void markConstantBooleanCondition(XExpression predicate, BooleanResult booleanResult, boolean ignoreBooleanLiteral)
public void checkDeadCode(XDoWhileExpression loop)
public void checkDeadCode(XIfExpression condition)
public void checkDeadCode(XBasicForLoopExpression loop)
protected com.google.common.base.Optional<BooleanResult> getBooleanResult(XExpression expression)
public void checkDeadCode(XSwitchExpression switchExpression)
protected int markAsDeadCode(java.util.List<XCasePart> cases, XCasePart from, int idx, int size)
public void register(EValidatorRegistrar registrar)
register
in class AbstractInjectableValidator