org.eclipse.xtext.xbase.validation
Class EarlyExitValidator

java.lang.Object
  extended by org.eclipse.xtext.validation.AbstractInjectableValidator
      extended by org.eclipse.xtext.validation.AbstractDeclarativeValidator
          extended by org.eclipse.xtext.xbase.validation.EarlyExitValidator
All Implemented Interfaces:
org.eclipse.emf.ecore.EValidator, ValidationMessageAcceptor
Direct Known Subclasses:
XtendEarlyExitValidator

public class EarlyExitValidator
extends AbstractDeclarativeValidator

Author:
Sebastian Zarnekow - Initial contribution and API

Nested Class Summary
protected static class EarlyExitValidator.EarlyExitKind
           
 
Nested classes/interfaces inherited from class org.eclipse.xtext.validation.AbstractDeclarativeValidator
AbstractDeclarativeValidator.State, AbstractDeclarativeValidator.StateAccess
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.EValidator
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
 
Field Summary
 
Fields inherited from class org.eclipse.xtext.validation.AbstractInjectableValidator
CURRENT_LANGUAGE_NAME
 
Fields inherited from interface org.eclipse.xtext.validation.ValidationMessageAcceptor
INSIGNIFICANT_INDEX
 
Fields inherited from interface org.eclipse.emf.ecore.EValidator
MARKER, RELATED_URIS_ATTRIBUTE, URI_ATTRIBUTE
 
Constructor Summary
EarlyExitValidator()
           
 
Method Summary
 void checkDeadCode(XBlockExpression block)
           
 void checkInvalidReturnExpression(XExpression expression)
           
protected  void collectExits(org.eclipse.emf.ecore.EObject expr, java.util.List<XExpression> found)
           
protected  java.util.Map<org.eclipse.emf.ecore.EReference,EarlyExitValidator.EarlyExitKind> getDisallowedEarlyExitReferences()
           
 void register(EValidatorRegistrar registrar)
           
 
Methods inherited from class org.eclipse.xtext.validation.AbstractDeclarativeValidator
acceptError, acceptError, acceptInfo, acceptInfo, acceptWarning, acceptWarning, checkDone, createDiagnostic, createDiagnostic, error, error, error, error, error, error, error, getChain, getCheckMode, getContext, getCurrentMethod, getCurrentObject, getMessageAcceptor, guard, info, info, info, info, info, info, internalValidate, newInstance, setInjector, setMessageAcceptor, toDiagnosticSeverity, warning, warning, warning, warning, warning, warning, warning
 
Methods inherited from class org.eclipse.xtext.validation.AbstractInjectableValidator
getCurrentLanguage, getEPackages, isLanguageSpecific, isResponsible, validate, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EarlyExitValidator

public EarlyExitValidator()
Method Detail

getDisallowedEarlyExitReferences

protected java.util.Map<org.eclipse.emf.ecore.EReference,EarlyExitValidator.EarlyExitKind> getDisallowedEarlyExitReferences()
Returns:
map of references which

checkInvalidReturnExpression

public void checkInvalidReturnExpression(XExpression expression)

collectExits

protected void collectExits(org.eclipse.emf.ecore.EObject expr,
                            java.util.List<XExpression> found)

checkDeadCode

public void checkDeadCode(XBlockExpression block)

register

public void register(EValidatorRegistrar registrar)
Overrides:
register in class AbstractInjectableValidator