public class PatternLanguageJavaValidator extends AbstractPatternLanguageJavaValidator implements IIssueCallback
Validators implemented:
org.eclipse.xtext.validation.AbstractDeclarativeValidator.MethodWrapper, org.eclipse.xtext.validation.AbstractDeclarativeValidator.State, org.eclipse.xtext.validation.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
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ANNOTATION_PARAMETER_TYPE_ERROR |
static java.lang.String |
DUPLICATE_PATTERN_DEFINITION_MESSAGE |
static java.lang.String |
DUPLICATE_VARIABLE_MESSAGE |
static java.lang.String |
EXACTLY_ONE_AGGREGATE_MESSAGE |
static java.lang.String |
INVALID_AGGREGATE_MESSAGE |
static java.lang.String |
MISSING_AGGREGATE_MESSAGE |
static java.lang.String |
MISSING_ANNOTATION_ATTRIBUTE |
static java.lang.String |
RECURSIVE_PATTERN_CALL |
static java.lang.String |
TRANSITIVE_CLOSURE_ARITY_IN_PATTERNCALL |
static java.lang.String |
TRANSITIVE_CLOSURE_ONLY_IN_POSITIVE_COMPOSITION |
static java.lang.String |
UNEXPECTED_AGGREGATE_MESSAGE |
static java.lang.String |
UNKNOWN_ANNOTATION_ATTRIBUTE |
static java.lang.String |
UNUSED_PRIVATE_PATTERN_MESSAGE |
static java.lang.String |
VARIABLE_NAME_DUBIUS_REUSE_MESSAGE_AGGREGATE |
static java.lang.String |
VARIABLE_NAME_DUBIUS_REUSE_MESSAGE_SINGLEUSE |
CURRENT_LANGUAGE_NAME, ISSUE_SEVERITIES
Constructor and Description |
---|
PatternLanguageJavaValidator() |
Modifier and Type | Method and Description |
---|---|
void |
checkAggregatorExpression(AggregatedValue expression)
Checks if an aggregator expression has the correct number (0 or 1) aggregate variables.
|
void |
checkAnnotation(Annotation annotation) |
void |
checkApplicabilityOfTransitiveClosureInPatternCall(PatternCall call) |
void |
checkCompareConstraints(CompareConstraint constraint) |
void |
checkForImpureJavaCallsInCheckConstraints(CheckConstraint checkConstraint) |
void |
checkForImpureJavaCallsInEvalExpressions(FunctionEvaluationValue eval) |
void |
checkNegativeCallParameters(PatternCompositionConstraint constraint) |
void |
checkPackageDeclaration(PatternModel model) |
void |
checkPatternBody(PatternBody body) |
void |
checkPatternCallParameters(PatternCall call) |
void |
checkPatternParameters(Pattern pattern) |
void |
checkPatterns(PatternModel model) |
void |
checkPrivatePatternCall(PatternCall call) |
void |
checkPrivatePatternUsage(Pattern pattern) |
void |
checkRecursivePatternCall(PatternCall call) |
void |
checkReturnTypeOfCheckConstraints(CheckConstraint checkConstraint) |
void |
checkValueReference(VariableReference value)
Checks if an aggregate
VariableReference is used only in the right context, that is, in an
AggregatedValue with an aggregator requiring aggregator parameters. |
void |
checkVariableNames(PatternBody body) |
void |
error(java.lang.String message,
org.eclipse.emf.ecore.EObject source,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.String code,
java.lang.String... issueData) |
protected java.lang.String |
getFormattedArgumentsList(PatternCall call) |
boolean |
isNamedSingleUse(Variable variable)
Deprecated.
|
boolean |
isUnnamedSingleUseVariable(Variable variable)
Deprecated.
use
CorePatternLanguageHelper#isUnnamedSingleUse(Variable) instead |
void |
warning(java.lang.String message,
org.eclipse.emf.ecore.EObject source,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.String code,
java.lang.String... issueData) |
getEPackages
addImportUnusedIssues, canonicalName, checkAssignment, checkAssignment, checkAssignment, checkAssignment, checkAssignment, checkCast, checkCasts, checkCatchClausesOrder, checkClosureParameterTypes, checkClosureParams, checkConflicts, checkConstructorArgumentsAreValid, checkDelegateConstructorIsFirst, checkDeprecated, checkDeprecated, checkDeprecated, checkDeprecated, checkDeprecated, checkDeprecated, checkDuplicatedCases, checkExplicitOperationCall, checkExplicitOperationCall, checkExplicitOperationCall, checkFinalFieldInitialization, checkImports, checkIncompleteCasesOnEnum, checkInitializationRec, checkInnerExpressions, checkInstanceOf, checkInstanceOfOrder, checkIsValidConstructorArgument, checkLocalUsageOfDeclared, checkLocalUsageOfSwitchParameter, checkNoCircularConstructorCall, checkNoForwardReferences, checkNoJavaStyleTypeCasting, checkNoJavaStyleTypeCasting, checkNumberFormat, checkOperandTypesForTripleEquals, checkPrimitiveComparedToNull, checkRedundantCase, checkReferInvalidTypes, checkReferInvalidTypes, checkReferInvalidTypes, checkReturn, checkTypeArguments, checkTypeArguments, checkTypeGuards, checkTypeGuardsOrder, checkTypeLiteral, checkTypeParameterConstraintIsValid, checkTypeParameterNotUsedInStaticContext, checkTypeReferenceIsNotVoid, checkTypeReferenceIsNotVoid, checkTypes, checkVariableDeclaration, checkVariableIsNotInferredAsVoid, containsTypeArgs, doCheckTypeParameterForwardReference, ensureNotPrimitiveNorWildcard, getActualType, getActualType, getActualType, getExpectedType, getExpressionHelper, getFirstLeafNode, getLogicalContainerProvider, getNameOfTypes, getNode, getReferInvalidTypeMessage, getServices, hasConstructorCallWithThis, isFinal, isHandled, isHidden, isInitialized, isInterface, isLocalClassSemantics, isLocallyUsed, isLocalType, isPrimitiveVoid, isSemicolon, isStaticContext, isTripleEqualsOperation, isValueExpectedRecursive, isXExpressionInsideBlock, memberOfTypeHierarchy, mustBeJavaStatementExpression, populateMaps, reportFieldAlreadyInitialized, reportUninitializedField, reportUninitializedField, toLightweightTypeReference, toLightweightTypeReference
acceptError, acceptError, acceptInfo, acceptInfo, acceptWarning, acceptWarning, addIssue, addIssue, addIssue, addIssue, addIssue, addIssueToState, checkDone, checkIsFromCurrentlyCheckedResource, createDiagnostic, createDiagnostic, createMethodWrapper, 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
public static final java.lang.String DUPLICATE_VARIABLE_MESSAGE
public static final java.lang.String DUPLICATE_PATTERN_DEFINITION_MESSAGE
public static final java.lang.String UNKNOWN_ANNOTATION_ATTRIBUTE
public static final java.lang.String MISSING_ANNOTATION_ATTRIBUTE
public static final java.lang.String ANNOTATION_PARAMETER_TYPE_ERROR
public static final java.lang.String TRANSITIVE_CLOSURE_ARITY_IN_PATTERNCALL
public static final java.lang.String TRANSITIVE_CLOSURE_ONLY_IN_POSITIVE_COMPOSITION
public static final java.lang.String UNUSED_PRIVATE_PATTERN_MESSAGE
public static final java.lang.String RECURSIVE_PATTERN_CALL
public static final java.lang.String INVALID_AGGREGATE_MESSAGE
public static final java.lang.String UNEXPECTED_AGGREGATE_MESSAGE
public static final java.lang.String EXACTLY_ONE_AGGREGATE_MESSAGE
public static final java.lang.String MISSING_AGGREGATE_MESSAGE
public static final java.lang.String VARIABLE_NAME_DUBIUS_REUSE_MESSAGE_SINGLEUSE
public static final java.lang.String VARIABLE_NAME_DUBIUS_REUSE_MESSAGE_AGGREGATE
public void checkValueReference(VariableReference value)
VariableReference
is used only in the right context, that is, in an
AggregatedValue
with an aggregator requiring aggregator parameters.value
- the VariableReference
instancepublic void checkAggregatorExpression(AggregatedValue expression)
expression
- the aggregator expressionpublic void checkPatternParameters(Pattern pattern)
public void checkPrivatePatternUsage(Pattern pattern)
public void checkPrivatePatternCall(PatternCall call)
public void checkPatternCallParameters(PatternCall call)
public void checkApplicabilityOfTransitiveClosureInPatternCall(PatternCall call)
public void checkPatterns(PatternModel model)
public void checkPatternBody(PatternBody body)
public void checkAnnotation(Annotation annotation)
public void checkCompareConstraints(CompareConstraint constraint)
public void checkRecursivePatternCall(PatternCall call)
protected java.lang.String getFormattedArgumentsList(PatternCall call)
public void checkPackageDeclaration(PatternModel model)
public void checkReturnTypeOfCheckConstraints(CheckConstraint checkConstraint)
public void checkVariableNames(PatternBody body)
public void checkForImpureJavaCallsInCheckConstraints(CheckConstraint checkConstraint)
public void checkForImpureJavaCallsInEvalExpressions(FunctionEvaluationValue eval)
public void checkNegativeCallParameters(PatternCompositionConstraint constraint)
public void warning(java.lang.String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String code, java.lang.String... issueData)
warning
in interface IIssueCallback
warning
in class org.eclipse.xtext.validation.AbstractDeclarativeValidator
public void error(java.lang.String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String code, java.lang.String... issueData)
error
in interface IIssueCallback
error
in class org.eclipse.xtext.validation.AbstractDeclarativeValidator
@Deprecated public boolean isNamedSingleUse(Variable variable)
CorePatternLanguageHelper.isNamedSingleUse(Variable)
instead@Deprecated public boolean isUnnamedSingleUseVariable(Variable variable)
CorePatternLanguageHelper#isUnnamedSingleUse(Variable)
instead