Class XtendValidator
- java.lang.Object
-
- org.eclipse.xtext.validation.AbstractInjectableValidator
-
- org.eclipse.xtext.validation.AbstractDeclarativeValidator
-
- org.eclipse.xtext.xbase.validation.AbstractXbaseValidator
-
- org.eclipse.xtext.xbase.validation.XbaseValidator
-
- org.eclipse.xtext.xbase.annotations.validation.XbaseWithAnnotationsValidator
-
- org.eclipse.xtend.core.validation.XtendValidator
-
- All Implemented Interfaces:
org.eclipse.emf.ecore.EValidator
,org.eclipse.xtext.validation.ValidationMessageAcceptor
public class XtendValidator extends org.eclipse.xtext.xbase.annotations.validation.XbaseWithAnnotationsValidator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.xtext.validation.AbstractDeclarativeValidator
org.eclipse.xtext.validation.AbstractDeclarativeValidator.MethodWrapper, org.eclipse.xtext.validation.AbstractDeclarativeValidator.State, org.eclipse.xtext.validation.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 Modifier and Type Field Description protected java.util.Set<java.lang.String>
junitAnnotations
protected com.google.common.collect.Multimap<java.lang.Class<?>,java.lang.annotation.ElementType>
targetInfos
protected java.util.Set<java.lang.String>
visibilityModifers
-
Fields inherited from class org.eclipse.xtext.validation.AbstractInjectableValidator
CURRENT_LANGUAGE_NAME, ISSUE_SEVERITIES
-
-
Constructor Summary
Constructors Constructor Description XtendValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addDispatchError(org.eclipse.xtext.common.types.JvmGenericType type, java.lang.Iterable<org.eclipse.xtext.common.types.JvmOperation> operations, java.lang.String message, java.lang.String modifier, java.lang.String ISSUE_ID)
protected void
addDispatchError(org.eclipse.xtext.common.types.JvmOperation jvmOperation, java.lang.String message, java.lang.String modifier, java.lang.String ISSUE_ID)
protected void
addIssue(java.lang.String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String issueCode, java.lang.String... issueData)
protected java.lang.String
canonicalName(org.eclipse.xtext.common.types.JvmIdentifiableElement element)
void
checkAbstract(XtendFunction function)
void
checkAnnotationTarget(org.eclipse.xtext.xbase.annotations.xAnnotations.XAnnotation annotation)
void
checkClassPath(XtendFile xtendFile)
void
checkCreateFunctionIsNotGeneric(XtendFunction func)
void
checkCreateFunctionIsNotStatic(XtendFunction func)
void
checkCreateFunctionIsNotTypeVoid(XtendFunction func)
void
checkDeclaredExceptions(XtendConstructor constructor)
void
checkDeclaredExceptions(XtendFunction function)
void
checkDefaultSuperConstructor(XtendClass xtendClass)
void
checkDeprecated(org.eclipse.xtext.xtype.XImportDeclaration decl)
void
checkDispatchFunctions(XtendClass clazz)
protected void
checkDispatchNonDispatchConflict(XtendClass clazz, com.google.common.collect.Multimap<DispatchHelper.DispatchSignature,org.eclipse.xtext.common.types.JvmOperation> dispatchMethods)
void
checkDuplicateAndOverriddenFunctions(XtendTypeDeclaration xtendType)
void
checkFieldsAreCalledSelf(XtendField field)
void
checkFinalFieldInitialization(XtendClass clazz)
void
checkFinalFieldInitialization(XtendInterface xtendInterface)
protected void
checkImplicitReturn(XtendFunction method)
protected void
checkInferedApi(XtendField field)
protected void
checkInferedApi(XtendFunction method)
void
checkJavaDocRefs(XtendMember member)
void
checkJavaKeywordConflict(XtendClass member)
void
checkJavaKeywordConflict(XtendConstructor member)
void
checkJavaKeywordConflict(XtendField member)
void
checkJavaKeywordConflict(XtendFunction member)
void
checkJavaKeywordConflict(XtendInterface member)
void
checkJavaKeywordConflict(XtendTypeDeclaration member)
void
checkJUnitMethodReturnType(XtendFunction function)
void
checkLeftHandSideIsVariable(org.eclipse.xtext.xbase.XAssignment assignment)
void
checkLocalUsageOfDeclaredFields(XtendField field)
void
checkLocalUsageOfDeclaredXtendFunction(XtendFunction function)
void
checkMemberNamesAreUnique(XtendTypeDeclaration xtendType)
protected void
checkModifierMatchesTypename(XtendClass xtendClass)
protected void
checkModifiers(XtendAnnotationType annotation)
protected void
checkModifiers(XtendClass xtendClass)
protected void
checkModifiers(XtendConstructor constructor)
protected void
checkModifiers(XtendEnum xtendEnum)
protected void
checkModifiers(XtendField field)
protected void
checkModifiers(XtendFunction method)
protected void
checkModifiers(XtendInterface xtendInterface)
void
checkMultipleAnnotations(XtendAnnotationTarget annotationTarget)
protected void
checkNoJavaKeyword(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EAttribute attribute)
void
checkNonInitializedFieldsHaveAType(XtendField field)
void
checkNonRawTypeInferred(XtendField field)
void
checkNonRawTypeInferred(XtendFunction function)
void
checkNoReturnsInCreateExtensions(XtendFunction func)
void
checkNoTypeNameShadowing(XtendTypeDeclaration type)
void
checkNoVoidInDependencyDeclaration(XtendField dep)
void
checkOperatorSignature(XtendFunction function)
void
checkParameterNames(XtendConstructor constructor)
void
checkParameterNames(XtendFunction function)
void
checkStaticMembers(AnonymousClass anonymousClass)
void
checkSuperTypes(AnonymousClass anonymousClass)
void
checkSuperTypes(XtendClass xtendClass)
void
checkSuperTypes(XtendInterface xtendInterface)
void
checkTernaryExpressionUsed(org.eclipse.xtext.xbase.XIfExpression exp)
void
checkTypeParameterForwardReferences(XtendClass xtendClass)
void
checkTypeParameterForwardReferences(XtendFunction xtendFunction)
void
checkTypeParameterForwardReferences(XtendInterface xtendInterface)
void
checkTypeParametersAreUnsupported(XtendConstructor constructor)
void
checkValidExtension(XtendField field)
void
checkValidExtension(XtendFormalParameter parameter)
void
checkValidExtension(XtendParameter parameter)
void
checkValidExtension(XtendVariableDeclaration variableDeclaration)
protected void
checkValidExtensionType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature)
void
checkVarArgComesLast(XtendParameter param)
void
checkVarArgIsNotExtension(XtendParameter param)
void
checkWhitespaceInRichStrings(RichString richString)
protected void
checkWildcardSupertype(XtendTypeDeclaration xtendType, org.eclipse.xtext.common.types.JvmTypeReference superTypeReference, org.eclipse.emf.ecore.EStructuralFeature feature, int index)
void
checkXtendParameterNotPrimitiveVoid(XtendParameter param)
protected void
collectReturnExpressions(org.eclipse.emf.ecore.EObject expr, java.util.List<org.eclipse.xtext.xbase.XReturnExpression> found)
protected void
createExceptionMismatchError(org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation operation, org.eclipse.emf.ecore.EObject sourceElement, java.util.List<org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation> exceptionMismatch)
void
dispatchFuncWithTypeParams(XtendFunction func)
protected <Executable extends org.eclipse.xtext.xbase.typesystem.override.IResolvedExecutable>
voiddoCheckDuplicateExecutables(org.eclipse.xtext.common.types.JvmGenericType inferredType, java.util.List<Executable> declaredOperations, com.google.common.base.Function<java.lang.String,java.util.List<Executable>> bySignature, java.util.Set<org.eclipse.emf.ecore.EObject> flaggedOperations)
protected void
doCheckDuplicateExecutables(org.eclipse.xtext.common.types.JvmGenericType inferredType, org.eclipse.xtext.xbase.typesystem.override.ResolvedFeatures resolvedFeatures, java.util.Set<org.eclipse.emf.ecore.EObject> flaggedOperations)
protected void
doCheckFunctionOverrides(org.eclipse.emf.ecore.EObject sourceElement, org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation resolved, java.util.List<org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation> allInherited)
protected void
doCheckFunctionOverrides(org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation operation, java.util.Set<org.eclipse.emf.ecore.EObject> flaggedOperations)
protected void
doCheckFunctionOverrides(org.eclipse.xtext.xbase.typesystem.override.ResolvedFeatures resolvedFeatures, java.util.Set<org.eclipse.emf.ecore.EObject> flaggedOperations)
protected void
doCheckOverriddenMethods(XtendTypeDeclaration xtendType, org.eclipse.xtext.common.types.JvmGenericType inferredType, org.eclipse.xtext.xbase.typesystem.override.ResolvedFeatures resolvedFeatures, java.util.Set<org.eclipse.emf.ecore.EObject> flaggedOperations)
boolean
doCheckValidMemberName(XtendMember member)
protected void
doCheckWhitespaceIn(RichString richString)
protected java.lang.String
doGetReadableSignature(java.lang.String simpleName, java.util.List<org.eclipse.xtext.common.types.JvmFormalParameter> parameters)
protected org.eclipse.emf.ecore.EStructuralFeature
exceptionsFeature(org.eclipse.emf.ecore.EObject member)
protected org.eclipse.emf.ecore.EObject
findPrimarySourceElement(org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation operation)
protected org.eclipse.emf.ecore.EObject
getContainingAnnotationTarget(org.eclipse.xtext.xbase.annotations.xAnnotations.XAnnotation annotation)
protected java.lang.String
getDeclaratorName(org.eclipse.xtext.common.types.JvmFeature feature)
protected java.lang.String
getDeclaratorName(org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation resolved)
protected java.util.List<org.eclipse.emf.ecore.EPackage>
getEPackages()
protected org.eclipse.xtext.xbase.compiler.GeneratorConfig
getGeneratorConfig(org.eclipse.emf.ecore.EObject element)
protected java.lang.String
getMemberName(XtendField field)
protected org.eclipse.emf.ecore.EObject
getOutermostType(XtendMember member)
Replies the outer-most type of the given member.protected java.util.List<org.eclipse.xtext.common.types.JvmType>
getParamTypes(org.eclipse.xtext.common.types.JvmOperation jvmOperation, boolean wrapPrimitives)
protected java.lang.String
getReadableSignature(java.lang.String elementName, java.util.List<org.eclipse.xtext.common.types.JvmTypeReference> parameterTypes)
protected java.lang.String
getReadableSignature(org.eclipse.xtext.common.types.JvmExecutable executable)
protected boolean
hasAnnotation(java.lang.Iterable<? extends org.eclipse.xtext.xbase.annotations.xAnnotations.XAnnotation> annotations, java.lang.Class<?> annotationType)
protected boolean
hasAnnotation(XtendAnnotationTarget source, java.lang.Class<?> class1)
protected boolean
hasCycleInHierarchy(org.eclipse.xtext.common.types.JvmGenericType type, java.util.Set<org.eclipse.xtext.common.types.JvmGenericType> processedSuperTypes)
protected boolean
isAnnotation(org.eclipse.xtext.common.types.JvmType jvmType)
protected boolean
isApi(XtendMember member)
protected boolean
isApi(XtendTypeDeclaration type)
protected boolean
isDelegateConstructorCall(org.eclipse.xtext.xbase.XExpression expression)
protected boolean
isInterface(org.eclipse.xtext.common.types.JvmDeclaredType type)
protected boolean
isInvalidWildcard(org.eclipse.xtext.common.types.JvmTypeReference typeRef)
protected boolean
isLocalClassSemantics(org.eclipse.emf.ecore.EObject object)
protected boolean
isMorePrivateThan(org.eclipse.xtext.common.types.JvmVisibility o1, org.eclipse.xtext.common.types.JvmVisibility o2)
protected boolean
isRelevantAnnotationTarget(XtendAnnotationTarget annotationTarget)
protected boolean
isValueExpectedRecursive(org.eclipse.xtext.xbase.XExpression expr)
protected org.eclipse.emf.ecore.EStructuralFeature
nameFeature(org.eclipse.emf.ecore.EObject member)
protected void
reportMissingImplementations(XtendTypeDeclaration xtendClass, org.eclipse.xtext.common.types.JvmGenericType inferredType, java.util.List<org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation> operationsMissingImplementation)
protected void
reportUninitializedField(org.eclipse.xtext.common.types.JvmField field)
protected void
reportUninitializedField(org.eclipse.xtext.common.types.JvmField field, org.eclipse.xtext.common.types.JvmConstructor constructor)
protected org.eclipse.emf.ecore.EStructuralFeature
returnTypeFeature(org.eclipse.emf.ecore.EObject member)
protected java.lang.String
typeLabel(org.eclipse.xtext.common.types.JvmExecutable executable)
protected void
validateInferredType(org.eclipse.xtext.common.types.JvmTypeReference inferredType, XtendMember member, java.lang.String messagePrefix, org.eclipse.emf.ecore.EAttribute location)
-
Methods inherited from class org.eclipse.xtext.xbase.annotations.validation.XbaseWithAnnotationsValidator
checkAllAttributesConfigured
-
Methods inherited from class org.eclipse.xtext.xbase.validation.XbaseValidator
addImportUnusedIssues, canonicalName, checkAssignment, checkAssignment, checkAssignment, checkAssignment, checkAssignment, checkCast, checkCasts, checkCatchClausesOrder, checkClosureParameterTypes, checkClosureParams, checkConflicts, checkConstructorArgumentsAreValid, checkDelegateConstructorIsFirst, 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, checkTypeGuardsOrderWithGenerics, 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, isLocallyUsed, isLocalType, isPrimitiveVoid, isSemicolon, isStaticContext, isTripleEqualsOperation, isXExpressionInsideBlock, memberOfTypeHierarchy, mustBeJavaStatementExpression, populateMaps, reportFieldAlreadyInitialized, toLightweightTypeReference, toLightweightTypeReference
-
Methods inherited from class org.eclipse.xtext.validation.AbstractDeclarativeValidator
acceptError, acceptError, acceptInfo, acceptInfo, acceptWarning, acceptWarning, addIssue, addIssue, addIssue, addIssue, addIssueToState, checkDone, checkIsFromCurrentlyCheckedResource, createDiagnostic, createDiagnostic, createMethodWrapper, error, error, error, error, error, error, error, error, getCancelIndicator, getChain, getCheckMode, getContext, getCurrentMethod, getCurrentObject, getIssueSeverities, getMessageAcceptor, guard, handleExceptionDuringValidation, info, info, info, info, info, info, info, info, internalValidate, isIgnored, newInstance, setInjector, setMessageAcceptor, toDiagnosticSeverity, warning, warning, warning, warning, warning, warning, warning, warning
-
-
-
-
Field Detail
-
visibilityModifers
protected final java.util.Set<java.lang.String> visibilityModifers
-
junitAnnotations
protected final java.util.Set<java.lang.String> junitAnnotations
-
targetInfos
protected final com.google.common.collect.Multimap<java.lang.Class<?>,java.lang.annotation.ElementType> targetInfos
-
-
Method Detail
-
getEPackages
protected java.util.List<org.eclipse.emf.ecore.EPackage> getEPackages()
- Overrides:
getEPackages
in classorg.eclipse.xtext.xbase.annotations.validation.XbaseWithAnnotationsValidator
-
getGeneratorConfig
protected org.eclipse.xtext.xbase.compiler.GeneratorConfig getGeneratorConfig(org.eclipse.emf.ecore.EObject element)
-
hasAnnotation
protected boolean hasAnnotation(XtendAnnotationTarget source, java.lang.Class<?> class1)
-
checkValidExtension
public void checkValidExtension(XtendField field)
-
checkNonRawTypeInferred
public void checkNonRawTypeInferred(XtendField field)
-
checkNonRawTypeInferred
public void checkNonRawTypeInferred(XtendFunction function)
-
checkJUnitMethodReturnType
public void checkJUnitMethodReturnType(XtendFunction function)
-
validateInferredType
protected void validateInferredType(org.eclipse.xtext.common.types.JvmTypeReference inferredType, XtendMember member, java.lang.String messagePrefix, org.eclipse.emf.ecore.EAttribute location)
-
checkValidExtension
public void checkValidExtension(XtendFormalParameter parameter)
-
checkValidExtension
public void checkValidExtension(XtendVariableDeclaration variableDeclaration)
-
checkValidExtension
public void checkValidExtension(XtendParameter parameter)
-
checkValidExtensionType
protected void checkValidExtensionType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature)
-
checkAnnotationTarget
public void checkAnnotationTarget(org.eclipse.xtext.xbase.annotations.xAnnotations.XAnnotation annotation)
-
checkMultipleAnnotations
public void checkMultipleAnnotations(XtendAnnotationTarget annotationTarget)
-
isRelevantAnnotationTarget
protected boolean isRelevantAnnotationTarget(XtendAnnotationTarget annotationTarget)
-
getContainingAnnotationTarget
protected org.eclipse.emf.ecore.EObject getContainingAnnotationTarget(org.eclipse.xtext.xbase.annotations.xAnnotations.XAnnotation annotation)
-
checkNoVoidInDependencyDeclaration
public void checkNoVoidInDependencyDeclaration(XtendField dep)
-
checkNoTypeNameShadowing
public void checkNoTypeNameShadowing(XtendTypeDeclaration type)
-
checkMemberNamesAreUnique
public void checkMemberNamesAreUnique(XtendTypeDeclaration xtendType)
-
checkXtendParameterNotPrimitiveVoid
public void checkXtendParameterNotPrimitiveVoid(XtendParameter param)
-
checkVarArgIsNotExtension
public void checkVarArgIsNotExtension(XtendParameter param)
-
checkVarArgComesLast
public void checkVarArgComesLast(XtendParameter param)
-
checkClassPath
public void checkClassPath(XtendFile xtendFile)
-
checkWhitespaceInRichStrings
public void checkWhitespaceInRichStrings(RichString richString)
-
doCheckWhitespaceIn
protected void doCheckWhitespaceIn(RichString richString)
-
checkSuperTypes
public void checkSuperTypes(XtendClass xtendClass)
-
checkSuperTypes
public void checkSuperTypes(XtendInterface xtendInterface)
-
isAnnotation
protected boolean isAnnotation(org.eclipse.xtext.common.types.JvmType jvmType)
-
checkSuperTypes
public void checkSuperTypes(AnonymousClass anonymousClass)
-
checkStaticMembers
public void checkStaticMembers(AnonymousClass anonymousClass)
-
checkWildcardSupertype
protected void checkWildcardSupertype(XtendTypeDeclaration xtendType, org.eclipse.xtext.common.types.JvmTypeReference superTypeReference, org.eclipse.emf.ecore.EStructuralFeature feature, int index)
-
isInvalidWildcard
protected boolean isInvalidWildcard(org.eclipse.xtext.common.types.JvmTypeReference typeRef)
-
hasCycleInHierarchy
protected boolean hasCycleInHierarchy(org.eclipse.xtext.common.types.JvmGenericType type, java.util.Set<org.eclipse.xtext.common.types.JvmGenericType> processedSuperTypes)
-
checkDuplicateAndOverriddenFunctions
public void checkDuplicateAndOverriddenFunctions(XtendTypeDeclaration xtendType)
-
doCheckDuplicateExecutables
protected void doCheckDuplicateExecutables(org.eclipse.xtext.common.types.JvmGenericType inferredType, org.eclipse.xtext.xbase.typesystem.override.ResolvedFeatures resolvedFeatures, java.util.Set<org.eclipse.emf.ecore.EObject> flaggedOperations)
-
doCheckDuplicateExecutables
protected <Executable extends org.eclipse.xtext.xbase.typesystem.override.IResolvedExecutable> void doCheckDuplicateExecutables(org.eclipse.xtext.common.types.JvmGenericType inferredType, java.util.List<Executable> declaredOperations, com.google.common.base.Function<java.lang.String,java.util.List<Executable>> bySignature, java.util.Set<org.eclipse.emf.ecore.EObject> flaggedOperations)
-
typeLabel
protected java.lang.String typeLabel(org.eclipse.xtext.common.types.JvmExecutable executable)
-
nameFeature
protected org.eclipse.emf.ecore.EStructuralFeature nameFeature(org.eclipse.emf.ecore.EObject member)
-
exceptionsFeature
protected org.eclipse.emf.ecore.EStructuralFeature exceptionsFeature(org.eclipse.emf.ecore.EObject member)
-
returnTypeFeature
protected org.eclipse.emf.ecore.EStructuralFeature returnTypeFeature(org.eclipse.emf.ecore.EObject member)
-
doCheckOverriddenMethods
protected void doCheckOverriddenMethods(XtendTypeDeclaration xtendType, org.eclipse.xtext.common.types.JvmGenericType inferredType, org.eclipse.xtext.xbase.typesystem.override.ResolvedFeatures resolvedFeatures, java.util.Set<org.eclipse.emf.ecore.EObject> flaggedOperations)
-
reportMissingImplementations
protected void reportMissingImplementations(XtendTypeDeclaration xtendClass, org.eclipse.xtext.common.types.JvmGenericType inferredType, java.util.List<org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation> operationsMissingImplementation)
-
doCheckFunctionOverrides
protected void doCheckFunctionOverrides(org.eclipse.xtext.xbase.typesystem.override.ResolvedFeatures resolvedFeatures, java.util.Set<org.eclipse.emf.ecore.EObject> flaggedOperations)
-
doCheckFunctionOverrides
protected void doCheckFunctionOverrides(org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation operation, java.util.Set<org.eclipse.emf.ecore.EObject> flaggedOperations)
-
doCheckFunctionOverrides
protected void doCheckFunctionOverrides(org.eclipse.emf.ecore.EObject sourceElement, org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation resolved, java.util.List<org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation> allInherited)
-
getDeclaratorName
protected java.lang.String getDeclaratorName(org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation resolved)
-
createExceptionMismatchError
protected void createExceptionMismatchError(org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation operation, org.eclipse.emf.ecore.EObject sourceElement, java.util.List<org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation> exceptionMismatch)
-
findPrimarySourceElement
protected org.eclipse.emf.ecore.EObject findPrimarySourceElement(org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation operation)
-
isMorePrivateThan
protected boolean isMorePrivateThan(org.eclipse.xtext.common.types.JvmVisibility o1, org.eclipse.xtext.common.types.JvmVisibility o2)
-
checkDefaultSuperConstructor
public void checkDefaultSuperConstructor(XtendClass xtendClass)
-
isDelegateConstructorCall
protected boolean isDelegateConstructorCall(org.eclipse.xtext.xbase.XExpression expression)
-
isInterface
protected boolean isInterface(org.eclipse.xtext.common.types.JvmDeclaredType type)
-
canonicalName
protected java.lang.String canonicalName(org.eclipse.xtext.common.types.JvmIdentifiableElement element)
-
getReadableSignature
protected java.lang.String getReadableSignature(org.eclipse.xtext.common.types.JvmExecutable executable)
-
doGetReadableSignature
protected java.lang.String doGetReadableSignature(java.lang.String simpleName, java.util.List<org.eclipse.xtext.common.types.JvmFormalParameter> parameters)
-
getReadableSignature
protected java.lang.String getReadableSignature(java.lang.String elementName, java.util.List<org.eclipse.xtext.common.types.JvmTypeReference> parameterTypes)
-
checkParameterNames
public void checkParameterNames(XtendFunction function)
-
checkAbstract
public void checkAbstract(XtendFunction function)
-
checkOperatorSignature
public void checkOperatorSignature(XtendFunction function)
-
checkParameterNames
public void checkParameterNames(XtendConstructor constructor)
-
dispatchFuncWithTypeParams
public void dispatchFuncWithTypeParams(XtendFunction func)
-
checkDispatchFunctions
public void checkDispatchFunctions(XtendClass clazz)
-
checkDispatchNonDispatchConflict
protected void checkDispatchNonDispatchConflict(XtendClass clazz, com.google.common.collect.Multimap<DispatchHelper.DispatchSignature,org.eclipse.xtext.common.types.JvmOperation> dispatchMethods)
-
addDispatchError
protected void addDispatchError(org.eclipse.xtext.common.types.JvmGenericType type, java.lang.Iterable<org.eclipse.xtext.common.types.JvmOperation> operations, java.lang.String message, java.lang.String modifier, java.lang.String ISSUE_ID)
-
addDispatchError
protected void addDispatchError(org.eclipse.xtext.common.types.JvmOperation jvmOperation, java.lang.String message, java.lang.String modifier, java.lang.String ISSUE_ID)
-
getParamTypes
protected java.util.List<org.eclipse.xtext.common.types.JvmType> getParamTypes(org.eclipse.xtext.common.types.JvmOperation jvmOperation, boolean wrapPrimitives)
-
checkNoReturnsInCreateExtensions
public void checkNoReturnsInCreateExtensions(XtendFunction func)
-
checkCreateFunctionIsNotTypeVoid
public void checkCreateFunctionIsNotTypeVoid(XtendFunction func)
-
checkCreateFunctionIsNotGeneric
public void checkCreateFunctionIsNotGeneric(XtendFunction func)
-
checkCreateFunctionIsNotStatic
public void checkCreateFunctionIsNotStatic(XtendFunction func)
-
isValueExpectedRecursive
protected boolean isValueExpectedRecursive(org.eclipse.xtext.xbase.XExpression expr)
- Overrides:
isValueExpectedRecursive
in classorg.eclipse.xtext.xbase.validation.XbaseValidator
-
collectReturnExpressions
protected void collectReturnExpressions(org.eclipse.emf.ecore.EObject expr, java.util.List<org.eclipse.xtext.xbase.XReturnExpression> found)
-
doCheckValidMemberName
public boolean doCheckValidMemberName(XtendMember member)
-
checkLocalUsageOfDeclaredFields
public void checkLocalUsageOfDeclaredFields(XtendField field)
-
getOutermostType
protected final org.eclipse.emf.ecore.EObject getOutermostType(XtendMember member)
Replies the outer-most type of the given member.- Returns:
- the container of
XtendTypeDeclaration
type if it exists, or the direct container.
-
getDeclaratorName
protected java.lang.String getDeclaratorName(org.eclipse.xtext.common.types.JvmFeature feature)
-
checkLocalUsageOfDeclaredXtendFunction
public void checkLocalUsageOfDeclaredXtendFunction(XtendFunction function)
-
checkDeclaredExceptions
public void checkDeclaredExceptions(XtendConstructor constructor)
-
checkTypeParameterForwardReferences
public void checkTypeParameterForwardReferences(XtendClass xtendClass)
-
checkTypeParameterForwardReferences
public void checkTypeParameterForwardReferences(XtendInterface xtendInterface)
-
checkTypeParameterForwardReferences
public void checkTypeParameterForwardReferences(XtendFunction xtendFunction)
-
checkTypeParametersAreUnsupported
public void checkTypeParametersAreUnsupported(XtendConstructor constructor)
-
checkDeclaredExceptions
public void checkDeclaredExceptions(XtendFunction function)
-
checkLeftHandSideIsVariable
public void checkLeftHandSideIsVariable(org.eclipse.xtext.xbase.XAssignment assignment)
-
checkJavaKeywordConflict
public void checkJavaKeywordConflict(XtendField member)
-
checkJavaKeywordConflict
public void checkJavaKeywordConflict(XtendFunction member)
-
checkJavaKeywordConflict
public void checkJavaKeywordConflict(XtendConstructor member)
-
checkJavaKeywordConflict
public void checkJavaKeywordConflict(XtendTypeDeclaration member)
-
checkJavaKeywordConflict
public void checkJavaKeywordConflict(XtendClass member)
-
checkJavaKeywordConflict
public void checkJavaKeywordConflict(XtendInterface member)
-
checkNoJavaKeyword
protected void checkNoJavaKeyword(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EAttribute attribute)
-
checkNonInitializedFieldsHaveAType
public void checkNonInitializedFieldsHaveAType(XtendField field)
-
checkFieldsAreCalledSelf
public void checkFieldsAreCalledSelf(XtendField field)
-
checkFinalFieldInitialization
public void checkFinalFieldInitialization(XtendClass clazz)
-
checkFinalFieldInitialization
public void checkFinalFieldInitialization(XtendInterface xtendInterface)
-
checkJavaDocRefs
public void checkJavaDocRefs(XtendMember member)
-
reportUninitializedField
protected void reportUninitializedField(org.eclipse.xtext.common.types.JvmField field)
- Overrides:
reportUninitializedField
in classorg.eclipse.xtext.xbase.validation.XbaseValidator
-
reportUninitializedField
protected void reportUninitializedField(org.eclipse.xtext.common.types.JvmField field, org.eclipse.xtext.common.types.JvmConstructor constructor)
- Overrides:
reportUninitializedField
in classorg.eclipse.xtext.xbase.validation.XbaseValidator
-
hasAnnotation
protected boolean hasAnnotation(java.lang.Iterable<? extends org.eclipse.xtext.xbase.annotations.xAnnotations.XAnnotation> annotations, java.lang.Class<?> annotationType)
-
checkModifiers
protected void checkModifiers(XtendClass xtendClass)
-
checkModifiers
protected void checkModifiers(XtendInterface xtendInterface)
-
checkModifiers
protected void checkModifiers(XtendEnum xtendEnum)
-
checkModifiers
protected void checkModifiers(XtendAnnotationType annotation)
-
checkModifiers
protected void checkModifiers(XtendField field)
-
getMemberName
protected java.lang.String getMemberName(XtendField field)
-
checkModifiers
protected void checkModifiers(XtendConstructor constructor)
-
checkModifiers
protected void checkModifiers(XtendFunction method)
-
checkInferedApi
protected void checkInferedApi(XtendFunction method)
-
checkInferedApi
protected void checkInferedApi(XtendField field)
-
isApi
protected boolean isApi(XtendMember member)
-
isApi
protected boolean isApi(XtendTypeDeclaration type)
-
checkModifierMatchesTypename
protected void checkModifierMatchesTypename(XtendClass xtendClass)
-
checkImplicitReturn
protected void checkImplicitReturn(XtendFunction method)
-
isLocalClassSemantics
protected boolean isLocalClassSemantics(org.eclipse.emf.ecore.EObject object)
- Overrides:
isLocalClassSemantics
in classorg.eclipse.xtext.xbase.validation.XbaseValidator
-
checkDeprecated
public void checkDeprecated(org.eclipse.xtext.xtype.XImportDeclaration decl)
- Overrides:
checkDeprecated
in classorg.eclipse.xtext.xbase.validation.XbaseValidator
-
checkTernaryExpressionUsed
public void checkTernaryExpressionUsed(org.eclipse.xtext.xbase.XIfExpression exp)
-
addIssue
protected void addIssue(java.lang.String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String issueCode, java.lang.String... issueData)
- Overrides:
addIssue
in classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
-