Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2020-04-11 12:28:09 +0000
committerStephan Herrmann2020-04-11 12:28:09 +0000
commitc4606e8c36137ec06dbe7f751e5a1b6fe3148e55 (patch)
treec4e3c0787b3b203dc4cd5446a35f0229a343bb5a /org.eclipse.jdt.core/compiler/org/eclipse
parentbcd16035e3129a4b2ef22ffacae59d6a5ab65085 (diff)
downloadorg.eclipse.objectteams-c4606e8c36137ec06dbe7f751e5a1b6fe3148e55.tar.gz
org.eclipse.objectteams-c4606e8c36137ec06dbe7f751e5a1b6fe3148e55.tar.xz
org.eclipse.objectteams-c4606e8c36137ec06dbe7f751e5a1b6fe3148e55.zip
Remove trailing whitespace on all lines
- manually replays JDT's 560451
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java16
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java84
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ASTVisitor.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/AbstractAnnotationProcessorManager.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java174
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java20
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java72
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java30
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java98
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AnnotationMethodDeclaration.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayInitializer.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CharLiteral.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompactConstructorDeclaration.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java70
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContainerAnnotation.java20
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoubleLiteral.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExportsStatement.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java16
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExpressionContext.java28
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakedTrackingVariable.java78
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FalseLiteral.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java30
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FloatLiteral.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FunctionalExpression.java50
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IPolyExpression.java20
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntersectionCastTypeReference.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Invocation.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LabeledStatement.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java186
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java32
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java78
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleDeclaration.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleReference.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleStatement.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NullAnnotationMatching.java34
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/PackageVisibilityStatement.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java20
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ProvidesStatement.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java20
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java38
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedSuperReference.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Receiver.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/RecordDeclaration.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java24
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java208
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/RequiresStatement.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleMemberAnnotation.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java18
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java40
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SuperReference.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java44
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java52
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SynchronizedStatement.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThisReference.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TrueLiteral.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java24
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java22
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java28
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnionTypeReference.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnlikelyArgumentCheck.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/YieldStatement.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ComponentInfo.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationDecorator.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationProvider.java34
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ModuleInfo.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/NonNullDefaultAwareTypeAnnotationWalker.java20
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java36
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationWalker.java32
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AttributeNamesConstants.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java96
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java22
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/MultiCatchExceptionLabel.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/Opcodes.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/TypeAnnotationCodeStream.java22
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/VerificationTypeInfo.java18
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/AutomaticModuleNaming.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryType.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryTypeAnnotation.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ICompilationUnit.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModule.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModuleAwareNameEnvironment.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModulePathEntry.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IMultiModuleEntry.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/INameEnvironmentExtension.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ITypeAnnotationWalker.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IUpdatableModule.java16
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ModuleReferenceImpl.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/NameEnvironmentAnswer.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ConditionalFlowInfo.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java26
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/InitializationFlowContext.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/TryFlowContext.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java28
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java106
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/Constant.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ReferenceContext.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotatableTypeSystem.java106
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotationBinding.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ArrayBinding.java40
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding.java28
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryModuleBinding.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java140
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Binding.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java54
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java112
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java22
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding18.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CatchParameterBinding.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java52
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java26
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExceptionFormula.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExpressionFormula.java30
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintFormula.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java42
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ElementValuePair.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExternalAnnotationSuperimposer.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExtraCompilerModifiers.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ImplicitNullAnnotationVerifier.java58
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java142
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceFailureException.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceSubstitution.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceVariable.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IntersectionTypeBinding18.java46
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InvocationSite.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java18
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java70
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MemberTypeBinding.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java24
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java16
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java56
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java36
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NestedTypeBinding.java26
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NullTypeBinding.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java22
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java50
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java84
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolyParameterizedGenericMethodBinding.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolyTypeBinding.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolymorphicMethodBinding.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java16
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReductionResult.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java92
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java212
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceModuleBinding.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java204
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SplitPackageBinding.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticFactoryMethodBinding.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java20
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TagBits.java16
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java48
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBindingVisitor.java34
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBound.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java16
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeIds.java22
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java154
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java38
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/UnresolvedReferenceBinding.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VariableBinding.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VoidTypeBinding.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java24
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ConflictedParser.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java3122
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredElement.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredExport.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredInitializer.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethodMapping.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredModule.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredModuleReference.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredStatement.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredType.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredTypeReference.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredUnit.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveryScanner.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java122
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/IProblemRechecker.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java336
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfInteger.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfModule.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfObject.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/JRTUtil.java28
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/ManifestAnalyzer.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Sorting.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/ConfigHelper.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/IOTConstants.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/InferenceKind.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/OTNameUtils.java22
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/Pair.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/exceptions/InternalCompilerError.java20
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/AbstractMethodMappingDeclaration.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/BaseAllocationExpression.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/BaseCallMessageSend.java32
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/CallinMappingDeclaration.java20
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/FieldAccessSpec.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/LiftingTypeReference.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/MethodSpec.java40
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLiftExpression.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLowerExpression.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialRoleReceiverExpression.java18
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PrecedenceDeclaration.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PrivateRoleMethodCall.java22
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/QualifiedBaseReference.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/RoleClassLiteralAccess.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TSuperMessageSend.java32
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TypeAnchorReference.java30
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/WithinStatement.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/AnchorUsageRanksAttribute.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/BytecodeTransformer.java22
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/CallinMethodMappingsAttribute.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/CalloutMappingsAttribute.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolObjectReader.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolSimpleConverter.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ListValueAttribute.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTByteCodes.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTDynCallinBindingsAttribute.java62
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTSpecialAccessAttribute.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/StaticReplaceBindingsAttribute.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/WordValueAttribute.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/Config.java16
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/Dependencies.java36
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/ITranslationStates.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/StateHelper.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/ArrayLifting.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/ArrayLowering.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/DeclaredLifting.java38
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lifting.java20
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/LiftingEnvironment.java16
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lowering.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AbstractOTReferenceBinding.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AnchorMapping.java32
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/CallinCalloutBinding.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/CallinCalloutScope.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/DependentTypeBinding.java28
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/PrecedenceBinding.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/ProblemAnchorBinding.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/RoleTypeBinding.java24
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticBaseCallSurrogate.java26
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticOTMethodBinding.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticOTTargetMethod.java24
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticRoleBridgeMethodBinding.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticRoleFieldAccess.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/TeamAnchor.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/WeakenedTypeBinding.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementor.java30
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java170
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CalloutImplementor.java16
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CalloutImplementorDyn.java16
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/MethodMappingImplementor.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/MethodMappingResolver.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/FieldModel.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/MethodModel.java26
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/RoleModel.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TypeModel.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/AbstractSmapGenerator.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/LineNumberProvider.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/RoleSmapGenerator.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/copyinheritance/CopyInheritance.java24
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/copyinheritance/TypeLevel.java14
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/InsertTypeAdjustmentsVisitor.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/MethodSignatureEnhancer.java28
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/PredicateGenerator.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReflectionGenerator.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReplaceResultReferenceVisitor.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleMigrationImplementor.java16
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleSplitter.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/SerializationGenerator.java44
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/StandardElementGenerator.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/SwitchOnBaseTypeGenerator.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TeamMethodGenerator.java102
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TransformStatementsVisitor.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstConverter.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstEdit.java10
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstFactory.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstGenerator.java64
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/IAlienScopeTypeReference.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/IDependentTypeSubstitution.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Protections.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/RoleTypeCreator.java40
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Sorting.java18
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/TypeAnalyzer.java14
339 files changed, 5240 insertions, 5240 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java
index c162e3ec7..425a8e263 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java
@@ -107,7 +107,7 @@ public abstract class CategorizedProblem implements IProblem {
* @since 3.18
*/
public static final int CAT_COMPLIANCE = 170;
- /** Category for problems related to preview features
+ /** Category for problems related to preview features
* @since 3.20*/
public static final int CAT_PREVIEW_RELATED = 180;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java
index 0736e1069..ca1600bcd 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Luiz-Otavio Zorzella <zorzella at gmail dot com> - Improve CamelCase algorithm
@@ -1015,7 +1015,7 @@ public static String charToString(char[] charArray) {
/**
* Converts the given list of strings to an array of equal size,
* containing the individual strings converted to char[] each.
- *
+ *
* @param stringList
* @return an array of char[], representing the elements in the input list, or {@code null} if the list was {@code null}.
* @since 3.14
@@ -1108,7 +1108,7 @@ public static final int compareTo(char[] array1, char[] array2) {
* @param array2 the second given array
* @param start the starting position to compare (inclusive)
* @param end the ending position to compare (exclusive)
- *
+ *
* @return the returned value of the comparison between array1 and array2
* @throws NullPointerException if one of the arrays is null
* @since 3.7.1
@@ -1900,7 +1900,7 @@ public static final char[] concatWith(char[][] array, char separator) {
}
/**
- * Answers the concatenation of the given array parts using the given separator between each part
+ * Answers the concatenation of the given array parts using the given separator between each part
* irrespective of whether an element is a zero length array or not.
* <br>
* <br>
@@ -3164,7 +3164,7 @@ public static final boolean match(
if (iPattern == patternEnd) {
if (iName == nameEnd) return true; // the chars match
return false; // pattern has ended but not the name, no match
- }
+ }
if ((patternChar = pattern[iPattern]) == '*') {
break;
}
@@ -4177,13 +4177,13 @@ public static final char[][] splitOnWithEnclosures(
int enclCount = 0;
for (int i = start; i < end; i++) {
if (array[i] == openEncl)
- enclCount++;
+ enclCount++;
else if (array[i] == divider)
wordCount++;
}
if (enclCount == 0)
return CharOperation.splitOn(divider, array, start, end);
-
+
int nesting = 0;
if (openEncl == divider || closeEncl == divider) // divider should be distinct
return CharOperation.NO_CHAR_CHAR;
@@ -4196,7 +4196,7 @@ public static final char[][] splitOnWithEnclosures(
continue;
}
if (array[i] == closeEncl) {
- if (nesting > 0)
+ if (nesting > 0)
--nesting;
continue;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
index bf5b3d823..0f11a07b1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
@@ -225,7 +225,7 @@
* VarLocalWithoutInitizalier
* VarLocalInitializedToNull
* VarLocalCannotBeArrayInitalizers
- * VarLocalCannotBeLambda
+ * VarLocalCannotBeLambda
* VarLocalCannotBeMethodReference
* VarIsReserved
* VarIsReservedInFuture
@@ -380,7 +380,7 @@ void setSourceStart(int sourceStart);
/** @since 3.18 */
int Compliance = 0x00400000;
/** @since 3.20 */
- int PreviewRelated = 0x00200000;
+ int PreviewRelated = 0x00200000;
/**
* Mask to use in order to filter out the category portion of the problem ID.
@@ -420,7 +420,7 @@ void setSourceStart(int sourceStart);
int TypeMismatch = TypeRelated + 17;
/** @since 3.0 */
int IndirectAccessToStaticType = Internal + TypeRelated + 18;
-
+
/** @since 3.10 */
int ReturnTypeMismatch = TypeRelated + 19;
@@ -1581,7 +1581,7 @@ void setSourceStart(int sourceStart);
int IllegalModifierForEnum = TypeRelated + 750;
/** @since 3.1 */
int IllegalModifierForEnumConstant = FieldRelated + 751;
- /** @deprecated - problem could not be reported, enums cannot be local takes precedence
+ /** @deprecated - problem could not be reported, enums cannot be local takes precedence
* @since 3.1 */
int IllegalModifierForLocalEnum = TypeRelated + 752;
/** @since 3.1 */
@@ -1681,7 +1681,7 @@ void setSourceStart(int sourceStart);
/** @since 3.7.1 */
int AssignmentToResource = Internal + 872;
/** @since 3.7.1 */
- int InvalidUnionTypeReferenceSequence = Internal + TypeRelated + 873;
+ int InvalidUnionTypeReferenceSequence = Internal + TypeRelated + 873;
/** @since 3.7.1 */
int AutoManagedResourceNotBelow17 = Syntax + Internal + 874;
/** @since 3.7.1 */
@@ -1735,7 +1735,7 @@ void setSourceStart(int sourceStart);
int DisallowedTargetForContainerAnnotationType = TypeRelated + 898;
/** @since 3.10 */
int RepeatedAnnotationWithContainerAnnotation = TypeRelated + 899;
-
+
/** @since 3.14 */
int AutoManagedVariableResourceNotBelow9 = Syntax + Internal + 1351;
/**
@@ -1749,7 +1749,7 @@ void setSourceStart(int sourceStart);
// associated with it
/** @since 3.2 */
int ExternalProblemFixable = 901;
-
+
/** @since 3.10 */
int ContainerAnnotationTypeHasWrongValueType = TypeRelated + 902;
/** @since 3.10 */
@@ -1766,7 +1766,7 @@ void setSourceStart(int sourceStart);
int RepeatableAnnotationTypeIsInherited = TypeRelated + 908;
/** @since 3.10 */
int RepeatableAnnotationWithRepeatingContainerAnnotation = TypeRelated + 909;
-
+
/**
* Errors/warnings from annotation based null analysis
*/
@@ -1934,10 +1934,10 @@ void setSourceStart(int sourceStart);
/** @since 3.10 */
int DefaultMethodOverridesObjectMethod = MethodRelated + 1051;
-
+
/** @since 3.10 */
int InheritedDefaultMethodConflictsWithOtherInherited = MethodRelated + 1052;
-
+
/** @since 3.10 */
int DuplicateInheritedDefaultMethods = MethodRelated + 1053;
@@ -1953,14 +1953,14 @@ void setSourceStart(int sourceStart);
int IllegalDefaultModifierSpecification = MethodRelated + 1058;
/** @since 3.13 */
int CannotInferInvocationType = TypeRelated + 1059;
-
-
+
+
/** @since 3.13 */
int TypeAnnotationAtQualifiedName = Internal + Syntax + 1060;
/** @since 3.13 */
int NullAnnotationAtQualifyingType = Internal + Syntax + 1061;
-
+
/** @since 3.14*/
int IllegalModifierForInterfaceMethod9 = MethodRelated + 1071;
/** @since 3.14*/
@@ -2064,7 +2064,7 @@ void setSourceStart(int sourceStart);
int UsingTerminallyDeprecatedModule = ModuleRelated + 1431;
/** @since 3.14 */
int UsingTerminallyDeprecatedSinceVersionModule = ModuleRelated + 1432;
-
+
/** @since 3.14 */
int NotAccessibleType = TypeRelated + 1450;
/** @since 3.14 */
@@ -2092,13 +2092,13 @@ void setSourceStart(int sourceStart);
/** @since 3.13 */
int RedundantNullDefaultAnnotationLocal = Internal + 1062;
-
+
/** @since 3.13 */
int RedundantNullDefaultAnnotationField = Internal + 1063;
-
+
/** @since 3.10 */
int GenericInferenceError = 1100; // FIXME: This is just a stop-gap measure, be more specific via https://bugs.eclipse.org/404675
-
+
/** @deprecated - problem is no longer generated (implementation issue has been resolved)
* @since 3.10 */
int LambdaShapeComputationError = 1101;
@@ -2218,7 +2218,7 @@ void setSourceStart(int sourceStart);
int QualifiedReferenceToBaseclass = ROLE_RELATED + 1211; // 2.1.2(d)
int ParameterizedBaseclass = ROLE_RELATED + 1212; // 2.1.2(e)
int NonParameterizedBaseclass = ROLE_RELATED + 1213; // 2.1.2(e)
-
+
int DeprecatedBaseclass = ROLE_RELATED + 1299; // no OTJLD
// ==>> do not change these numbers: they are used from persisted state to determine if base imports are legal:
@@ -2231,7 +2231,7 @@ void setSourceStart(int sourceStart);
// <<==
int BaseImportFromSplitPackage = ROLE_RELATED + 1314; // OT/Equinox
int BaseImportFromSplitPackagePlural = ROLE_RELATED + 1315; // OT/Equinox
-
+
int IllegalImplicitLower = ROLE_RELATED + 2001; // 2.2(b)
int OmitCastForLowering = ROLE_RELATED + 2002; // 2.2(b)
int UseTmpForLoweringInstanceof = ROLE_RELATED + 2003; // 2.2(b)
@@ -2375,7 +2375,7 @@ void setSourceStart(int sourceStart);
int CallinOverriddenInTeam = CALLIN_RELATED + 1013; // 4.1(e)
int CallinToDeprecated = CALLIN_RELATED + 1099; // no OTJLD
-
+
int CallinInNonRole = CALLIN_RELATED + 2001; // 4.2(d)
int CallinWithVisibility = CALLIN_RELATED + 2002; // 4.2(d)
int CallToCallin = CALLIN_RELATED + 2003; // 4.2(d)
@@ -2468,7 +2468,7 @@ void setSourceStart(int sourceStart);
// ==== Joinpoint Queries: ====
int JP_RELATED = OTJ_RELATED + 8*OTCHAP;
// Chapter currently not in use
-
+
// ==== Dependent Types: ====
int DEPENDENT_RELATED = OTJ_RELATED + 9*OTCHAP;
int AnchorReferenceNotAValue = DEPENDENT_RELATED + 210; // 9.2.1
@@ -2502,7 +2502,7 @@ void setSourceStart(int sourceStart);
/**
* @since 3.8
*/
- int IllegalModifierBeforeCallinLabel = SYNTAX_RELATED + 3305; // A.3.3 // FIXME: annotations are still missing from OTJLD A.3.3
+ int IllegalModifierBeforeCallinLabel = SYNTAX_RELATED + 3305; // A.3.3 // FIXME: annotations are still missing from OTJLD A.3.3
int IllegalModifierInMethodSpecRight = SYNTAX_RELATED + 3501; // A.3.5
@@ -2511,7 +2511,7 @@ void setSourceStart(int sourceStart);
int MissingPredicateExpression = SYNTAX_RELATED + 7001; // A.7.1
int ValueParamWrongPosition = SYNTAX_RELATED + 9001; // A.9(a)
-
+
int SyntaxErrorSingleTypeReferenceExpected = SYNTAX_RELATED + 9501; // 1.2.4(c) NOTE(SH): don't yet have a section "Expression" in §A.
// ==== LIMITATIONS: ====
@@ -2548,21 +2548,21 @@ void setSourceStart(int sourceStart);
int TryingToWeaveIntoSystemClass = LIMITATIONS + 26;
int DangerousCallinBinding = LIMITATIONS + 27;
-
+
int UnexpectedAnnotationStructure = LIMITATIONS + 28;
-
+
int IncompatibleOTJByteCodeVersion = LIMITATIONS + 29;
int CallinBindingToInterface = LIMITATIONS + 30;
-
+
int AbstractStaticMethodCalled = LIMITATIONS + 31; // actually a sign of corrupt byte code
-
+
/** @since 4.3 OT 2.2 */
int RoleFileMissingTeamDeclaration = LIMITATIONS + 32;
-
+
/** @since 3.10 OT 2.3 */
int OtreCannotWeaveIntoJava8 = LIMITATIONS + 33;
-
+
/** @since 3.10 OT 2.3 */
int IncompatibleWeavingScheme = LIMITATIONS + 34;
@@ -2590,11 +2590,11 @@ void setSourceStart(int sourceStart);
/** @since 3.14 */
int VarLocalInitializedToNull = TypeRelated + 1504; // Variable initialized to ''null'' needs an explicit target-type
/** @since 3.14 */
- int VarLocalInitializedToVoid = TypeRelated + 1505; // Variable initializer is ''void'' -- cannot infer variable type
+ int VarLocalInitializedToVoid = TypeRelated + 1505; // Variable initializer is ''void'' -- cannot infer variable type
/** @since 3.14 */
int VarLocalCannotBeArrayInitalizers = TypeRelated + 1506; // Array initializer needs an explicit target-type
/** @since 3.14 */
- int VarLocalCannotBeLambda = TypeRelated + 1507; // Lambda expression needs an explicit target-type
+ int VarLocalCannotBeLambda = TypeRelated + 1507; // Lambda expression needs an explicit target-type
/** @since 3.14 */
int VarLocalCannotBeMethodReference = TypeRelated + 1508; // Method reference needs an explicit target-type
/** @since 3.14 */
@@ -2605,47 +2605,47 @@ void setSourceStart(int sourceStart);
int VarIsNotAllowedHere = Syntax + 1511; // ''var'' is not allowed here
/** @since 3.16 */
int VarCannotBeMixedWithNonVarParams = Syntax + 1512; // ''var'' cannot be mixed with explicit or implicit parameters
- /** @since 3.18
+ /** @since 3.18
* @deprecated preview related error - will be removed
* @noreference preview related error */
int SwitchExpressionsIncompatibleResultExpressionTypes = TypeRelated + 1600;
- /** @since 3.18
+ /** @since 3.18
* @deprecated preview related error - will be removed
* @noreference preview related error */
int SwitchExpressionsEmptySwitchBlock = Internal + 1601;
- /** @since 3.18
+ /** @since 3.18
* @deprecated preview related error - will be removed
* @noreference preview related error */
int SwitchExpressionsNoResultExpression = TypeRelated + 1602;
- /** @since 3.18
+ /** @since 3.18
* @deprecated preview related error - will be removed
* @noreference preview related error */
int SwitchExpressionSwitchLabeledBlockCompletesNormally = Internal + 1603;
- /** @since 3.18
+ /** @since 3.18
* @deprecated preview related error - will be removed
* @noreference preview related error */
int SwitchExpressionLastStatementCompletesNormally = Internal + 1604;
- /** @since 3.18
+ /** @since 3.18
* @deprecated preview related error - will be removed
* @noreference preview related error */
int SwitchExpressionTrailingSwitchLabels = Internal + 1605;
- /** @since 3.18
+ /** @since 3.18
* @deprecated preview related error - will be removed
* @noreference preview related error */
int switchMixedCase = Syntax + 1606;
- /** @since 3.18
+ /** @since 3.18
* @deprecated preview related error - will be removed
* @noreference preview related error */
int SwitchExpressionMissingDefaultCase = Internal + 1607;
- /** @since 3.18
+ /** @since 3.18
* @deprecated preview related error - will be removed
* @noreference preview related error */
int SwitchExpressionBreakMissingValue = Internal + 1610;
- /** @since 3.18
+ /** @since 3.18
* @deprecated preview related error - will be removed
* @noreference preview related error */
int SwitchExpressionMissingEnumConstantCase = Internal + 1611;
- /** @since 3.18
+ /** @since 3.18
* @deprecated preview related error - will be removed
* @noreference preview related error */
int SwitchExpressionIllegalLastStatement = Internal + 1612;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ASTVisitor.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ASTVisitor.java
index d608e129b..f2deed497 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ASTVisitor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ASTVisitor.java
@@ -523,7 +523,7 @@ public abstract class ASTVisitor {
// do nothing by default
}
public void endVisit(ReferenceExpression referenceExpression, BlockScope blockScope) {
- // do nothing by default
+ // do nothing by default
}
public void endVisit(IntersectionCastTypeReference intersectionCastTypeReference, ClassScope scope) {
// do nothing by default
@@ -573,7 +573,7 @@ public abstract class ASTVisitor {
// do nothing by default
}
public void endVisit(PrecedenceDeclaration precedenceDeclaration, BlockScope scope) {
- // do nothing by default
+ // do nothing by default
}
// SH et al}
public boolean visit(
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/AbstractAnnotationProcessorManager.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/AbstractAnnotationProcessorManager.java
index 022b20ae9..f3fc317ca 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/AbstractAnnotationProcessorManager.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/AbstractAnnotationProcessorManager.java
@@ -38,7 +38,7 @@ public abstract class AbstractAnnotationProcessorManager {
* @param compiler the given compiler
* @param compilationUnitLocator the given compilation unit locator
* @param javaProject the given java project
- * @param isTestCode
+ * @param isTestCode
*/
public abstract void configureFromPlatform(Compiler compiler, Object compilationUnitLocator, Object javaProject, boolean isTestCode);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
index 313fc5609..178472e9f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
@@ -13,7 +13,7 @@
* Fraunhofer FIRST - extended API and implementation
* Technical University Berlin - extended API and implementation
* Jesper S Moller - Contributions for
- * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
+ * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
* Bug 406982 - [1.8][compiler] Generation of MethodParameters Attribute in classfile
* Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit)
* Bug 412149 - [1.8][compiler] Emit repeated annotations into the designated container
@@ -375,7 +375,7 @@ public class ClassFile implements TypeConstants, TypeIds {
AbstractMethodDeclaration method,
MethodBinding methodBinding) {
-//{ObjectTeams: role ifc methods may have funny modifiers (static, callin), don't destroy the original binding
+//{ObjectTeams: role ifc methods may have funny modifiers (static, callin), don't destroy the original binding
if (methodBinding.declaringClass.isSynthInterface())
methodBinding = new MethodBinding(methodBinding, methodBinding.declaringClass);
// SH}
@@ -466,7 +466,7 @@ public class ClassFile implements TypeConstants, TypeIds {
targetMask = TagBits.AnnotationForType | TagBits.AnnotationForAnnotationType;
else
targetMask = TagBits.AnnotationForType | TagBits.AnnotationForTypeUse;
- attributesNumber += generateRuntimeAnnotations(annotations, targetMask);
+ attributesNumber += generateRuntimeAnnotations(annotations, targetMask);
}
}
}
@@ -517,9 +517,9 @@ public class ClassFile implements TypeConstants, TypeIds {
generateMissingTypesAttribute();
attributesNumber++;
}
-
+
attributesNumber += generateTypeAnnotationAttributeForTypeDeclaration();
-
+
if (this.targetJDK >= ClassFileConstants.JDK11) {
// add nestMember and nestHost attributes
attributesNumber += generateNestAttributes();
@@ -567,7 +567,7 @@ public class ClassFile implements TypeConstants, TypeIds {
attributesNumber += generateModuleAttribute(cud.moduleDeclaration);
if (annotations != null) {
long targetMask = TagBits.AnnotationForModule;
- attributesNumber += generateRuntimeAnnotations(annotations, targetMask);
+ attributesNumber += generateRuntimeAnnotations(annotations, targetMask);
}
char[] mainClass = cud.moduleDeclaration.binding.mainClassName;
if (mainClass != null) {
@@ -922,7 +922,7 @@ public class ClassFile implements TypeConstants, TypeIds {
AbstractMethodDeclaration method,
MethodBinding methodBinding,
CategorizedProblem[] problems) {
-
+
if (methodBinding.declaringClass.isInterface()) {
method.abort(ProblemSeverities.AbortType, null);
}
@@ -1112,7 +1112,7 @@ public class ClassFile implements TypeConstants, TypeIds {
int attributeNumber = generateMethodInfoAttributes(methodBinding);
completeMethodInfo(methodBinding, methodAttributeOffset, attributeNumber);
}
-
+
// add synthetic methods infos
int emittedSyntheticsCount = 0;
SyntheticMethodBinding deserializeLambdaMethod = null;
@@ -1178,7 +1178,7 @@ public class ClassFile implements TypeConstants, TypeIds {
break;
case SyntheticMethodBinding.FactoryMethod:
addSyntheticFactoryMethod(syntheticMethod);
- break;
+ break;
case SyntheticMethodBinding.DeserializeLambda:
deserializeLambdaMethod = syntheticMethod; // delay processing
break;
@@ -1202,7 +1202,7 @@ public class ClassFile implements TypeConstants, TypeIds {
do {
try {
problemResetPC = this.contentsOffset;
- addSyntheticDeserializeLambda(deserializeLambdaMethod,this.referenceBinding.syntheticMethods());
+ addSyntheticDeserializeLambda(deserializeLambdaMethod,this.referenceBinding.syntheticMethods());
restart = false;
} catch (AbortMethod e) {
// Restart code generation if possible ...
@@ -1722,7 +1722,7 @@ public class ClassFile implements TypeConstants, TypeIds {
false,
scope);
}
-
+
if ((this.produceAttributes & ClassFileConstants.ATTR_TYPE_ANNOTATION) != 0) {
attributesNumber += generateTypeAnnotationsOnCodeAttribute();
}
@@ -1737,10 +1737,10 @@ public class ClassFile implements TypeConstants, TypeIds {
this.contents[codeAttributeOffset + 4] = (byte) (codeAttributeLength >> 8);
this.contents[codeAttributeOffset + 5] = (byte) codeAttributeLength;
}
-
+
public int generateTypeAnnotationsOnCodeAttribute() {
int attributesNumber = 0;
-
+
List allTypeAnnotationContexts = ((TypeAnnotationCodeStream) this.codeStream).allTypeAnnotationContexts;
int invisibleTypeAnnotationsCounter = 0;
int visibleTypeAnnotationsCounter = 0;
@@ -1758,7 +1758,7 @@ public class ClassFile implements TypeConstants, TypeIds {
int targetType = ((localVariable.tagBits & TagBits.IsResource) == 0) ? AnnotationTargetTypeConstants.LOCAL_VARIABLE : AnnotationTargetTypeConstants.RESOURCE_VARIABLE;
declaration.getAllAnnotationContexts(targetType, localVariable, allTypeAnnotationContexts);
}
-
+
ExceptionLabel[] exceptionLabels = this.codeStream.exceptionLabels;
for (int i = 0, max = this.codeStream.exceptionLabelsCounter; i < max; i++) {
ExceptionLabel exceptionLabel = exceptionLabels[i];
@@ -1766,7 +1766,7 @@ public class ClassFile implements TypeConstants, TypeIds {
exceptionLabel.exceptionTypeReference.getAllAnnotationContexts(AnnotationTargetTypeConstants.EXCEPTION_PARAMETER, i, allTypeAnnotationContexts, exceptionLabel.se7Annotations);
}
}
-
+
int size = allTypeAnnotationContexts.size();
if (size != 0) {
AnnotationContext[] allTypeAnnotationContextsArray = new AnnotationContext[size];
@@ -2043,7 +2043,7 @@ public class ClassFile implements TypeConstants, TypeIds {
if ((this.produceAttributes & ClassFileConstants.ATTR_TYPE_ANNOTATION) != 0) {
attributesNumber += generateTypeAnnotationsOnCodeAttribute();
}
-
+
// update the number of attributes
// ensure first that there is enough space available inside the contents array
if (codeAttributeAttributeOffset + 2 >= this.contents.length) {
@@ -2450,7 +2450,7 @@ public class ClassFile implements TypeConstants, TypeIds {
MethodBinding binding,
int methodAttributeOffset,
int attributesNumber) {
-
+
if ((this.produceAttributes & ClassFileConstants.ATTR_TYPE_ANNOTATION) != 0) {
List allTypeAnnotationContexts = new ArrayList();
int invisibleTypeAnnotationsCounter = 0;
@@ -2526,7 +2526,7 @@ public class ClassFile implements TypeConstants, TypeIds {
this.contents[methodAttributeOffset++] = (byte) (attributesNumber >> 8);
this.contents[methodAttributeOffset] = (byte) attributesNumber;
}
-
+
private void dumpLocations(int[] locations) {
if (locations == null) {
// no type path
@@ -2558,7 +2558,7 @@ public class ClassFile implements TypeConstants, TypeIds {
this.contents[this.contentsOffset++] = (byte) annotationContext.info;
// bound_index
this.contents[this.contentsOffset++] = (byte) annotationContext.info2;
- break;
+ break;
case AnnotationTargetTypeConstants.FIELD :
case AnnotationTargetTypeConstants.METHOD_RECEIVER :
case AnnotationTargetTypeConstants.METHOD_RETURN :
@@ -2568,7 +2568,7 @@ public class ClassFile implements TypeConstants, TypeIds {
// target_info is parameter index
this.contents[this.contentsOffset++] = (byte) annotationContext.info;
break;
-
+
case AnnotationTargetTypeConstants.INSTANCEOF :
case AnnotationTargetTypeConstants.NEW :
case AnnotationTargetTypeConstants.EXCEPTION_PARAMETER :
@@ -2585,7 +2585,7 @@ public class ClassFile implements TypeConstants, TypeIds {
this.contents[this.contentsOffset++] = (byte) annotationContext.info;
this.contents[this.contentsOffset++] = (byte) annotationContext.info2;
break;
-
+
case AnnotationTargetTypeConstants.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT :
case AnnotationTargetTypeConstants.METHOD_INVOCATION_TYPE_ARGUMENT :
case AnnotationTargetTypeConstants.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT :
@@ -2593,18 +2593,18 @@ public class ClassFile implements TypeConstants, TypeIds {
// bytecode offset
this.contents[this.contentsOffset++] = (byte) (annotationContext.info >> 8);
this.contents[this.contentsOffset++] = (byte) annotationContext.info;
- // type_argument_index
+ // type_argument_index
this.contents[this.contentsOffset++] = (byte) annotationContext.info2;
break;
-
+
case AnnotationTargetTypeConstants.CLASS_EXTENDS :
- case AnnotationTargetTypeConstants.THROWS :
+ case AnnotationTargetTypeConstants.THROWS :
// For CLASS_EXTENDS - info is supertype index (-1 = superclass)
// For THROWS - info is exception table index
this.contents[this.contentsOffset++] = (byte) (annotationContext.info >> 8);
this.contents[this.contentsOffset++] = (byte) annotationContext.info;
break;
-
+
case AnnotationTargetTypeConstants.LOCAL_VARIABLE :
case AnnotationTargetTypeConstants.RESOURCE_VARIABLE :
int localVariableTableOffset = this.contentsOffset;
@@ -2788,7 +2788,7 @@ public class ClassFile implements TypeConstants, TypeIds {
// leave space for attribute_length(4), max_stack(2), max_locals(2), code_length(4)
this.contentsOffset += 12;
}
-
+
private int generateConstantValueAttribute(Constant fieldConstant, FieldBinding fieldBinding, int fieldAttributeOffset) {
int localContentsOffset = this.contentsOffset;
int attributesNumber = 1;
@@ -2959,7 +2959,7 @@ public class ClassFile implements TypeConstants, TypeIds {
if (recordComponents == null)
return 0;
// could be an empty record also, account for zero components as well.
-
+
int numberOfRecordComponents = recordComponents.length;
int exSize = 8 + 2 * numberOfRecordComponents;
@@ -3018,7 +3018,7 @@ public class ClassFile implements TypeConstants, TypeIds {
this.contents[localContentsOffset++] = (byte) (module_version_idx >> 8);
this.contents[localContentsOffset++] = (byte) module_version_idx;
int attrLength = 6;
-
+
// ================= requires section =================
/** u2 requires_count;
{ u2 requires_index;
@@ -3031,7 +3031,7 @@ public class ClassFile implements TypeConstants, TypeIds {
if (localContentsOffset + requiresSize >= this.contents.length) {
resizeContents(requiresSize);
}
-
+
localContentsOffset += 2;
ModuleBinding javaBaseBinding = null;
for(int i = 0; i < module.requiresCount; i++) {
@@ -3098,7 +3098,7 @@ public class ClassFile implements TypeConstants, TypeIds {
this.contents[localContentsOffset++] = (byte) 0;
this.contents[localContentsOffset++] = (byte) 0;
- int exportsToCount = ref.isQualified() ? ref.targets.length : 0;
+ int exportsToCount = ref.isQualified() ? ref.targets.length : 0;
this.contents[localContentsOffset++] = (byte) (exportsToCount >> 8);
this.contents[localContentsOffset++] = (byte) (exportsToCount);
if (exportsToCount > 0) {
@@ -3143,8 +3143,8 @@ public class ClassFile implements TypeConstants, TypeIds {
// TODO opens_flags - check when they are set
this.contents[localContentsOffset++] = (byte) 0;
this.contents[localContentsOffset++] = (byte) 0;
-
- int opensToCount = ref.isQualified() ? ref.targets.length : 0;
+
+ int opensToCount = ref.isQualified() ? ref.targets.length : 0;
this.contents[localContentsOffset++] = (byte) (opensToCount >> 8);
this.contents[localContentsOffset++] = (byte) (opensToCount);
if (opensToCount > 0) {
@@ -3266,7 +3266,7 @@ public class ClassFile implements TypeConstants, TypeIds {
localContentsOffset+= 4;
int packageCountOffset = localContentsOffset;
localContentsOffset+= 2;
-
+
int packagesCount = 0;
for (char[] packageName : packageNames) {
if (packageName == null || packageName.length == 0) continue;
@@ -3401,7 +3401,7 @@ public class ClassFile implements TypeConstants, TypeIds {
}
}
}
-
+
private void generateElementValueForNonConstantExpression(Expression defaultValue, int attributeOffset, TypeBinding defaultValueBinding) {
if (defaultValueBinding != null) {
if (defaultValueBinding.isEnum()) {
@@ -3648,13 +3648,13 @@ public class ClassFile implements TypeConstants, TypeIds {
// Generate the boot strap attribute - since we are only making lambdas and
// functional expressions, we know the size ahead of time - this less general
// than the full invokedynamic scope, but fine for Java 8
-
+
final int contentsEntries = 10;
int exSize = contentsEntries * numberOfBootstraps + 8;
if (exSize + localContentsOffset >= this.contents.length) {
resizeContents(exSize);
}
-
+
int attributeNameIndex =
this.constantPool.literalIndex(AttributeNamesConstants.BootstrapMethodsName);
this.contents[localContentsOffset++] = (byte) (attributeNameIndex >> 8);
@@ -3684,9 +3684,9 @@ public class ClassFile implements TypeConstants, TypeIds {
private int generateLambdaMetaFactoryBootStrapMethods(List functionalExpressionList,
int localContentsOffset, final int contentsEntries) {
- ReferenceBinding javaLangInvokeLambdaMetafactory = this.referenceBinding.scope.getJavaLangInvokeLambdaMetafactory();
+ ReferenceBinding javaLangInvokeLambdaMetafactory = this.referenceBinding.scope.getJavaLangInvokeLambdaMetafactory();
int numberOfBootstraps = functionalExpressionList.size();
-
+
// Depending on the complexity of the expression it may be necessary to use the altMetafactory() rather than the metafactory()
int indexForMetaFactory = 0;
int indexForAltMetaFactory = 0;
@@ -3710,29 +3710,29 @@ public class ClassFile implements TypeConstants, TypeIds {
}
if (extraSpace + contentsEntries + localContentsOffset >= this.contents.length) {
resizeContents(extraSpace + contentsEntries);
- }
-
+ }
+
if (indexForAltMetaFactory == 0) {
- indexForAltMetaFactory =
- this.constantPool.literalIndexForMethodHandle(ClassFileConstants.MethodHandleRefKindInvokeStatic, javaLangInvokeLambdaMetafactory,
+ indexForAltMetaFactory =
+ this.constantPool.literalIndexForMethodHandle(ClassFileConstants.MethodHandleRefKindInvokeStatic, javaLangInvokeLambdaMetafactory,
ConstantPool.ALTMETAFACTORY, ConstantPool.JAVA_LANG_INVOKE_LAMBDAMETAFACTORY_ALTMETAFACTORY_SIGNATURE, false);
}
this.contents[localContentsOffset++] = (byte) (indexForAltMetaFactory >> 8);
this.contents[localContentsOffset++] = (byte) indexForAltMetaFactory;
-
+
// u2 num_bootstrap_arguments
this.contents[localContentsOffset++] = 0;
- this.contents[localContentsOffset++] = (byte) (4 + (markerInterfaces==null?0:1+markerInterfaces.length) +
+ this.contents[localContentsOffset++] = (byte) (4 + (markerInterfaces==null?0:1+markerInterfaces.length) +
(bridges == null ? 0 : 1 + bridges.length));
-
+
int functionalDescriptorIndex = this.constantPool.literalIndexForMethodType(functional.descriptor.original().signature());
this.contents[localContentsOffset++] = (byte) (functionalDescriptorIndex >> 8);
this.contents[localContentsOffset++] = (byte) functionalDescriptorIndex;
-
+
int methodHandleIndex = this.constantPool.literalIndexForMethodHandle(functional.binding.original()); // Speak of " implementation" (erased) version here, adaptations described below.
this.contents[localContentsOffset++] = (byte) (methodHandleIndex >> 8);
this.contents[localContentsOffset++] = (byte) methodHandleIndex;
-
+
char [] instantiatedSignature = functional.descriptor.signature();
int methodTypeIndex = this.constantPool.literalIndexForMethodType(instantiatedSignature);
this.contents[localContentsOffset++] = (byte) (methodTypeIndex >> 8);
@@ -3749,10 +3749,10 @@ public class ClassFile implements TypeConstants, TypeIds {
bitflags |= ClassFileConstants.FLAG_BRIDGES;
}
int indexForBitflags = this.constantPool.literalIndex(bitflags);
-
+
this.contents[localContentsOffset++] = (byte)(indexForBitflags>>8);
this.contents[localContentsOffset++] = (byte)(indexForBitflags);
-
+
if (markerInterfaces != null) {
int markerInterfaceCountIndex = this.constantPool.literalIndex(markerInterfaces.length);
this.contents[localContentsOffset++] = (byte)(markerInterfaceCountIndex>>8);
@@ -3761,7 +3761,7 @@ public class ClassFile implements TypeConstants, TypeIds {
int classTypeIndex = this.constantPool.literalIndexForType(markerInterfaces[m]);
this.contents[localContentsOffset++] = (byte)(classTypeIndex>>8);
this.contents[localContentsOffset++] = (byte)(classTypeIndex);
- }
+ }
}
if (bridges != null) {
int bridgeCountIndex = this.constantPool.literalIndex(bridges.length);
@@ -3772,42 +3772,42 @@ public class ClassFile implements TypeConstants, TypeIds {
int bridgeMethodTypeIndex = this.constantPool.literalIndexForMethodType(bridgeSignature);
this.contents[localContentsOffset++] = (byte) (bridgeMethodTypeIndex >> 8);
this.contents[localContentsOffset++] = (byte) bridgeMethodTypeIndex;
- }
+ }
}
} else {
if (contentsEntries + localContentsOffset >= this.contents.length) {
resizeContents(contentsEntries);
}
if (indexForMetaFactory == 0) {
- indexForMetaFactory = this.constantPool.literalIndexForMethodHandle(ClassFileConstants.MethodHandleRefKindInvokeStatic, javaLangInvokeLambdaMetafactory,
+ indexForMetaFactory = this.constantPool.literalIndexForMethodHandle(ClassFileConstants.MethodHandleRefKindInvokeStatic, javaLangInvokeLambdaMetafactory,
ConstantPool.METAFACTORY, ConstantPool.JAVA_LANG_INVOKE_LAMBDAMETAFACTORY_METAFACTORY_SIGNATURE, false);
}
this.contents[localContentsOffset++] = (byte) (indexForMetaFactory >> 8);
this.contents[localContentsOffset++] = (byte) indexForMetaFactory;
-
+
// u2 num_bootstrap_arguments
this.contents[localContentsOffset++] = 0;
this.contents[localContentsOffset++] = (byte) 3;
-
+
int functionalDescriptorIndex = this.constantPool.literalIndexForMethodType(functional.descriptor.original().signature());
this.contents[localContentsOffset++] = (byte) (functionalDescriptorIndex >> 8);
this.contents[localContentsOffset++] = (byte) functionalDescriptorIndex;
-
+
int methodHandleIndex = this.constantPool.literalIndexForMethodHandle(functional.binding instanceof PolymorphicMethodBinding ? functional.binding : functional.binding.original()); // Speak of " implementation" (erased) version here, adaptations described below.
this.contents[localContentsOffset++] = (byte) (methodHandleIndex >> 8);
this.contents[localContentsOffset++] = (byte) methodHandleIndex;
-
+
char [] instantiatedSignature = functional.descriptor.signature();
int methodTypeIndex = this.constantPool.literalIndexForMethodType(instantiatedSignature);
this.contents[localContentsOffset++] = (byte) (methodTypeIndex >> 8);
- this.contents[localContentsOffset++] = (byte) methodTypeIndex;
+ this.contents[localContentsOffset++] = (byte) methodTypeIndex;
}
}
return localContentsOffset;
}
private int generateObjectMethodsBootStrapMethods(List<TypeBinding> recordList,
int localContentsOffset, final int contentsEntries) {
- ReferenceBinding javaLangRuntimeObjectMethods = this.referenceBinding.scope.getJavaLangRuntimeObjectMethods();
+ ReferenceBinding javaLangRuntimeObjectMethods = this.referenceBinding.scope.getJavaLangRuntimeObjectMethods();
int numberOfBootstraps = recordList.size();
int indexForObjectMethodBootStrap = 0;
for (int i = 0; i < numberOfBootstraps; i++) {
@@ -3815,16 +3815,16 @@ public class ClassFile implements TypeConstants, TypeIds {
resizeContents(contentsEntries);
}
if (indexForObjectMethodBootStrap == 0) {
- indexForObjectMethodBootStrap = this.constantPool.literalIndexForMethodHandle(ClassFileConstants.MethodHandleRefKindInvokeStatic, javaLangRuntimeObjectMethods,
+ indexForObjectMethodBootStrap = this.constantPool.literalIndexForMethodHandle(ClassFileConstants.MethodHandleRefKindInvokeStatic, javaLangRuntimeObjectMethods,
ConstantPool.BOOTSTRAP, ConstantPool.JAVA_LANG_RUNTIME_OBJECTMETHOD_BOOTSTRAP_SIGNATURE, false);
}
this.contents[localContentsOffset++] = (byte) (indexForObjectMethodBootStrap >> 8);
this.contents[localContentsOffset++] = (byte) indexForObjectMethodBootStrap;
-
+
// u2 num_bootstrap_arguments
int numArgsLocation = localContentsOffset;
localContentsOffset += 2;
-
+
TypeBinding type = recordList.get(i);
assert type.isRecord(); // sanity check
char[] recordName = type.constantPoolName();
@@ -3835,12 +3835,12 @@ public class ClassFile implements TypeConstants, TypeIds {
assert type instanceof SourceTypeBinding;
SourceTypeBinding sourceType = (SourceTypeBinding) type;
FieldBinding[] recordComponents = sourceType.getRecordComponents();
-
+
int numArgs = 2 + recordComponents.length;
this.contents[numArgsLocation++] = (byte) (numArgs >> 8);
this.contents[numArgsLocation] = (byte) numArgs;
- String names =
+ String names =
Arrays.stream(recordComponents)
.map(f -> new String(f.name))
.reduce((s1, s2) -> { return s1 + ";" + s2;}) //$NON-NLS-1$
@@ -3854,7 +3854,7 @@ public class ClassFile implements TypeConstants, TypeIds {
}
for (FieldBinding field : recordComponents) {
int methodHandleIndex = this.constantPool.literalIndexForMethodHandleFieldRef(
- ClassFileConstants.MethodHandleRefKindGetField,
+ ClassFileConstants.MethodHandleRefKindGetField,
recordName, field.name, field.type.signature());
this.contents[localContentsOffset++] = (byte) (methodHandleIndex >> 8);
@@ -3944,7 +3944,7 @@ public class ClassFile implements TypeConstants, TypeIds {
this.contentsOffset = localContentsOffset;
return 1;
}
-
+
private int generateLocalVariableTableAttribute(int code_length, boolean methodDeclarationIsStatic, boolean isSynthetic) {
int attributesNumber = 0;
int localContentsOffset = this.contentsOffset;
@@ -3977,7 +3977,7 @@ public class ClassFile implements TypeConstants, TypeIds {
nameIndex = this.constantPool.literalIndex(ConstantPool.This);
this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
this.contents[localContentsOffset++] = (byte) nameIndex;
- declaringClassBinding = (SourceTypeBinding)
+ declaringClassBinding = (SourceTypeBinding)
(this.codeStream.methodDeclaration != null ? this.codeStream.methodDeclaration.binding.declaringClass : this.codeStream.lambdaExpression.binding.declaringClass);
descriptorIndex =
this.constantPool.literalIndex(
@@ -4191,7 +4191,7 @@ public class ClassFile implements TypeConstants, TypeIds {
if (arguments != null) {
int parameterCount = methodBinding.parameters.length;
int argumentCount = arguments.length;
- if (parameterCount > argumentCount) { // synthetics prefixed
+ if (parameterCount > argumentCount) { // synthetics prefixed
int redShift = parameterCount - argumentCount;
System.arraycopy(arguments, 0, arguments = new Argument[parameterCount], redShift, argumentCount);
for (int i = 0; i < redShift; i++)
@@ -4199,7 +4199,7 @@ public class ClassFile implements TypeConstants, TypeIds {
}
attributesNumber += generateRuntimeAnnotationsForParameters(arguments);
}
- }
+ }
}
}
}
@@ -4272,7 +4272,7 @@ public class ClassFile implements TypeConstants, TypeIds {
this.contents[this.contentsOffset++] = (byte) (descriptorIndex >> 8);
this.contents[this.contentsOffset++] = (byte) descriptorIndex;
}
-
+
public void addSyntheticDeserializeLambda(SyntheticMethodBinding methodBinding, SyntheticMethodBinding[] syntheticMethodBindings ) {
generateMethodInfoHeader(methodBinding);
int methodAttributeOffset = this.contentsOffset;
@@ -4299,7 +4299,7 @@ public class ClassFile implements TypeConstants, TypeIds {
.getLineSeparatorPositions());
this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8);
this.contents[methodAttributeOffset] = (byte) attributeNumber;
- }
+ }
/**
* INTERNAL USE-ONLY
@@ -4541,7 +4541,7 @@ public class ClassFile implements TypeConstants, TypeIds {
}
return attributesNumber;
}
-
+
private int generateRuntimeAnnotationsForParameters(Argument[] arguments) {
final int argumentsLength = arguments.length;
final int VISIBLE_INDEX = 0;
@@ -4694,7 +4694,7 @@ public class ClassFile implements TypeConstants, TypeIds {
}
return attributesNumber;
}
-
+
/**
* @param annotationContexts the given annotation contexts
* @param visibleTypeAnnotationsNumber the given number of visible type annotations
@@ -4702,8 +4702,8 @@ public class ClassFile implements TypeConstants, TypeIds {
* @return the number of attributes created while dumping the annotations in the .class file
*/
private int generateRuntimeTypeAnnotations(
- final AnnotationContext[] annotationContexts,
- int visibleTypeAnnotationsNumber,
+ final AnnotationContext[] annotationContexts,
+ int visibleTypeAnnotationsNumber,
int invisibleTypeAnnotationsNumber) {
int attributesNumber = 0;
final int length = annotationContexts.length;
@@ -4803,14 +4803,14 @@ public class ClassFile implements TypeConstants, TypeIds {
* @return the number of attributes created while dumping he method's parameters in the .class file (0 or 1)
*/
private int generateMethodParameters(final MethodBinding binding) {
-
+
if (binding.sourceLambda() != null)
return 0;
int initialContentsOffset = this.contentsOffset;
int length = 0; // count of actual parameters
-
+
AbstractMethodDeclaration methodDeclaration = binding.sourceMethod();
-
+
boolean isConstructor = binding.isConstructor();
TypeBinding[] targetParameters = binding.parameters;
ReferenceBinding declaringClass = binding.declaringClass;
@@ -4903,7 +4903,7 @@ public class ClassFile implements TypeConstants, TypeIds {
private int writeArgumentName(char[] name, int modifiers, int oldLength) {
int ensureRoomForBytes = 4;
if (oldLength == 0) {
- // Make room for
+ // Make room for
ensureRoomForBytes += 7;
this.contentsOffset += 7; // Make room for attribute header + count byte
}
@@ -5519,12 +5519,12 @@ public class ClassFile implements TypeConstants, TypeIds {
this.contentsOffset = localContentsOffset;
return 1;
}
-
+
private void generateTypeAnnotation(AnnotationContext annotationContext, int currentOffset) {
Annotation annotation = annotationContext.annotation.getPersistibleAnnotation();
if (annotation == null || annotation.resolvedType == null)
return;
-
+
int targetType = annotationContext.targetType;
int[] locations = Annotation.getLocations(
@@ -5593,9 +5593,9 @@ public class ClassFile implements TypeConstants, TypeIds {
}
return attributesNumber;
}
-
-
-
+
+
+
private int generateVarargsAttribute() {
int localContentsOffset = this.contentsOffset;
@@ -6204,7 +6204,7 @@ public class ClassFile implements TypeConstants, TypeIds {
this.methodCountOffset = this.contentsOffset;
this.contentsOffset += 2;
}
-
+
private List filterFakeFrames(Set realJumpTargets, Map frames, int codeLength) {
// no more frame to generate
// filter out "fake" frames
@@ -6227,7 +6227,7 @@ public class ClassFile implements TypeConstants, TypeIds {
});
return result;
}
-
+
private TypeBinding getTypeBinding(char[] typeConstantPoolName, Scope scope, boolean checkcast) {
if (typeConstantPoolName.length == 1) {
// base type
@@ -6347,7 +6347,7 @@ public class ClassFile implements TypeConstants, TypeIds {
}
return type;
}
-
+
private boolean isLikelyLocalTypeName(char[] typeName) {
int dollarPos = CharOperation.lastIndexOf('$', typeName);
while (dollarPos != -1 && dollarPos+1 < typeName.length) {
@@ -6446,7 +6446,7 @@ public class ClassFile implements TypeConstants, TypeIds {
Map<Integer, StackMapFrame> frames,
boolean isClinit,
Scope scope) {
- Set realJumpTarget = new HashSet();
+ Set realJumpTarget = new HashSet();
StackMapFrameCodeStream stackMapFrameCodeStream = (StackMapFrameCodeStream) this.codeStream;
int[] framePositions = stackMapFrameCodeStream.getFramePositions();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java
index 323aad2a0..d4ce98922 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java
@@ -619,7 +619,7 @@ public int requestSyntheticSourcePosition(int syntheticLineNumber) {
int oldLen = this.lineSeparatorPositions.length;
assert oldLen <= syntheticLineNumber : "Synthetic line numbers must be higher than existing ones."; //$NON-NLS-1$
int newStartPos = oldEndPos;
- System.arraycopy(this.lineSeparatorPositions, 0,
+ System.arraycopy(this.lineSeparatorPositions, 0,
this.lineSeparatorPositions = new int[syntheticLineNumber], 0, oldLen);
for (int i=oldLen; i<syntheticLineNumber; i++) {
newStartPos += 2;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
index 620a94142..695ef2fe0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
@@ -12,7 +12,7 @@
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
* Technical University Berlin - extended API and implementation
- * Stephan Herrmann - contributions for
+ * Stephan Herrmann - contributions for
* bug 337868 - [compiler][model] incomplete support for package-info.java when using SearchableEnvironment
* bug 186342 - [compiler][null] Using annotations for null checking
*******************************************************************************/
@@ -81,7 +81,7 @@ public class Compiler implements ITypeRequestor, ProblemSeverities {
//public CompilationUnitResult currentCompilationUnitResult;
public CompilationUnitDeclaration[] unitsToProcess;
public int totalUnits; // (totalUnits-1) gives the last unit in unitToProcess
-
+
private Map<String, APTProblem[]> aptProblems;
// name lookup
@@ -575,7 +575,7 @@ public class Compiler implements ITypeRequestor, ProblemSeverities {
this.context = context;
}
}
-
+
protected void backupAptProblems() {
if (this.unitsToProcess == null) return;
for (int i = 0; i < this.totalUnits; i++) {
@@ -604,7 +604,7 @@ public class Compiler implements ITypeRequestor, ProblemSeverities {
}
}
}
-
+
protected void restoreAptProblems() {
if (this.unitsToProcess != null && this.aptProblems!= null) {
for (int i = 0; i < this.totalUnits; i++) {
@@ -983,7 +983,7 @@ public class Compiler implements ITypeRequestor, ProblemSeverities {
long analyzeStart = System.currentTimeMillis();
this.stats.resolveTime += analyzeStart - resolveStart;
/*
- //No need of analysis or generation of code if statements are not required
+ //No need of analysis or generation of code if statements are not required
if (!this.options.ignoreMethodBodies) unit.analyseCode(); // flow analysis
*/
/*OT:*/ Dependencies.ensureState(unit, ITranslationStates.STATE_BYTE_CODE_GENERATED-1);
@@ -1076,9 +1076,9 @@ public class Compiler implements ITypeRequestor, ProblemSeverities {
this.annotationProcessorManager.reset();
}
} while (newUnitSize != 0 || newClassFilesSize != 0);
-
+
this.annotationProcessorManager.processAnnotations(null, null, true);
- // process potential units added in the final round see 329156
+ // process potential units added in the final round see 329156
ICompilationUnit[] newUnits = this.annotationProcessorManager.getNewUnits();
newUnitSize = newUnits.length;
if (newUnitSize != 0) {
@@ -1210,9 +1210,9 @@ public class Compiler implements ITypeRequestor, ProblemSeverities {
//{ObjectTeams: hook for subclasses needing more setting up:
protected Config setupDependencies(boolean verifyMethods, boolean analyzeCode, boolean generateCode) {
return Dependencies.setup(this, this.parser, this.lookupEnvironment,
- verifyMethods,
- analyzeCode && !this.options.ignoreMethodBodies,
- generateCode && !this.options.ignoreMethodBodies,
+ verifyMethods,
+ analyzeCode && !this.options.ignoreMethodBodies,
+ generateCode && !this.options.ignoreMethodBodies,
true, true, false);
}
// SH}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
index 1debc7459..124b1d938 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
@@ -14,7 +14,7 @@
* Karen Moore - fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=207411
* Fraunhofer FIRST - extended API and implementation
* Technical University Berlin - extended API and implementation
- * Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for
+ * Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for
* bug 185682 - Increment/decrement operators mark local variables as read
* bug 186342 - [compiler][null] Using annotations for null checking
* bug 365519 - editorial cleanup after bug 186342 and bug 365387
@@ -38,7 +38,7 @@
* Bug 441693 - [1.8][null] Bogus warning for type argument annotated with @NonNull
* Bug 434483 - [1.8][compiler][inference] Type inference not picked up with method reference
* Bug 446442 - [1.8] merge null annotations from super methods
- * Bug 437072 - [compiler][null] Null analysis emits possibly incorrect warning for new int[][] despite @NonNullByDefault
+ * Bug 437072 - [compiler][null] Null analysis emits possibly incorrect warning for new int[][] despite @NonNullByDefault
* Jesper S Moller - Contributions for
* bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
* bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
@@ -175,7 +175,7 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
// for msg or field references
public static final int NeedReceiverGenericCast = Bit19;
-
+
// for this reference
public static final int IsImplicitThis = Bit3;
@@ -234,10 +234,10 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
// for all method/constructor invocations (msg, alloc, expl. constr call)
public static final int Unchecked = Bit17;
-
+
// for javadoc - used to indicate whether the javadoc has to be resolved
public static final int ResolveJavadoc = Bit17;
-
+
// for empty statement
public static final int IsUsefulEmptyStatement = Bit1;
@@ -323,7 +323,7 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
// for all declarations that can contain type references that have type annotations
public static final int HasTypeAnnotations = Bit21;
-
+
// for type reference (diamond case) - Java 7
public static final int IsUnionType = Bit30;
// Used to tag ParameterizedSingleTypeReference or ParameterizedQualifiedTypeReference when they are
@@ -337,10 +337,10 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
// for annotation reference, signal if annotation was created from a default:
// also used for implicit method creation of records Java 14
public static final int IsSynthetic = ASTNode.Bit7;
-
+
// for all reference context entries.
public static final int HasFunctionalInterfaceTypes = ASTNode.Bit22;
-
+
public static final Argument [] NO_ARGUMENTS = new Argument [0];
public ASTNode() {
@@ -365,7 +365,7 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
}
//{ObjectTeams: make overridable:
/* orig:
- public static boolean checkInvocationArguments(BlockScope scope, Expression receiver, TypeBinding receiverType, MethodBinding method, Expression[] arguments, TypeBinding[] argumentTypes, boolean argsContainCast, InvocationSite invocationSite) {
+ public static boolean checkInvocationArguments(BlockScope scope, Expression receiver, TypeBinding receiverType, MethodBinding method, Expression[] arguments, TypeBinding[] argumentTypes, boolean argsContainCast, InvocationSite invocationSite) {
:giro */
public boolean checkInvocationArguments(BlockScope scope, Expression receiver, TypeBinding receiverType, MethodBinding method, Expression[] arguments, TypeBinding[] argumentTypes, boolean argsContainCast, InvocationSite invocationSite) {
// SH}
@@ -421,7 +421,7 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
for (int i = lastIndex; i < argLength; i++) {
invocationStatus |= checkInvocationArgument(scope, arguments[i], parameterType, argumentTypes[i], originalRawParam);
}
- }
+ }
if (paramLength == argLength) { // 70056
int varargsIndex = paramLength - 1;
ArrayBinding varargsType = (ArrayBinding) params[varargsIndex];
@@ -461,7 +461,7 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
if (scope.compilerOptions().reportUnavoidableGenericTypeProblems || receiver == null || !receiver.forcedToBeRaw(scope.referenceContext())) {
scope.problemReporter().unsafeRawInvocation((ASTNode)invocationSite, method);
}
- } else if (rawOriginalGenericMethod != null
+ } else if (rawOriginalGenericMethod != null
|| uncheckedBoundCheck
|| ((invocationStatus & INVOCATION_ARGUMENT_UNCHECKED) != 0)) {
if (method instanceof ParameterizedGenericMethodBinding) {
@@ -478,11 +478,11 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
}
public final boolean isFieldUseDeprecated(FieldBinding field, Scope scope, int filteredBits) {
- if ((this.bits & ASTNode.InsideJavadoc) == 0 // ignore references inside Javadoc comments
+ if ((this.bits & ASTNode.InsideJavadoc) == 0 // ignore references inside Javadoc comments
&& (filteredBits & IsStrictlyAssigned) == 0 // ignore write access
- && field.isOrEnclosedByPrivateType()
- && !scope.isDefinedInField(field)) // ignore cases where field is used from inside itself
- {
+ && field.isOrEnclosedByPrivateType()
+ && !scope.isDefinedInField(field)) // ignore cases where field is used from inside itself
+ {
if (((filteredBits & IsCompoundAssigned) != 0))
// used, but usage may not be relevant
field.original().compoundUseFlag++;
@@ -593,7 +593,7 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
return false;
}
-
+
public boolean isUnqualifiedSuper() {
return false;
}
@@ -730,7 +730,7 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
* After method lookup has produced 'methodBinding' but when poly expressions have been seen as arguments,
* inspect the arguments to trigger another round of resolving with improved target types from the methods parameters.
* If this resolving produces better types for any arguments, update the 'argumentTypes' array in-place as an
- * intended side effect that will feed better type information in checkInvocationArguments() and others.
+ * intended side effect that will feed better type information in checkInvocationArguments() and others.
* @param invocation the outer invocation which is being resolved
* @param method the method produced by lookup (possibly involving type inference).
* @param argumentTypes the argument types as collected from first resolving the invocation arguments and as used for the method lookup.
@@ -757,7 +757,7 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
continue; // not much we can do without a target type, assume it only happens after some resolve error
if (argumentTypes[i] != null && argumentTypes[i].isPolyType()) {
argument.setExpectedType(parameterType);
- TypeBinding updatedArgumentType;
+ TypeBinding updatedArgumentType;
if (argument instanceof LambdaExpression) {
LambdaExpression lambda = (LambdaExpression) argument;
// avoid complaining about non-kosher descriptor as secondary problem
@@ -805,7 +805,7 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
if (recipient instanceof SourceTypeBinding)
((SourceTypeBinding) recipient).evaluateNullAnnotations();
}
-
+
/**
* Resolve annotations, and check duplicates, answers combined tagBits
* for recognized standard annotations. Return null if nothing new is
@@ -843,7 +843,7 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
//{ObjectTeams: method mappings
case Binding.BINDING :
CallinCalloutBinding mapping = (CallinCalloutBinding) recipient;
- if ((mapping.tagBits & TagBits.AnnotationResolved) != 0)
+ if ((mapping.tagBits & TagBits.AnnotationResolved) != 0)
return annotations;
mapping.tagBits |= TagBits.AnnotationResolved;
if (length > 0) {
@@ -962,9 +962,9 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
}
}
- /* See if the recipient is meta-annotated with @Repeatable and if so validate constraints. We can't do this during resolution of @Repeatable itself as @Target and
+ /* See if the recipient is meta-annotated with @Repeatable and if so validate constraints. We can't do this during resolution of @Repeatable itself as @Target and
@Retention etc could come later
- */
+ */
if (recipient != null && recipient.isTaggedRepeatable()) {
for (int i = 0; i < length; i++) {
Annotation annotation = sourceAnnotations[i];
@@ -973,7 +973,7 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
annotation.checkRepeatableMetaAnnotation(scope);
}
}
-
+
// check duplicate annotations
if (annotations != null && length > 1) {
AnnotationBinding[] distinctAnnotations = annotations; // only copy after 1st duplicate is detected
@@ -1033,12 +1033,12 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
copySE8AnnotationsToType(scope, recipient, sourceAnnotations, false);
return annotations;
}
-
+
/** Resolve JSR308 annotations on a type reference, array creation expression or a wildcard. Type parameters go directly to the subroutine,
By construction the bindings associated with QTR, PQTR etc get resolved first and then annotations for different levels get resolved
and applied at one go. Likewise for multidimensional arrays.
-
- @Returns the annotated type binding.
+
+ @Returns the annotated type binding.
*/
public static TypeBinding resolveAnnotations(BlockScope scope, Annotation[][] sourceAnnotations, TypeBinding type) {
int levels = sourceAnnotations == null ? 0 : sourceAnnotations.length;
@@ -1058,7 +1058,7 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
/**
* "early" handling of NonNullByDefault because for local variables annotations are resolved after their type because of bug
* 96991.
- * @param localDeclaration
+ * @param localDeclaration
*/
public static void handleNonNullByDefault(BlockScope scope, Annotation[] sourceAnnotations, LocalDeclaration localDeclaration) {
if (sourceAnnotations == null || sourceAnnotations.length == 0) {
@@ -1092,13 +1092,13 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
}
-
+
// When SE8 annotations feature in SE7 locations, they get attributed to the declared entity. Copy/move these to the type of the declared entity (field, local, argument etc.)
public static void copySE8AnnotationsToType(BlockScope scope, Binding recipient, Annotation[] annotations, boolean annotatingEnumerator) {
-
+
if (annotations == null || annotations.length == 0 || recipient == null)
return;
-
+
long recipientTargetMask = 0;
switch (recipient.kind()) {
case Binding.LOCAL:
@@ -1114,7 +1114,7 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
default:
return;
}
-
+
AnnotationBinding [] se8Annotations = null;
int se8count = 0;
long se8nullBits = 0;
@@ -1213,11 +1213,11 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
}
private static TypeBinding mergeAnnotationsIntoType(BlockScope scope, AnnotationBinding[] se8Annotations, long se8nullBits, Annotation se8NullAnnotation,
- TypeReference typeRef, TypeBinding existingType)
+ TypeReference typeRef, TypeBinding existingType)
{
if (existingType == null || !existingType.isValidBinding()) return existingType;
TypeReference unionRef = typeRef.isUnionType() ? ((UnionTypeReference) typeRef).typeReferences[0] : null;
-
+
// for arrays: @T X[] SE7 associates @T to the type, but in SE8 it affects the leaf component type
TypeBinding oldLeafType = (unionRef == null) ? existingType.leafComponentType() : unionRef.resolvedType;
if (se8nullBits != 0) {
@@ -1371,12 +1371,12 @@ public static void resolveDeprecatedAnnotations(BlockScope scope, Annotation[] a
public boolean checkingPotentialCompatibility() {
return false;
}
-
+
public void acceptPotentiallyCompatibleMethods(MethodBinding [] methods) {
- // Discard. Interested subclasses should override and grab these goodies.
+ // Discard. Interested subclasses should override and grab these goodies.
}
// --- "default methods" for InvocationSite
-
+
public int sourceStart() {
return this.sourceStart;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
index 56d1b2c98..4cb34088c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
@@ -372,7 +372,7 @@ public abstract class AbstractMethodDeclaration
else if (methodBinding.parameters[i].isFreeTypeVariable()) {
flowInfo.markNullStatus(methodArguments[i].binding, FlowInfo.FREE_TYPEVARIABLE);
}
- } else {
+ } else {
if (methodBinding.parameterNonNullness != null) {
// leverage null-info from parameter annotations:
Boolean nonNullNess = methodBinding.parameterNonNullness[i];
@@ -490,7 +490,7 @@ public abstract class AbstractMethodDeclaration
restart = true;
} else {
restart = false;
- abort = true;
+ abort = true;
}
}
} while (restart);
@@ -516,7 +516,7 @@ public abstract class AbstractMethodDeclaration
// special body for abstract static:
int abstractStatic = ClassFileConstants.AccAbstract | ClassFileConstants.AccStatic;
if ( (this.binding.modifiers & abstractStatic) == abstractStatic
- && !this.binding.declaringClass.isInterface())
+ && !this.binding.declaringClass.isInterface())
{
// Code attribute
attributeNumber += generateAbstractStaticRoleMethodCode(classFile);
@@ -601,7 +601,7 @@ public abstract class AbstractMethodDeclaration
classFile.generateCodeAttributeHeader();
CodeStream codeStream = classFile.codeStream;
codeStream.reset(this, classFile);
- String errorMessage = this.scope.problemReporter().problemFactory.getLocalizedMessage(IProblem.AbstractStaticMethodCalled,
+ String errorMessage = this.scope.problemReporter().problemFactory.getLocalizedMessage(IProblem.AbstractStaticMethodCalled,
new String[]{new String(this.binding.readableName())});
codeStream.generateCodeAttributeForProblemMethod(errorMessage);
int[] startLineIndexes = this.compilationResult.getLineSeparatorPositions();
@@ -846,7 +846,7 @@ public abstract class AbstractMethodDeclaration
if (!(this.isGenerated || this.isCopied))
// SH}
resolveAnnotations(this.scope, this.annotations, this.binding, this.isConstructor());
-
+
long sourceLevel = this.scope.compilerOptions().sourceLevel;
if (sourceLevel < ClassFileConstants.JDK1_8) // otherwise already checked via Argument.createBinding
validateNullAnnotations(this.scope.environment().usesNullTypeAnnotations());
@@ -992,12 +992,12 @@ public abstract class AbstractMethodDeclaration
// similarly hide local types from copy inheritance:
SourceTypeBinding sourceType = this.scope.enclosingSourceType();
if (sourceType != null && sourceType.roleModel != null)
- sourceType.roleModel.purgeLocalTypes(this.sourceStart, this.declarationSourceEnd);
+ sourceType.roleModel.purgeLocalTypes(this.sourceStart, this.declarationSourceEnd);
}
}
// SH}
}
-
+
@Override
public void tagAsHavingIgnoredMandatoryErrors(int problemId) {
// Nothing to do for this context;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
index caf794b11..3a02309c6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
@@ -37,7 +37,7 @@
* Bug 424930 - [1.8][compiler] Regression: "Cannot infer type arguments" error from compiler.
* Bug 427483 - [Java 8] Variables in lambdas sometimes can't be resolved
* Bug 427438 - [1.8][compiler] NPE at org.eclipse.jdt.internal.compiler.ast.ConditionalExpression.generateCode(ConditionalExpression.java:280)
- * Bug 426996 - [1.8][inference] try to avoid method Expression.unresolve()?
+ * Bug 426996 - [1.8][inference] try to avoid method Expression.unresolve()?
* Bug 428352 - [1.8][compiler] Resolution errors don't always surface
* Bug 429203 - [1.8][compiler] NPE in AllocationExpression.binding
* Bug 429430 - [1.8] Lambdas and method reference infer wrong exception type with generics (RuntimeException instead of IOException)
@@ -122,7 +122,7 @@ public class AllocationExpression extends Expression implements IPolyExpression,
public boolean argsContainCast;
public TypeBinding[] argumentTypes = Binding.NO_PARAMETERS;
public boolean argumentsHaveErrors = false;
-
+
//{ObjectTeams: alternate AST in case the creation needs to be redirected through a creator call:
private MessageSend roleCreatorCall = null;
private NameReference valueParam; // if allocation type has value parameter: synthesized argument for ctor call
@@ -145,8 +145,8 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
// process arguments
if (this.arguments != null) {
boolean analyseResources = currentScope.compilerOptions().analyseResourceLeaks;
- boolean hasResourceWrapperType = analyseResources
- && this.resolvedType instanceof ReferenceBinding
+ boolean hasResourceWrapperType = analyseResources
+ && this.resolvedType instanceof ReferenceBinding
&& ((ReferenceBinding)this.resolvedType).hasTypeBit(TypeIds.BitWrapperCloseable);
for (int i = 0, count = this.arguments.length; i < count; i++) {
flowInfo =
@@ -168,7 +168,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643, align with javac on JLS 15.12.2.6
thrownExceptions = currentScope.environment().convertToRawTypes(this.binding.thrownExceptions, true, true);
- }
+ }
// check exception handling
flowContext.checkExceptionHandlers(
thrownExceptions,
@@ -183,7 +183,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
ReferenceBinding declaringClass = this.binding.declaringClass;
MethodScope methodScope = currentScope.methodScope();
- if ((declaringClass.isMemberType() && !declaringClass.isStatic()) ||
+ if ((declaringClass.isMemberType() && !declaringClass.isStatic()) ||
(declaringClass.isLocalType() && !methodScope.isStatic && methodScope.isLambdaScope())) {
// allocating a non-static member type without an enclosing instance of parent type
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=335845
@@ -364,7 +364,7 @@ public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo f
// SH}
ReferenceBinding declaringClass;
- if (codegenBinding.isPrivate() &&
+ if (codegenBinding.isPrivate() &&
!currentScope.enclosingSourceType().isNestmateOf(this.binding.declaringClass) &&
TypeBinding.notEquals(currentScope.enclosingSourceType(), (declaringClass = codegenBinding.declaringClass))) {
@@ -506,7 +506,7 @@ public TypeBinding resolveType(BlockScope scope) {
this.argumentsHaveErrors = true;
} else {
// orig:
- if (this.arguments[i].resolvedType != null)
+ if (this.arguments[i].resolvedType != null)
scope.problemReporter().genericInferenceError("Argument was unexpectedly found resolved", this); //$NON-NLS-1$
if ((this.argumentTypes[i] = argument.resolveType(scope)) == null) {
this.argumentsHaveErrors = true;
@@ -559,7 +559,7 @@ public TypeBinding resolveType(BlockScope scope) {
scope.problemReporter().cannotInstantiate(this.type, this.resolvedType);
return this.resolvedType;
}
- }
+ }
if (isDiamond) {
this.binding = inferConstructorOfElidedParameterizedType(scope);
if (this.binding == null || !this.binding.isValidBinding()) {
@@ -754,7 +754,7 @@ public static MethodBinding inferDiamondConstructor(Scope scope, InvocationSite
ReferenceBinding genericType = ((ParameterizedTypeBinding) type).genericType();
ReferenceBinding enclosingType = type.enclosingType();
ParameterizedTypeBinding allocationType = scope.environment().createParameterizedType(genericType, genericType.typeVariables(), enclosingType);
-
+
// Given the allocation type and the arguments to the constructor, see if we can infer the constructor of the elided parameterized type.
MethodBinding factory = scope.getStaticFactory(allocationType, enclosingType, argumentTypes, site);
if (factory instanceof ParameterizedGenericMethodBinding && factory.isValidBinding()) {
@@ -764,7 +764,7 @@ public static MethodBinding inferDiamondConstructor(Scope scope, InvocationSite
TypeVariableBinding[] constructorTypeVariables = sfmb.getConstructor().typeVariables();
TypeBinding [] constructorTypeArguments = constructorTypeVariables != null ? new TypeBinding[constructorTypeVariables.length] : Binding.NO_TYPES;
if (constructorTypeArguments.length > 0)
- System.arraycopy(((ParameterizedGenericMethodBinding)factory).typeArguments, sfmb.typeVariables().length - constructorTypeArguments.length ,
+ System.arraycopy(((ParameterizedGenericMethodBinding)factory).typeArguments, sfmb.typeVariables().length - constructorTypeArguments.length ,
constructorTypeArguments, 0, constructorTypeArguments.length);
if (allocationType.isInterface()) {
ParameterizedTypeBinding parameterizedType = (ParameterizedTypeBinding) factory.returnType;
@@ -778,11 +778,11 @@ public TypeBinding[] inferElidedTypes(final Scope scope) {
return inferElidedTypes((ParameterizedTypeBinding) this.resolvedType, scope);
}
public TypeBinding[] inferElidedTypes(ParameterizedTypeBinding parameterizedType, final Scope scope) {
-
+
ReferenceBinding genericType = parameterizedType.genericType();
ReferenceBinding enclosingType = parameterizedType.enclosingType();
ParameterizedTypeBinding allocationType = scope.environment().createParameterizedType(genericType, genericType.typeVariables(), enclosingType);
-
+
/* Given the allocation type and the arguments to the constructor, see if we can synthesize a generic static factory
method that would, given the argument types and the invocation site, manufacture a parameterized object of type allocationType.
If we are successful then by design and construction, the parameterization of the return type of the factory method is identical
@@ -815,13 +815,13 @@ public void checkTypeArgumentRedundancy(ParameterizedTypeBinding allocationType,
if (i == allocationType.arguments.length) {
scope.problemReporter().redundantSpecificationOfTypeArguments(this.type, allocationType.arguments);
return;
- }
+ }
}
}
TypeBinding [] inferredTypes;
int previousBits = this.type.bits;
try {
- // checking for redundant type parameters must fake a diamond,
+ // checking for redundant type parameters must fake a diamond,
// so we infer the same results as we would get with a diamond in source code:
this.type.bits |= IsDiamond;
inferredTypes = inferElidedTypes(allocationType, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java
index 65a86f125..70ae15ff7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java
@@ -26,7 +26,7 @@
* Bug 429958 - [1.8][null] evaluate new DefaultLocation attribute of @NonNullByDefault
* Bug 435805 - [1.8][compiler][null] Java 8 compiler does not recognize declaration style null annotations
* Bug 457210 - [1.8][compiler][null] Wrong Nullness errors given on full build build but not on incremental build?
- * Bug 469584 - ClassCastException in Annotation.detectStandardAnnotation (320)
+ * Bug 469584 - ClassCastException in Annotation.detectStandardAnnotation (320)
* Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
* Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
* Bug 409517 - [1.8][compiler] Type annotation problems on more elaborate array references
@@ -62,28 +62,28 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.CallinCalloutB
*/
@SuppressWarnings({"rawtypes", "unchecked"})
public abstract class Annotation extends Expression {
-
+
Annotation persistibleAnnotation = this; // Emit this into class file, unless this is a repeating annotation, in which case package this into the designated container.
-
+
/**
* Return the location for the corresponding annotation inside the type reference, <code>null</code> if none.
*/
public static int[] getLocations(
final Expression reference,
final Annotation annotation) {
-
+
class LocationCollector extends ASTVisitor {
Stack typePathEntries;
Annotation searchedAnnotation;
boolean continueSearch = true;
-
+
public LocationCollector(Annotation currentAnnotation) {
this.typePathEntries = new Stack();
this.searchedAnnotation = currentAnnotation;
}
-
+
private int[] computeNestingDepth(TypeReference typeReference) {
- TypeBinding type = typeReference.resolvedType == null ? null : typeReference.resolvedType.leafComponentType();
+ TypeBinding type = typeReference.resolvedType == null ? null : typeReference.resolvedType.leafComponentType();
int[] nestingDepths = new int[typeReference.getAnnotatableLevels()];
if (type != null && type.isNestedType()) {
int depth = 0;
@@ -102,7 +102,7 @@ public abstract class Annotation extends Expression {
}
return nestingDepths;
}
-
+
private void inspectAnnotations(Annotation [] annotations) {
for (int i = 0, length = annotations == null ? 0 : annotations.length; this.continueSearch && i < length; i++) {
@@ -119,7 +119,7 @@ public abstract class Annotation extends Expression {
this.typePathEntries.push(TYPE_PATH_ELEMENT_ARRAY);
}
}
-
+
private void inspectTypeArguments(TypeReference[] typeReferences) {
for (int i = 0, length = typeReferences == null ? 0 : typeReferences.length; this.continueSearch && i < length; i++) {
int size = this.typePathEntries.size();
@@ -129,7 +129,7 @@ public abstract class Annotation extends Expression {
this.typePathEntries.setSize(size);
}
}
-
+
public boolean visit(TypeReference typeReference, BlockScope scope) {
if (this.continueSearch) {
inspectArrayDimensions(typeReference.getAnnotationsOnDimensions(), typeReference.dimensions());
@@ -151,18 +151,18 @@ public abstract class Annotation extends Expression {
}
}
}
- return false; // if annotation is not found in the type reference, it must be one from SE7 location, typePathEntries captures the proper path entries for them.
- }
+ return false; // if annotation is not found in the type reference, it must be one from SE7 location, typePathEntries captures the proper path entries for them.
+ }
@Override
public boolean visit(SingleTypeReference typeReference, BlockScope scope) {
return visit((TypeReference) typeReference, scope);
}
-
+
@Override
public boolean visit(ArrayTypeReference typeReference, BlockScope scope) {
return visit((TypeReference) typeReference, scope);
}
-
+
@Override
public boolean visit(ParameterizedSingleTypeReference typeReference, BlockScope scope) {
return visit((TypeReference) typeReference, scope);
@@ -172,17 +172,17 @@ public abstract class Annotation extends Expression {
public boolean visit(QualifiedTypeReference typeReference, BlockScope scope) {
return visit((TypeReference) typeReference, scope);
}
-
+
@Override
public boolean visit(ArrayQualifiedTypeReference typeReference, BlockScope scope) {
return visit((TypeReference) typeReference, scope);
}
-
+
@Override
public boolean visit(ParameterizedQualifiedTypeReference typeReference, BlockScope scope) {
return visit((TypeReference) typeReference, scope);
}
-
+
@Override
public boolean visit(Wildcard typeReference, BlockScope scope) {
visit((TypeReference) typeReference, scope);
@@ -210,7 +210,7 @@ public abstract class Annotation extends Expression {
}
return false;
}
-
+
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
@@ -252,7 +252,7 @@ public abstract class Annotation extends Expression {
static final int[] TYPE_PATH_ELEMENT_ARRAY = new int[]{0,0};
static final int[] TYPE_PATH_INNER_TYPE = new int[]{1,0};
static final int[] TYPE_PATH_ANNOTATION_ON_WILDCARD_BOUND = new int[]{2,0};
-
+
public int declarationSourceEnd;
public Binding recipient;
@@ -435,7 +435,7 @@ public abstract class Annotation extends Expression {
} else if (annotationType.hasNullBit(TypeIds.BitNonNullByDefaultAnnotation)) {
tagBits |= determineNonNullByDefaultTagBits(annotationType, valueAttribute);
}
-
+
return tagBits;
}
@@ -470,7 +470,7 @@ public abstract class Annotation extends Expression {
/**
* Convert the value() attribute of @NonNullByDefault into a bitvector a la {@link Binding#NullnessDefaultMASK}.
* This method understands value encodings from source and binary types.
- *
+ *
* <b>pre:</b> null annotation analysis is enabled
*/
public static int nullLocationBitsFromAnnotationValue(Object value) {
@@ -531,7 +531,7 @@ public abstract class Annotation extends Expression {
}
return 0;
}
-
+
public static int nullLocationBitsFromElementTypeAnnotationValue(Object value) {
if (value instanceof Object[]) {
if (((Object[]) value).length == 0) { // ({})
@@ -575,7 +575,7 @@ public abstract class Annotation extends Expression {
return 0;
}
-
+
static String getRetentionName(long tagBits) {
if ((tagBits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) {
// TagBits.AnnotationRuntimeRetention combines both TagBits.AnnotationClassRetention & TagBits.AnnotationSourceRetention
@@ -594,22 +594,22 @@ public abstract class Annotation extends Expression {
}
public void checkRepeatableMetaAnnotation(BlockScope scope) {
-
+
// `this' is the @Repeatable meta annotation, its recipient is the *repeatable* annotation type - we are at the declaration site, not the repeating use site.
-
+
ReferenceBinding repeatableAnnotationType = (ReferenceBinding) this.recipient; // know it to be an annotation type. On target miss we don't get here
-
+
MemberValuePair[] valuePairs = this.memberValuePairs();
if (valuePairs == null || valuePairs.length != 1)
return;
-
+
Object value = valuePairs[0].compilerElementPair.value;
if (!(value instanceof ReferenceBinding))
return; // Has deeper problems, will bark elsewhere.
ReferenceBinding containerAnnotationType = (ReferenceBinding) value;
if (!containerAnnotationType.isAnnotationType())
return; // Has deeper problems, will bark elsewhere.
-
+
repeatableAnnotationType.setContainerAnnotationType(containerAnnotationType); // For now. May be reset later to PRB in case of problems.
checkContainerAnnotationType(valuePairs[0], scope, containerAnnotationType, repeatableAnnotationType, false); // false => not use site, i.e declaration site error reporting requested.
}
@@ -642,34 +642,34 @@ public abstract class Annotation extends Expression {
if (useSite)
checkContainingAnnotationTargetAtUse((Annotation) culpritNode, scope, containerAnnotationType, repeatableAnnotationType);
- else
+ else
checkContainerAnnotationTypeTarget(culpritNode, scope, containerAnnotationType, repeatableAnnotationType);
-
+
long annotationTypeBits = getAnnotationRetention(repeatableAnnotationType);
- long containerTypeBits = getAnnotationRetention(containerAnnotationType);
+ long containerTypeBits = getAnnotationRetention(containerAnnotationType);
// Due to clever layout of the bits, we can compare the absolute value directly
if (containerTypeBits < annotationTypeBits) {
repeatableAnnotationType.tagAsHavingDefectiveContainerType();
scope.problemReporter().containerAnnotationTypeHasShorterRetention(culpritNode, repeatableAnnotationType, getRetentionName(annotationTypeBits), containerAnnotationType, getRetentionName(containerTypeBits));
}
-
+
if ((repeatableAnnotationType.getAnnotationTagBits() & TagBits.AnnotationDocumented) != 0 && (containerAnnotationType.getAnnotationTagBits() & TagBits.AnnotationDocumented) == 0) {
repeatableAnnotationType.tagAsHavingDefectiveContainerType();
scope.problemReporter().repeatableAnnotationTypeIsDocumented(culpritNode, repeatableAnnotationType, containerAnnotationType);
}
-
+
if ((repeatableAnnotationType.getAnnotationTagBits() & TagBits.AnnotationInherited) != 0 && (containerAnnotationType.getAnnotationTagBits() & TagBits.AnnotationInherited) == 0) {
repeatableAnnotationType.tagAsHavingDefectiveContainerType();
scope.problemReporter().repeatableAnnotationTypeIsInherited(culpritNode, repeatableAnnotationType, containerAnnotationType);
}
}
-
+
// This is for error reporting for bad targets at annotation type declaration site (as opposed to the repeat site)
private static void checkContainerAnnotationTypeTarget(ASTNode culpritNode, Scope scope, ReferenceBinding containerType, ReferenceBinding repeatableAnnotationType) {
long tagBits = repeatableAnnotationType.getAnnotationTagBits();
if ((tagBits & TagBits.AnnotationTargetMASK) == 0)
tagBits = TagBits.SE7AnnotationTargetMASK; // absence of @Target meta-annotation implies all SE7 targets not all targets.
-
+
long containerAnnotationTypeTypeTagBits = containerType.getAnnotationTagBits();
if ((containerAnnotationTypeTypeTagBits & TagBits.AnnotationTargetMASK) == 0)
containerAnnotationTypeTypeTagBits = TagBits.SE7AnnotationTargetMASK;
@@ -731,7 +731,7 @@ public abstract class Annotation extends Expression {
}
}
}
-
+
// This is for error reporting for bad targets at the repeated annotation use site (as opposed to repeatable annotation type declaration site) - Leads to better message.
public static void checkContainingAnnotationTargetAtUse(Annotation repeatingAnnotation, BlockScope scope, TypeBinding containerAnnotationType, TypeBinding repeatingAnnotationType) {
// check (meta)target compatibility
@@ -757,7 +757,7 @@ public abstract class Annotation extends Expression {
// we need to filter out only "pure" type use and type parameter annotations, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=392119
if ((metaTagBits & (TagBits.AnnotationForTypeParameter | TagBits.AnnotationForTypeUse)) != 0) {
- if ((metaTagBits & TagBits.SE7AnnotationTargetMASK) == 0) { // not a hybrid target.
+ if ((metaTagBits & TagBits.SE7AnnotationTargetMASK) == 0) { // not a hybrid target.
return false;
}
}
@@ -1090,10 +1090,10 @@ public abstract class Annotation extends Expression {
LocalDeclaration localDeclaration = variable.declaration;
recordSuppressWarnings(scope, localDeclaration.declarationSourceStart, localDeclaration.declarationSourceEnd, compilerOptions.suppressWarnings);
}
- // note: defaultNullness for local declarations has been already been handled earlier by handleNonNullByDefault()
+ // note: defaultNullness for local declarations has been already been handled earlier by handleNonNullByDefault()
break;
}
- }
+ }
if (kind == Binding.TYPE) {
SourceTypeBinding sourceType = (SourceTypeBinding) this.recipient;
if (CharOperation.equals(sourceType.sourceName, TypeConstants.PACKAGE_INFO_NAME))
@@ -1118,7 +1118,7 @@ public abstract class Annotation extends Expression {
}
ReferenceBinding annotationType = (ReferenceBinding) typeBinding;
-
+
if (!annotationType.hasNullBit(TypeIds.BitNonNullByDefaultAnnotation)) {
return 0;
}
@@ -1149,11 +1149,11 @@ public abstract class Annotation extends Expression {
long tagBits = determineNonNullByDefaultTagBits(annotationType, valueAttribute);
return (int) (tagBits & Binding.NullnessDefaultMASK);
}
-
+
public enum AnnotationTargetAllowed {
YES, TYPE_ANNOTATION_ON_QUALIFIED_NAME, NO;
}
-
+
private static AnnotationTargetAllowed isAnnotationTargetAllowed(Binding recipient, BlockScope scope, TypeBinding annotationType, int kind, long metaTagBits) {
switch (kind) {
case Binding.PACKAGE :
@@ -1318,7 +1318,7 @@ public abstract class Annotation extends Expression {
AnnotationTargetAllowed annotationTargetAllowed = isAnnotationTargetAllowed(annotation, scope, annotationType, kind);
if (annotationTargetAllowed != AnnotationTargetAllowed.YES) {
if(annotationTargetAllowed == AnnotationTargetAllowed.TYPE_ANNOTATION_ON_QUALIFIED_NAME) {
- scope.problemReporter().typeAnnotationAtQualifiedName(annotation);
+ scope.problemReporter().typeAnnotationAtQualifiedName(annotation);
} else {
scope.problemReporter().disallowedTargetForAnnotation(annotation);
}
@@ -1337,15 +1337,15 @@ public abstract class Annotation extends Expression {
// Fail fast if the repeating annotation type can't be a container, anyway
MethodBinding[] valueMethods = repeatedAnnotationType.getMethods(TypeConstants.VALUE);
if (valueMethods.length != 1) return; // No violations possible
-
+
TypeBinding methodReturnType = valueMethods[0].returnType;
- // value must be an array
+ // value must be an array
if (! methodReturnType.isArrayType() || methodReturnType.dimensions() != 1) return;
-
+
ArrayBinding array = (ArrayBinding) methodReturnType;
TypeBinding elementsType = array.elementsType();
if (! elementsType.isRepeatableAnnotationType()) return; // Can't be a problem, then
-
+
for (int i= 0; i < sourceAnnotations.length; ++i) {
Annotation annotation = sourceAnnotations[i];
if (TypeBinding.equalsEquals(elementsType, annotation.resolvedType)) {
@@ -1366,7 +1366,7 @@ public abstract class Annotation extends Expression {
}
return true;
}
-
+
// Complain if an attempt to annotate the enclosing type of a static member type is being made.
public static void isTypeUseCompatible(TypeReference reference, Scope scope, Annotation[] annotations) {
if (annotations == null || reference == null || reference.getAnnotatableLevels() == 1)
@@ -1413,7 +1413,7 @@ public abstract class Annotation extends Expression {
public Annotation getPersistibleAnnotation() {
return this.persistibleAnnotation; // will be this for non-repeating annotation, the container for the first of the repeating ones and null for the followers.
}
-
+
public void setPersistibleAnnotation(ContainerAnnotation container) {
this.persistibleAnnotation = container; // will be a legitimate container for the first of the repeating ones and null for the followers.
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AnnotationMethodDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AnnotationMethodDeclaration.java
index 018946947..b75eae8a0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AnnotationMethodDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AnnotationMethodDeclaration.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java
index 3e0317ffc..634931b4f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java
@@ -58,7 +58,7 @@ public class Argument extends LocalDeclaration {
}
this.bits |= (IsLocalDeclarationReachable | IsArgument);
}
-
+
@Override
public boolean isRecoveredFromLoneIdentifier() {
return false;
@@ -86,7 +86,7 @@ public class Argument extends LocalDeclaration {
public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) {
if (this.binding == null) {
- // for default constructors and fake implementation of abstract methods
+ // for default constructors and fake implementation of abstract methods
this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope);
//{ObjectTeams: NPE occurred in Java5.testA119_nestedValueParameter8() ff.
/* orig:
@@ -188,14 +188,14 @@ public class Argument extends LocalDeclaration {
public boolean isVarArgs() {
return this.type != null && (this.type.bits & IsVarArgs) != 0;
}
-
+
public boolean hasElidedType() {
return (this.bits & IsTypeElided) != 0;
}
public boolean hasNullTypeAnnotation(AnnotationPosition position) {
// parser associates SE8 annotations to the declaration
- return TypeReference.containsNullAnnotation(this.annotations) ||
+ return TypeReference.containsNullAnnotation(this.annotations) ||
(this.type != null && this.type.hasNullTypeAnnotation(position)); // just in case
}
@@ -262,7 +262,7 @@ public class Argument extends LocalDeclaration {
scope.problemReporter().localVariableHiding(this, existingVariable, false);
}
}
-
+
if ((this.type.bits & ASTNode.IsUnionType) != 0) {
this.binding = new CatchParameterBinding(this, exceptionType, this.modifiers | ClassFileConstants.AccFinal, false); // argument decl, but local var (where isArgument = false)
this.binding.tagBits |= TagBits.MultiCatchParameter;
@@ -271,7 +271,7 @@ public class Argument extends LocalDeclaration {
}
resolveAnnotations(scope, this.annotations, this.binding, true);
Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
- if (scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled &&
+ if (scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled &&
(this.type.hasNullTypeAnnotation(AnnotationPosition.ANY) || TypeReference.containsNullAnnotation(this.annotations)))
{
scope.problemReporter().nullAnnotationUnsupportedLocation(this.type);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayInitializer.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayInitializer.java
index ccee99f84..dd48533ef 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayInitializer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayInitializer.java
@@ -10,7 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Stephan Herrmann - Contributions for
+ * Stephan Herrmann - Contributions for
* bug 368546 - [compiler][resource] Avoid remaining false positives found when compiling the Eclipse SDK
* bug 370639 - [compiler][resource] restore the default for resource leak warnings
* bug 388996 - [compiler][resource] Incorrect 'potential resource leak'
@@ -69,7 +69,7 @@ public class ArrayInitializer extends Expression {
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
generateCode(null, null, currentScope, codeStream, valueRequired);
}
-
+
/**
* Code generation for a array initializer
*/
@@ -198,7 +198,7 @@ public class ArrayInitializer extends Expression {
if (TypeBinding.notEquals(elementType, expressionType)) // must call before computeConversion() and typeMismatchError()
scope.compilationUnitScope().recordTypeConversion(elementType, expressionType);
- if (expression.isConstantValueOfTypeAssignableToType(expressionType, elementType)
+ if (expression.isConstantValueOfTypeAssignableToType(expressionType, elementType)
|| expressionType.isCompatibleWith(elementType)) {
expression.computeConversion(scope, elementType, expressionType);
} else if (isBoxingCompatible(expressionType, elementType, expression, scope)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java
index fa7d0c157..e8e78285f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java
@@ -30,7 +30,7 @@ public class ArrayQualifiedTypeReference extends QualifiedTypeReference {
super( sources , poss);
this.dimensions = dim ;
- this.annotationsOnDimensions = null;
+ this.annotationsOnDimensions = null;
}
public ArrayQualifiedTypeReference(char[][] sources, int dim, Annotation[][] annotationsOnDimensions, long[] poss) {
@@ -45,7 +45,7 @@ public class ArrayQualifiedTypeReference extends QualifiedTypeReference {
return this.dimensions;
}
-
+
@Override
public int extraDimensions() {
return this.extendedDimensions;
@@ -64,7 +64,7 @@ public class ArrayQualifiedTypeReference extends QualifiedTypeReference {
System.arraycopy(this.annotationsOnDimensions, 0, externalAnnotations, this.extendedDimensions, baseDimensions);
return externalAnnotations;
}
-
+
@Override
public void setAnnotationsOnDimensions(Annotation [][] annotationsOnDimensions) {
this.annotationsOnDimensions = annotationsOnDimensions;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java
index 37773b3dc..9fe6a31f3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java
@@ -65,7 +65,7 @@ public class ArrayTypeReference extends SingleTypeReference {
return this.dimensions;
}
-
+
@Override
public int extraDimensions() {
return this.extendedDimensions;
@@ -84,7 +84,7 @@ public class ArrayTypeReference extends SingleTypeReference {
System.arraycopy(this.annotationsOnDimensions, 0, externalAnnotations, this.extendedDimensions, baseDimensions);
return externalAnnotations;
}
-
+
@Override
public void setAnnotationsOnDimensions(Annotation [][] annotationsOnDimensions) {
this.annotationsOnDimensions = annotationsOnDimensions;
@@ -268,7 +268,7 @@ public class ArrayTypeReference extends SingleTypeReference {
}
return scope.environment().createAnnotatedType(typeBinding, newAnnots);
}
-
+
@Override
public boolean hasNullTypeAnnotation(AnnotationPosition position) {
switch (position) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java
index 7fc731fdc..87b5d8eeb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java
@@ -55,7 +55,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
this.assertExpression.checkNPEbyUnboxing(currentScope, flowContext, flowInfo);
boolean isOptimizedTrueAssertion = cst != Constant.NotAConstant && cst.booleanValue() == true;
boolean isOptimizedFalseAssertion = cst != Constant.NotAConstant && cst.booleanValue() == false;
-
+
flowContext.tagBits |= FlowContext.HIDE_NULL_COMPARISON_WARNING;
FlowInfo conditionFlowInfo = this.assertExpression.analyseCode(currentScope, flowContext, flowInfo.copy());
flowContext.extendTimeToLiveForNullCheckedField(1); // survive this assert as a Statement
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java
index 068ee0f72..592ee6d77 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java
@@ -97,7 +97,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
// just a local variable.
LocalVariableBinding local = this.lhs.localVariableBinding();
this.expression.checkNPEbyUnboxing(currentScope, flowContext, flowInfo);
-
+
FlowInfo preInitInfo = null;
CompilerOptions compilerOptions = currentScope.compilerOptions();
boolean shouldAnalyseResource = local != null
@@ -113,7 +113,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
// analysis of resource leaks needs additional context while analyzing the RHS:
FakedTrackingVariable.preConnectTrackerAcrossAssignment(this, local, this.expression, flowInfo);
}
-
+
flowInfo = ((Reference) this.lhs)
.analyseAssignment(currentScope, flowContext, flowInfo, this, false)
.unconditionalInits();
@@ -243,7 +243,7 @@ public TypeBinding resolveType(BlockScope scope) {
this.resolvedType = lhsType.capture(scope, this.lhs.sourceStart, this.lhs.sourceEnd); // make it unique, `this' shares source end with 'this.expression'.
}
LocalVariableBinding localVariableBinding = this.lhs.localVariableBinding();
- if (localVariableBinding != null && (localVariableBinding.isCatchParameter() || localVariableBinding.isParameter())) {
+ if (localVariableBinding != null && (localVariableBinding.isCatchParameter() || localVariableBinding.isParameter())) {
localVariableBinding.tagBits &= ~TagBits.IsEffectivelyFinal; // as it is already definitely assigned, we can conclude already. Also note: catch parameter cannot be compound assigned.
}
//{ObjectTeams:
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java
index bada77ab3..9853097e1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java
@@ -64,7 +64,7 @@ public FlowInfo analyseCode(
private void analyseConstantExpression(
BlockScope currentScope,
FlowContext flowContext,
- FlowInfo flowInfo,
+ FlowInfo flowInfo,
Expression e) {
if (e.constant == Constant.NotAConstant
&& !e.resolvedType.isEnum()) {
@@ -171,12 +171,12 @@ public Constant[] resolveCase(BlockScope scope, TypeBinding switchExpressionType
}
return Constant.NotAConstantList;
}
-public Constant resolveConstantExpression(BlockScope scope,
- TypeBinding caseType,
- TypeBinding switchExpressionType,
- SwitchStatement switchStatement,
+public Constant resolveConstantExpression(BlockScope scope,
+ TypeBinding caseType,
+ TypeBinding switchExpressionType,
+ SwitchStatement switchStatement,
Expression expression) {
-
+
if (expression.isConstantValueOfTypeAssignableToType(caseType, switchExpressionType)
|| caseType.isCompatibleWith(switchExpressionType)) {
if (caseType.isEnum()) {
@@ -216,7 +216,7 @@ public void traverse(ASTVisitor visitor, BlockScope blockScope) {
} else {
if (this.constantExpression != null) this.constantExpression.traverse(visitor, blockScope);
}
-
+
}
visitor.endVisit(this, blockScope);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java
index 76c76a829..4244e0b33 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java
@@ -562,7 +562,7 @@ public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding ex
case Binding.TYPE_PARAMETER :
this.bits |= ASTNode.UnsafeCast;
return true;
-// (disabled) https://bugs.eclipse.org/bugs/show_bug.cgi?id=240807
+// (disabled) https://bugs.eclipse.org/bugs/show_bug.cgi?id=240807
// case Binding.TYPE :
// if (isNarrowing && match == null && expressionType.isParameterizedType()) {
// this.bits |= ASTNode.UnsafeCast;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CharLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CharLiteral.java
index c45145933..6d1846b63 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CharLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CharLiteral.java
@@ -20,9 +20,9 @@ import org.eclipse.jdt.internal.compiler.lookup.*;
import org.eclipse.jdt.internal.compiler.parser.ScannerHelper;
public class CharLiteral extends NumberLiteral {
-
+
char value;
-
+
public CharLiteral(char[] token, int s, int e) {
super(token, s, e);
computeValue();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java
index ac36c80e5..84ea74f5e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
@@ -117,14 +117,14 @@ public class ClassLiteralAccess extends Expression {
this.constant = Constant.NotAConstant;
if ((this.targetType = this.type.resolveType(scope, true /* check bounds*/)) == null)
return null;
-
+
/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=320463
https://bugs.eclipse.org/bugs/show_bug.cgi?id=312076
JLS3 15.8.2 forbids the type named in the class literal expression from being a parameterized type.
And the grammar in 18.1 disallows (where X and Y are some concrete types) constructs of the form
Outer<X>.class, Outer<X>.Inner.class, Outer.Inner<X>.class, Outer<X>.Inner<Y>.class etc.
Corollary wise, we should resolve the type of the class literal expression to be a raw type as
- class literals exist only for the raw underlying type.
+ class literals exist only for the raw underlying type.
*/
LookupEnvironment environment = scope.environment();
this.targetType = environment.convertToRawType(this.targetType, true /* force conversion of enclosing types*/);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompactConstructorDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompactConstructorDeclaration.java
index 7207702a0..cc76e7a68 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompactConstructorDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompactConstructorDeclaration.java
@@ -21,7 +21,7 @@ import org.eclipse.jdt.internal.compiler.parser.Parser;
public class CompactConstructorDeclaration extends ConstructorDeclaration {
public RecordDeclaration recordDeclaration;
-
+
public CompactConstructorDeclaration(CompilationResult compilationResult) {
super(compilationResult);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
index 5ab4b3619..39ab8f8f7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
@@ -301,7 +301,7 @@ public void finalizeProblems() {
return;
}
int removed = 0;
-/*
+/*
IrritantSet[] foundIrritants = new IrritantSet[this.suppressWarningsCount];
:giro */
// SH}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java
index 947d123b1..abe74f755 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Stephan Herrmann - Contribution for
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java
index 852ae0c44..89ee11073 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java
@@ -51,7 +51,7 @@ public class ConditionalExpression extends OperatorExpression implements IPolyEx
int trueInitStateIndex = -1;
int falseInitStateIndex = -1;
int mergedInitStateIndex = -1;
-
+
// we compute and store the null status during analyseCode (https://bugs.eclipse.org/324178):
private int nullStatus = FlowInfo.UNKNOWN;
int ifFalseNullStatus;
@@ -122,14 +122,14 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
this.valueIfFalse.checkNPEbyUnboxing(currentScope, flowContext, falseFlowInfo);
flowContext.conditionalLevel--;
-
+
// merge if-true & if-false initializations
FlowInfo mergedInfo;
if (isConditionOptimizedTrue){
mergedInfo = trueFlowInfo.addPotentialInitializationsFrom(falseFlowInfo);
if (this.ifTrueNullStatus != -1) {
this.nullStatus = this.ifTrueNullStatus;
- } else {
+ } else {
this.nullStatus = this.valueIfTrue.nullStatus(trueFlowInfo, flowContext);
}
} else if (isConditionOptimizedFalse) {
@@ -143,12 +143,12 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
// (2) For definite assignment analysis (JLS 16.1.5) of boolean conditional expressions of the form
// "if (c1 ? expr1 : expr2) use(v);" we need to check whether any variable v will be definitely
// assigned whenever the entire conditional expression evaluates to true (to reach the then branch).
- // I.e., we need to collect flowInfo *towards* the overall outcome true/false
+ // I.e., we need to collect flowInfo *towards* the overall outcome true/false
// (regardless of the evaluation of the condition).
-
+
// to support (1) use the infos of both branches originating from the condition for computing the nullStatus:
computeNullStatus(trueFlowInfo, falseFlowInfo, flowContext);
-
+
// to support (2) we split the true/false branches according to their inner structure. Consider this:
// if (b ? false : (true && (v = false))) return v; -- ok
// - expr1 ("false") has no path towards true (mark as unreachable)
@@ -168,16 +168,16 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
UnconditionalFlowInfo trueFlowTowardsFalse = trueFlowInfo.initsWhenFalse().unconditionalInits();
UnconditionalFlowInfo falseFlowTowardsFalse = falseFlowInfo.initsWhenFalse().unconditionalInits();
if (isValueIfTrueOptimizedFalse) {
- trueFlowTowardsTrue.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
+ trueFlowTowardsTrue.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
}
if (isValueIfFalseOptimizedFalse) {
- falseFlowTowardsTrue.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
+ falseFlowTowardsTrue.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
}
if (isValueIfTrueOptimizedTrue) {
- trueFlowTowardsFalse.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
+ trueFlowTowardsFalse.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
}
if (isValueIfFalseOptimizedTrue) {
- falseFlowTowardsFalse.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
+ falseFlowTowardsFalse.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
}
mergedInfo =
FlowInfo.conditional(
@@ -187,7 +187,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
this.mergedInitStateIndex =
currentScope.methodScope().recordInitializationStates(mergedInfo);
mergedInfo.setReachMode(mode);
-
+
return mergedInfo;
}
@@ -201,7 +201,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
}
private void computeNullStatus(FlowInfo trueBranchInfo, FlowInfo falseBranchInfo, FlowContext flowContext) {
- // given that the condition cannot be optimized to a constant
+ // given that the condition cannot be optimized to a constant
// we now merge the nullStatus from both branches:
if (this.ifTrueNullStatus == -1) { // has this status been pre-computed?
this.ifTrueNullStatus = this.valueIfTrue.nullStatus(trueBranchInfo, flowContext);
@@ -459,7 +459,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
final long sourceLevel = scope.compilerOptions().sourceLevel;
boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5;
this.use18specifics = sourceLevel >= ClassFileConstants.JDK1_8;
-
+
if (this.use18specifics) {
if (this.expressionContext == ASSIGNMENT_CONTEXT || this.expressionContext == INVOCATION_CONTEXT) {
this.valueIfTrue.setExpressionContext(this.expressionContext);
@@ -468,7 +468,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
this.valueIfFalse.setExpectedType(this.expectedType);
}
}
-
+
if (this.constant != Constant.NotAConstant) {
this.constant = Constant.NotAConstant;
TypeBinding conditionType = this.condition.resolveTypeExpecting(scope, TypeBinding.BOOLEAN);
@@ -487,7 +487,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
this.originalValueIfTrueType = this.valueIfTrue.resolveType(scope);
if (this.originalValueIfFalseType.kind() == Binding.POLY_TYPE)
this.originalValueIfFalseType = this.valueIfFalse.resolveType(scope);
-
+
if (this.originalValueIfTrueType == null || !this.originalValueIfTrueType.isValidBinding())
return this.resolvedType = null;
if (this.originalValueIfFalseType == null || !this.originalValueIfFalseType.isValidBinding())
@@ -726,7 +726,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
public void setExpectedType(TypeBinding expectedType) {
this.expectedType = expectedType;
}
-
+
@Override
public void setExpressionContext(ExpressionContext context) {
this.expressionContext = context;
@@ -736,7 +736,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
public ExpressionContext getExpressionContext() {
return this.expressionContext;
}
-
+
@Override
public Expression[] getPolyExpressions() {
Expression [] truePolys = this.valueIfTrue.getPolyExpressions();
@@ -753,46 +753,46 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
@Override
public boolean isPertinentToApplicability(TypeBinding targetType, MethodBinding method) {
- return this.valueIfTrue.isPertinentToApplicability(targetType, method)
+ return this.valueIfTrue.isPertinentToApplicability(targetType, method)
&& this.valueIfFalse.isPertinentToApplicability(targetType, method);
}
-
+
@Override
public boolean isPotentiallyCompatibleWith(TypeBinding targetType, Scope scope) {
- return this.valueIfTrue.isPotentiallyCompatibleWith(targetType, scope)
+ return this.valueIfTrue.isPotentiallyCompatibleWith(targetType, scope)
&& this.valueIfFalse.isPotentiallyCompatibleWith(targetType, scope);
}
-
+
@Override
public boolean isFunctionalType() {
return this.valueIfTrue.isFunctionalType() || this.valueIfFalse.isFunctionalType(); // Even if only one arm is functional type, this will require a functional interface target
}
-
+
@Override
public boolean isPolyExpression() throws UnsupportedOperationException {
-
+
if (!this.use18specifics)
return false;
-
+
if (this.isPolyExpression)
return true;
if (this.expressionContext != ASSIGNMENT_CONTEXT && this.expressionContext != INVOCATION_CONTEXT)
return false;
-
+
if (this.originalValueIfTrueType == null || this.originalValueIfFalseType == null) // resolution error.
return false;
-
+
if (this.valueIfTrue.isPolyExpression() || this.valueIfFalse.isPolyExpression())
return true;
-
+
// "... unless both operands produce primitives (or boxed primitives)":
if (this.originalValueIfTrueType.isBaseType() || (this.originalValueIfTrueType.id >= TypeIds.T_JavaLangByte && this.originalValueIfTrueType.id <= TypeIds.T_JavaLangBoolean)) {
if (this.originalValueIfFalseType.isBaseType() || (this.originalValueIfFalseType.id >= TypeIds.T_JavaLangByte && this.originalValueIfFalseType.id <= TypeIds.T_JavaLangBoolean))
return false;
}
-
- // clause around generic method's return type prior to instantiation needs double check.
+
+ // clause around generic method's return type prior to instantiation needs double check.
return this.isPolyExpression = true;
}
@@ -808,17 +808,17 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
return isPolyExpression() ? this.valueIfTrue.isCompatibleWith(left, scope) && this.valueIfFalse.isCompatibleWith(left, scope) :
super.isCompatibleWith(left, scope);
}
-
+
@Override
public boolean isBoxingCompatibleWith(TypeBinding targetType, Scope scope) {
// Note: compatibility check may have failed in just one arm and we may have reached here.
- return isPolyExpression() ? (this.valueIfTrue.isCompatibleWith(targetType, scope) ||
- this.valueIfTrue.isBoxingCompatibleWith(targetType, scope)) &&
- (this.valueIfFalse.isCompatibleWith(targetType, scope) ||
+ return isPolyExpression() ? (this.valueIfTrue.isCompatibleWith(targetType, scope) ||
+ this.valueIfTrue.isBoxingCompatibleWith(targetType, scope)) &&
+ (this.valueIfFalse.isCompatibleWith(targetType, scope) ||
this.valueIfFalse.isBoxingCompatibleWith(targetType, scope)) :
super.isBoxingCompatibleWith(targetType, scope);
- }
-
+ }
+
@Override
public boolean sIsMoreSpecific(TypeBinding s, TypeBinding t, Scope scope) {
if (super.sIsMoreSpecific(s, t, scope))
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
index 5ee3d7ed0..735f51b5b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
@@ -122,7 +122,7 @@ public void analyseCode(ClassScope classScope, InitializationFlowContext initial
// ... except for base ctor issues:
if (MethodModel.callsBaseCtor(this.binding.copyInheritanceSrc))
MethodModel.setCallsBaseCtor(this);
- if ( this.arguments == null
+ if ( this.arguments == null
&& !MethodModel.callsBaseCtor(this.binding)
&& roleType.baseclass() != null)
{
@@ -165,7 +165,7 @@ public void analyseCode(ClassScope classScope, InitializationFlowContext initial
this.scope.problemReporter().baseConstructorCallInLiftingConstructor(this);
} else {
if (!calledHere && !calledIndirectly && !Lifting.isLiftingCtor(selfCall)) {
- if (!(isDefaultConstructor() && roleType.roleModel != null && roleType.roleModel.hasBaseclassProblem())) // ignore if wrong def.ctor was created
+ if (!(isDefaultConstructor() && roleType.roleModel != null && roleType.roleModel.hasBaseclassProblem())) // ignore if wrong def.ctor was created
this.scope.problemReporter().missingCallToBaseConstructor(
this, this.binding.declaringClass);
} else if (calledHere && calledIndirectly) {
@@ -202,7 +202,7 @@ public void analyseCode(ClassScope classScope, InitializationFlowContext initial
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=270446, When the AST built is an abridged version
// we don't have all tree nodes we would otherwise expect. (see ASTParser.setFocalPosition)
if (this.constructorCall == null)
- break checkUnused;
+ break checkUnused;
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=264991, Don't complain about this
// constructor being unused if the base class doesn't have a no-arg constructor.
// See that a seemingly unused constructor that chains to another constructor with a
@@ -239,7 +239,7 @@ public void analyseCode(ClassScope classScope, InitializationFlowContext initial
for (int i = 0, length = this.typeParameters.length; i < length; ++i) {
TypeParameter typeParameter = this.typeParameters[i];
if ((typeParameter.binding.modifiers & ExtraCompilerModifiers.AccLocallyUsed) == 0) {
- this.scope.problemReporter().unusedTypeParameter(typeParameter);
+ this.scope.problemReporter().unusedTypeParameter(typeParameter);
}
}
}
@@ -352,7 +352,7 @@ public void analyseCode(ClassScope classScope, InitializationFlowContext initial
if (!isValueProvidedUsingAnnotation(fieldDecl))
this.scope.problemReporter().uninitializedNonNullField(
field,
- ((this.bits & ASTNode.IsDefaultConstructor) != 0)
+ ((this.bits & ASTNode.IsDefaultConstructor) != 0)
? (ASTNode) fieldDecl
: this);
}
@@ -386,7 +386,7 @@ protected void checkAndGenerateFieldAssignment(FlowContext flowContext, FlowInfo
return;
}
boolean isValueProvidedUsingAnnotation(FieldDeclaration fieldDecl) {
- // a member field annotated with @Inject is considered to be initialized by the injector
+ // a member field annotated with @Inject is considered to be initialized by the injector
if (fieldDecl.annotations != null) {
int length = fieldDecl.annotations.length;
for (int i = 0; i < length; i++) {
@@ -590,7 +590,7 @@ private void internalGenerateCode(ClassScope classScope, ClassFile classFile) {
//{ObjectTeams: treat value parameters similar to enclosing instances:
VariableBinding[] syntheticArguments = declaringClass.valueParamSynthArgs();
argSlotSize += syntheticArguments.length;
-/* orig:
+/* orig:
this.scope.computeLocalVariablePositions(1 + enumOffset, codeStream);
:giro */
this.scope.computeLocalVariablePositions(1 + enumOffset + syntheticArguments.length, codeStream);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContainerAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContainerAnnotation.java
index 32f328156..b865829a8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContainerAnnotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContainerAnnotation.java
@@ -22,29 +22,29 @@ import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
public class ContainerAnnotation extends SingleMemberAnnotation {
-
+
private Annotation [] containees;
private ArrayInitializer memberValues;
-
+
public ContainerAnnotation(Annotation repeatingAnnotation, ReferenceBinding containerAnnotationType, BlockScope scope) {
-
+
char [][] containerTypeName = containerAnnotationType.compoundName;
if (containerTypeName.length == 1) {
this.type = new SingleTypeReference(containerTypeName[0], 0);
} else {
this.type = new QualifiedTypeReference(containerTypeName, new long [containerTypeName.length]);
}
-
+
this.sourceStart = repeatingAnnotation.sourceStart;
this.sourceEnd = repeatingAnnotation.sourceEnd;
-
+
this.resolvedType = containerAnnotationType;
this.recipient = repeatingAnnotation.recipient;
this.containees = new Annotation[0];
this.memberValue = this.memberValues = new ArrayInitializer();
addContainee(repeatingAnnotation);
}
-
+
public void addContainee(Annotation repeatingAnnotation) {
final int length = this.containees.length;
System.arraycopy(this.containees, 0, this.containees = new Annotation[length + 1], 0, length);
@@ -52,7 +52,7 @@ public class ContainerAnnotation extends SingleMemberAnnotation {
this.memberValues.expressions = this.containees;
repeatingAnnotation.setPersistibleAnnotation(length == 0 ? this : null);
}
-
+
// Resolve the compiler synthesized container annotation.
@Override
public TypeBinding resolveType(BlockScope scope) {
@@ -74,11 +74,11 @@ public class ContainerAnnotation extends SingleMemberAnnotation {
this.resolvedType = containerAnnotationType = repeatingAnnotationType.containerAnnotationType();
if (!this.resolvedType.isValidBinding())
return this.resolvedType;
-
- // OK, the declaration site of the repeating annotation type as well as the use site where the annotations actually repeat pass muster.
+
+ // OK, the declaration site of the repeating annotation type as well as the use site where the annotations actually repeat pass muster.
MethodBinding[] methods = containerAnnotationType.methods();
MemberValuePair pair = memberValuePairs()[0];
-
+
for (int i = 0, length = methods.length; i < length; i++) {
MethodBinding method = methods[i];
if (CharOperation.equals(method.selector, TypeConstants.VALUE)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java
index 3b7c1025f..548bedd3c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java
@@ -107,7 +107,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
(this.action == null
? actionInfo
: (actionInfo.mergedWith(loopingContext.initsOnContinue))).copy());
- /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=367023, we reach the condition at the bottom via two arcs,
+ /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=367023, we reach the condition at the bottom via two arcs,
one by free fall and another by continuing... Merge initializations propagated through the two pathways,
cf, while and for loops.
*/
@@ -136,7 +136,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
loopingContext.simulateThrowAfterLoopBack(loopbackFlowInfo);
}
// end of loop
- FlowInfo mergedInfo =
+ FlowInfo mergedInfo =
FlowInfo.mergedOptimizedBranches(
(loopingContext.initsOnBreak.tagBits & FlowInfo.UNREACHABLE) != 0
? loopingContext.initsOnBreak
@@ -250,7 +250,7 @@ public boolean doesNotCompleteNormally() {
boolean isConditionTrue = cst == null || cst != Constant.NotAConstant && cst.booleanValue() == true;
cst = this.condition.optimizedBooleanConstant();
boolean isConditionOptimizedTrue = cst == null ? true : cst != Constant.NotAConstant && cst.booleanValue() == true;
-
+
if (isConditionTrue || isConditionOptimizedTrue)
return this.action == null || !this.action.breaksOut(null);
if (this.action == null || this.action.breaksOut(null))
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoubleLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoubleLiteral.java
index a012723a5..87c58ad51 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoubleLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoubleLiteral.java
@@ -21,9 +21,9 @@ import org.eclipse.jdt.internal.compiler.lookup.*;
import org.eclipse.jdt.internal.compiler.util.FloatUtil;
public class DoubleLiteral extends NumberLiteral {
-
+
double value;
-
+
public DoubleLiteral(char[] token, int s, int e) {
super(token, s, e);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
index d14d1534e..0801d396d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
@@ -60,7 +60,7 @@ public class EqualExpression extends BinaryExpression {
rightNonNullChecked = scope.problemReporter().expressionNonNullComparison(this.right, checkEquality);
}
}
-
+
boolean contextualCheckEquality = checkEquality ^ ((flowContext.tagBits & FlowContext.INSIDE_NEGATION) != 0);
// perform flowInfo-based checks for variables and record info for syntactic null analysis for fields:
if (!leftNonNullChecked) {
@@ -70,7 +70,7 @@ public class EqualExpression extends BinaryExpression {
checkVariableComparison(scope, flowContext, flowInfo, initsWhenTrue, initsWhenFalse, local, rightStatus, this.left);
}
} else if (this.left instanceof Reference
- && ((!contextualCheckEquality && rightStatus == FlowInfo.NULL)
+ && ((!contextualCheckEquality && rightStatus == FlowInfo.NULL)
|| (contextualCheckEquality && rightStatus == FlowInfo.NON_NULL))
&& scope.compilerOptions().enableSyntacticNullAnalysisForFields)
{
@@ -82,19 +82,19 @@ public class EqualExpression extends BinaryExpression {
}
if (!rightNonNullChecked) {
LocalVariableBinding local = this.right.localVariableBinding();
- if (local != null) {
+ if (local != null) {
if ((local.type.tagBits & TagBits.IsBaseType) == 0) {
checkVariableComparison(scope, flowContext, flowInfo, initsWhenTrue, initsWhenFalse, local, leftStatus, this.right);
}
} else if (this.right instanceof Reference
- && ((!contextualCheckEquality && leftStatus == FlowInfo.NULL)
+ && ((!contextualCheckEquality && leftStatus == FlowInfo.NULL)
|| (contextualCheckEquality && leftStatus == FlowInfo.NON_NULL))
- && scope.compilerOptions().enableSyntacticNullAnalysisForFields)
+ && scope.compilerOptions().enableSyntacticNullAnalysisForFields)
{
FieldBinding field = ((Reference)this.right).lastFieldBinding();
if (field != null && (field.type.tagBits & TagBits.IsBaseType) == 0) {
flowContext.recordNullCheckedFieldReference((Reference) this.right, 1);
- }
+ }
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
index b6a6fee5a..0b4c1f5e4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
@@ -178,7 +178,7 @@ public class ExplicitConstructorCall extends Statement implements Invocation {
if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643, align with javac on JLS 15.12.2.6
thrownExceptions = currentScope.environment().convertToRawTypes(this.binding.thrownExceptions, true, true);
- }
+ }
// check exceptions
flowContext.checkExceptionHandlers(
thrownExceptions,
@@ -654,7 +654,7 @@ public class ExplicitConstructorCall extends Statement implements Invocation {
this.binding = tsuperMethod;
argumentTypes = tsuperArgs;
}
-
+
// perform any adjustments needed for declared lifting in team constructors:
if (this.binding.problemId() == ProblemReasons.NotFound) {
argumentTypes = checkLiftingTeamCtor(scope, argumentTypes, (ConstructorDeclaration)methodDeclaration);
@@ -865,7 +865,7 @@ public class ExplicitConstructorCall extends Statement implements Invocation {
public void setFieldIndex(int depth) {
// ignore for here
}
-
+
@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
@@ -895,17 +895,17 @@ public class ExplicitConstructorCall extends Statement implements Invocation {
public void registerInferenceContext(ParameterizedGenericMethodBinding method, InferenceContext18 infCtx18) {
// Nothing to do.
}
-
+
@Override
public void registerResult(TypeBinding targetType, MethodBinding method) {
// Nothing to do.
}
-
+
@Override
public InferenceContext18 getInferenceContext(ParameterizedMethodBinding method) {
return null;
}
-
+
@Override
public void cleanUpInferenceContexts() {
// Nothing to do.
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExportsStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExportsStatement.java
index b641512be..932435cae 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExportsStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExportsStatement.java
@@ -7,10 +7,10 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
- *
+ *
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.ast;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
index 8879789be..92b526b25 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
@@ -12,7 +12,7 @@
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
* Technical University Berlin - extended API and implementation
- * Stephan Herrmann - Contributions for
+ * Stephan Herrmann - Contributions for
* bug 292478 - Report potentially null across variable assignment
* bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null"
* bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
@@ -199,9 +199,9 @@ public abstract class Expression extends Statement {
public int implicitConversion;
public TypeBinding resolvedType;
-
+
public static Expression [] NO_EXPRESSIONS = new Expression[0];
-
+
public static final boolean isConstantValueRepresentable(Constant constant, int constantTypeID, int targetTypeID) {
//true if there is no loss of precision while casting.
@@ -434,7 +434,7 @@ public final boolean checkCastTypesCompatibility(
return true;
}
- } else if (use17specifics && castType.isPrimitiveType() && expressionType instanceof ReferenceBinding &&
+ } else if (use17specifics && castType.isPrimitiveType() && expressionType instanceof ReferenceBinding &&
!expressionType.isBoxedPrimitiveType() && checkCastTypesCompatibility(scope, scope.boxing(castType), expressionType, expression)) {
// cast from any reference type (other than boxing types) to base type allowed from 1.7, see JLS $5.5
// by our own interpretation (in accordance with javac) we reject arays, though.
@@ -460,7 +460,7 @@ public final boolean checkCastTypesCompatibility(
}
return true;
}
-
+
switch(expressionType.kind()) {
case Binding.BASE_TYPE :
//-----------cast to something which is NOT a base type--------------------------
@@ -1331,7 +1331,7 @@ public boolean forcedToBeRaw(ReferenceContext referenceContext) {
if (field.type.isRawType()) {
if (referenceContext instanceof AbstractMethodDeclaration) {
AbstractMethodDeclaration methodDecl = (AbstractMethodDeclaration) referenceContext;
- ReferenceBinding declaringClass = methodDecl.binding != null
+ ReferenceBinding declaringClass = methodDecl.binding != null
? methodDecl.binding.declaringClass
: methodDecl.scope.enclosingReceiverType();
if (TypeBinding.notEquals(field.declaringClass, declaringClass)) { // inherited raw field, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=337962
@@ -1429,9 +1429,9 @@ public boolean isExactMethodReference() {
}
/* Answer if the receiver is a poly expression in the prevailing context. Caveat emptor: Some constructs (notably method calls)
- cannot answer this question until after resolution is over and may throw unsupported operation exception if queried ahead of
+ cannot answer this question until after resolution is over and may throw unsupported operation exception if queried ahead of
resolution. Default implementation here returns false which is true for vast majority of AST nodes. The ones that are poly
- expressions under one or more contexts should override and return suitable value.
+ expressions under one or more contexts should override and return suitable value.
*/
public boolean isPolyExpression() throws UnsupportedOperationException {
return false;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExpressionContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExpressionContext.java
index 07a84ce87..9050a3c42 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExpressionContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExpressionContext.java
@@ -16,14 +16,14 @@
package org.eclipse.jdt.internal.compiler.ast;
public enum ExpressionContext {
-
- /** Assignment context: potential poly-expressions are: method invocations, lambdas, reference expressions,
+
+ /** Assignment context: potential poly-expressions are: method invocations, lambdas, reference expressions,
conditional expressions and allocation expressions. This is the only Java 7 context where target type
influenced evaluation of some expression.
-
- Context induced by: ReturnStatement, ArrayInitializer, Assignment, FieldDeclaration and LocalDeclaration.
+
+ Context induced by: ReturnStatement, ArrayInitializer, Assignment, FieldDeclaration and LocalDeclaration.
*/
- ASSIGNMENT_CONTEXT {
+ ASSIGNMENT_CONTEXT {
@Override
public String toString() {
return "assignment context"; //$NON-NLS-1$
@@ -33,14 +33,14 @@ public enum ExpressionContext {
return true;
}
},
-
- /** Invocation context: potential poly-expressions are: method invocations, lambdas, reference expressions,
- conditional expressions and allocation expressions. At this point, we don't distinguish between strict
+
+ /** Invocation context: potential poly-expressions are: method invocations, lambdas, reference expressions,
+ conditional expressions and allocation expressions. At this point, we don't distinguish between strict
and loose invocation contexts - we may have to cross the bridge some day.
-
+
Context induced by: AllocationExpression, QualifiedAllocationExpression, ExplicitConstructorCall, MessageSend
CodeSnippetAllocationExpression and CodeSnippetMessageSend.
- */
+ */
INVOCATION_CONTEXT {
@Override
public String toString() {
@@ -51,7 +51,7 @@ public enum ExpressionContext {
return true;
}
},
-
+
/** Casting context: potential poly-expressions are: lambdas and reference expressions
Context induced by: CastExpression.
*/
@@ -65,9 +65,9 @@ public enum ExpressionContext {
return false;
}
},
-
- /** Vanilla context (string, numeric): potential poly-expressions are: NONE. This is the nonpoly context in which
- expressions get evaluated, unless they feature in one of the above contexts.
+
+ /** Vanilla context (string, numeric): potential poly-expressions are: NONE. This is the nonpoly context in which
+ expressions get evaluated, unless they feature in one of the above contexts.
*/
VANILLA_CONTEXT {
@Override
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakedTrackingVariable.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakedTrackingVariable.java
index 6351ad66b..3202a04c8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakedTrackingVariable.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakedTrackingVariable.java
@@ -51,7 +51,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.copyinhe
* A faked local variable declaration used for keeping track of data flows of a
* special variable. Certain events will be recorded by changing the null info
* for this variable.
- *
+ *
* See bug 349326 - [1.7] new warning for missing try-with-resources
*/
@SuppressWarnings({"rawtypes", "unchecked"})
@@ -68,10 +68,10 @@ public class FakedTrackingVariable extends LocalDeclaration {
// - obtaining this from a method call or array reference
// Interpret that we may or may not be responsible for closing
private static final int SHARED_WITH_OUTSIDE = 2;
- // the resource is likely owned by outside code (owner has responsibility to close):
+ // the resource is likely owned by outside code (owner has responsibility to close):
// - obtained as argument of the current method, or via a field read
// - stored into a field
- // - returned as the result of this method
+ // - returned as the result of this method
private static final int OWNED_BY_OUTSIDE = 4;
// If close() is invoked from a nested method (inside a local type) report remaining problems only as potential:
private static final int CLOSED_IN_NESTED_METHOD = 8;
@@ -93,7 +93,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
private int globalClosingState = 0;
public LocalVariableBinding originalBinding; // the real local being tracked, can be null for preliminary track vars for allocation expressions
-
+
public FakedTrackingVariable innerTracker; // chained tracking variable of a chained (wrapped) resource
public FakedTrackingVariable outerTracker; // inverse of 'innerTracker'
@@ -103,7 +103,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
// temporary storage while analyzing "res = new Res();":
private ASTNode currentAssignment; // temporarily store the assignment as the location for error reporting
-
+
// if tracking var was allocated from a finally context, record here the flow context of the corresponding try block
private FlowContext tryContext;
@@ -140,7 +140,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
if (nullStatus != 0)
flowInfo.markNullStatus(this.binding, nullStatus); // mark that this flow has seen the resource
}
-
+
@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream)
{ /* NOP - this variable is completely dummy, ie. for analysis only. */ }
@@ -216,7 +216,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
return local.closeTracker;
}
} else if (expression instanceof AllocationExpression) {
- // return any preliminary tracking variable from analyseCloseableAllocation
+ // return any preliminary tracking variable from analyseCloseableAllocation
return ((AllocationExpression) expression).closeTracker;
} else if (expression instanceof MessageSend) {
// return any preliminary tracking variable from analyseCloseableAcquisition
@@ -231,7 +231,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
* Also the assignment is temporarily stored in the tracking variable in case we need to
* report errors because the assignment leaves the old LHS value unclosed.
* In this case the assignment should be used as the error location.
- *
+ *
* @param location the assignment/local declaration being analyzed
* @param local the local variable being assigned to
* @param rhs the rhs of the assignment resp. the initialization of the local variable declaration.
@@ -247,7 +247,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
if (local.isParameter()) {
closeTracker.globalClosingState |= OWNED_BY_OUTSIDE;
}
- }
+ }
}
if (closeTracker != null) {
closeTracker.currentAssignment = location;
@@ -257,7 +257,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
closeTracker = local.closeTracker;
if (closeTracker != null) {
handleReassignment(flowInfo, closeTracker, location);
- }
+ }
if (rhs.resolvedType != TypeBinding.NULL) { // not NULL means valid closeable as per method precondition
closeTracker = new FakedTrackingVariable(local, location, flowInfo, null, FlowInfo.UNKNOWN);
closeTracker.currentAssignment = location;
@@ -331,9 +331,9 @@ public class FakedTrackingVariable extends LocalDeclaration {
}
}
- /**
+ /**
* Compute/assign a tracking variable for a freshly allocated closeable value, using information from our white lists.
- * See Bug 358903 - Filter practically unimportant resource leak warnings
+ * See Bug 358903 - Filter practically unimportant resource leak warnings
*/
public static void analyseCloseableAllocation(BlockScope scope, FlowInfo flowInfo, AllocationExpression allocation) {
// client has checked that the resolvedType is an AutoCloseable, hence the following cast is safe:
@@ -407,7 +407,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
}
}
- /**
+ /**
* Check if a message send acquires a closeable from its receiver, see:
* Bug 463320 - [compiler][resource] potential "resource leak" problem disappears when local variable inlined
*/
@@ -530,13 +530,13 @@ public class FakedTrackingVariable extends LocalDeclaration {
return null; // not a tracked expression
}
- /**
+ /**
* Given the rhs of an assignment or local declaration has a (Auto)Closeable type (or null), setup for leak analysis now:
* Create or re-use a tracking variable, and wire and initialize everything.
* @param scope scope containing the assignment
* @param upstreamInfo info without analysis of the rhs, use this to determine the status of a resource being disconnected
* @param flowInfo info with analysis of the rhs, use this for recording resource status because this will be passed downstream
- * @param flowContext
+ * @param flowContext
* @param location where to report warnigs/errors against
* @param rhs the right hand side of the assignment, this expression is to be analyzed.
* The caller has already checked that the rhs is either of a closeable type or null.
@@ -573,9 +573,9 @@ public class FakedTrackingVariable extends LocalDeclaration {
if (rhs instanceof AllocationExpression || rhs instanceof ConditionalExpression || rhs instanceof SwitchExpression || rhs instanceof MessageSend) {
if (rhsTrackVar == disconnectedTracker)
return; // b.: self wrapper: res = new Wrap(res); -> done!
- if (local.closeTracker == rhsTrackVar
+ if (local.closeTracker == rhsTrackVar
&& ((rhsTrackVar.globalClosingState & OWNED_BY_OUTSIDE) != 0)) {
- // c.: assigning a fresh resource (pre-connected alloc)
+ // c.: assigning a fresh resource (pre-connected alloc)
// to a local previously holding an alien resource -> start over
local.closeTracker = new FakedTrackingVariable(local, location, flowInfo, flowContext, FlowInfo.NULL);
// still check disconnectedTracker below
@@ -612,7 +612,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
// a fresh resource, mark as not-closed:
if ((rhsTrackVar.globalClosingState & (SHARED_WITH_OUTSIDE|OWNED_BY_OUTSIDE|FOREACH_ELEMENT_VAR)) == 0)
flowInfo.markAsDefinitelyNull(rhsTrackVar.binding);
-// TODO(stephan): this might be useful, but I could not find a test case for it:
+// TODO(stephan): this might be useful, but I could not find a test case for it:
// if (flowContext.initsOnFinally != null)
// flowContext.initsOnFinally.markAsDefinitelyNonNull(trackerBinding);
}
@@ -641,8 +641,8 @@ public class FakedTrackingVariable extends LocalDeclaration {
* which we should then re-use
* @return a tracking variable associated with local or null if no need to track
*/
- private static FakedTrackingVariable analyseCloseableExpression(FlowInfo flowInfo, FlowContext flowContext, LocalVariableBinding local,
- ASTNode location, Expression expression, FakedTrackingVariable previousTracker)
+ private static FakedTrackingVariable analyseCloseableExpression(FlowInfo flowInfo, FlowContext flowContext, LocalVariableBinding local,
+ ASTNode location, Expression expression, FakedTrackingVariable previousTracker)
{
// unwrap uninteresting nodes:
while (true) {
@@ -674,8 +674,8 @@ public class FakedTrackingVariable extends LocalDeclaration {
return null;
}
return tracker;
- } else if (expression instanceof MessageSend
- || expression instanceof ArrayReference)
+ } else if (expression instanceof MessageSend
+ || expression instanceof ArrayReference)
{
// we *might* be responsible for the resource obtained
FakedTrackingVariable tracker = new FakedTrackingVariable(local, location, flowInfo, flowContext, FlowInfo.POTENTIALLY_NULL); // shed some doubt
@@ -691,7 +691,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
FakedTrackingVariable tracker = new FakedTrackingVariable(local, location, flowInfo, flowContext, FlowInfo.UNKNOWN);
tracker.globalClosingState |= OWNED_BY_OUTSIDE;
// leave state as UNKNOWN, the bit OWNED_BY_OUTSIDE will prevent spurious warnings
- return tracker;
+ return tracker;
}
if (local.closeTracker != null)
@@ -874,14 +874,14 @@ public class FakedTrackingVariable extends LocalDeclaration {
this.globalClosingState |= CLOSED_IN_NESTED_METHOD;
}
- /**
+ /**
* Mark that this resource is passed to some outside code
- * (as argument to a method/ctor call or as a return value from the current method),
+ * (as argument to a method/ctor call or as a return value from the current method),
* and thus should be considered as potentially closed.
* @param owned should the resource be considered owned by some outside?
*/
- public static FlowInfo markPassedToOutside(BlockScope scope, Expression expression, FlowInfo flowInfo, FlowContext flowContext, boolean owned) {
-
+ public static FlowInfo markPassedToOutside(BlockScope scope, Expression expression, FlowInfo flowInfo, FlowContext flowContext, boolean owned) {
+
FakedTrackingVariable trackVar = getCloseTrackingVariable(expression, flowInfo, flowContext);
if (trackVar != null) {
// insert info that the tracked resource *may* be closed (by the target method, i.e.)
@@ -909,7 +909,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
}
/**
- * Iterator for a set of FakedTrackingVariable, which dispenses the elements
+ * Iterator for a set of FakedTrackingVariable, which dispenses the elements
* according to the priorities defined by enum {@link Stage}.
* Resources whose outer is owned by an enclosing scope are never answered,
* unless we are analysing on behalf of an exit (return/throw).
@@ -923,7 +923,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
private Stage stage;
private Iterator<FakedTrackingVariable> iterator;
private FakedTrackingVariable next;
-
+
enum Stage {
/** 1. prio: all top-level resources, ie., resources with no outer. */
OuterLess,
@@ -1006,14 +1006,14 @@ public class FakedTrackingVariable extends LocalDeclaration {
/**
* Answer true if we know for sure that no resource is bound to this variable
- * at the point of 'flowInfo'.
+ * at the point of 'flowInfo'.
*/
public boolean hasDefinitelyNoResource(FlowInfo flowInfo) {
if (this.originalBinding == null) return false; // shouldn't happen but keep quiet.
if (flowInfo.isDefinitelyNull(this.originalBinding)) {
return true;
}
- if (!(flowInfo.isDefinitelyAssigned(this.originalBinding)
+ if (!(flowInfo.isDefinitelyAssigned(this.originalBinding)
|| flowInfo.isPotentiallyAssigned(this.originalBinding))) {
return true;
}
@@ -1022,7 +1022,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
public boolean isClosedInFinallyOfEnclosing(BlockScope scope) {
BlockScope currentScope = scope;
- while (true) {
+ while (true) {
if (currentScope.finallyInfo != null
&& currentScope.finallyInfo.isDefinitelyNonNull(this.binding)) {
return true; // closed in enclosing finally
@@ -1031,9 +1031,9 @@ public class FakedTrackingVariable extends LocalDeclaration {
return false;
}
currentScope = (BlockScope) currentScope.parent;
- }
+ }
}
- /**
+ /**
* If current is the same as 'returnedResource' or a wrapper thereof,
* mark as reported and return true, otherwise false.
*/
@@ -1098,7 +1098,7 @@ public class FakedTrackingVariable extends LocalDeclaration {
}
return hasReported;
}
-
+
private boolean neverClosedAtLocations() {
if (this.recordedLocations != null) {
for (Object value : this.recordedLocations.values())
@@ -1124,19 +1124,19 @@ public class FakedTrackingVariable extends LocalDeclaration {
if (isPotentialProblem) {
if ((this.globalClosingState & (REPORTED_POTENTIAL_LEAK|REPORTED_DEFINITIVE_LEAK)) != 0)
return 0;
-// if ((this.globalClosingState & (ACQUIRED_FROM_OUTSIDE)) != 0
+// if ((this.globalClosingState & (ACQUIRED_FROM_OUTSIDE)) != 0
// && location instanceof ReturnStatement
// && ((ReturnStatement) location).expression == this.acquisition)
// return 0; // directly returning a resource acquired from a message send: don't assume responsibility
- problemReporter.potentiallyUnclosedCloseable(this, location);
+ problemReporter.potentiallyUnclosedCloseable(this, location);
} else {
if ((this.globalClosingState & (REPORTED_DEFINITIVE_LEAK)) != 0)
return 0;
- problemReporter.unclosedCloseable(this, location);
+ problemReporter.unclosedCloseable(this, location);
}
// propagate flag to inners:
int reportFlag = isPotentialProblem ? REPORTED_POTENTIAL_LEAK : REPORTED_DEFINITIVE_LEAK;
- if (location == null) { // if location != null flags will be set after the loop over locations
+ if (location == null) { // if location != null flags will be set after the loop over locations
FakedTrackingVariable current = this;
do {
current.globalClosingState |= reportFlag;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FalseLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FalseLiteral.java
index 0180477c5..29979ef1a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FalseLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FalseLiteral.java
@@ -21,9 +21,9 @@ import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
public class FalseLiteral extends MagicLiteral {
-
+
static final char[] source = {'f', 'a', 'l', 's', 'e'};
-
+
public FalseLiteral(int s , int e) {
super(s,e);
}
@@ -75,7 +75,7 @@ public char[] source() {
}
@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
-//{ObjectTeams: hide synthetic nodes from visitors (e.g., inserted into a base call)
+//{ObjectTeams: hide synthetic nodes from visitors (e.g., inserted into a base call)
if (this.isGenerated) return;
// SH}
visitor.visit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
index e7f071e9d..33de23e8e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
@@ -270,7 +270,7 @@ public void resolve(MethodScope initializationScope) {
if (!existingField.isStatic() && declaringType.isStatic()) break checkHiding;
}
//{ObjectTeams: never report hiding re _OT$base, _OT$cacheInitTrigger et al
- if (CharOperation.prefixEquals(IOTConstants.OT_DOLLAR_NAME, this.name))
+ if (CharOperation.prefixEquals(IOTConstants.OT_DOLLAR_NAME, this.name))
break checkHiding;
// SH}
// collision with outer field or local variable
@@ -299,7 +299,7 @@ public void resolve(MethodScope initializationScope) {
}
}
}
-
+
// check @Deprecated annotation presence
if ((this.binding.getAnnotationTagBits() & TagBits.AnnotationDeprecated) == 0
&& (this.binding.modifiers & ClassFileConstants.AccDeprecated) != 0
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
index dd8ed4cea..fac6b4082 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
@@ -140,9 +140,9 @@ public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowConte
this.receiver
.analyseCode(currentScope, flowContext, flowInfo, !this.binding.isStatic())
.unconditionalInits();
-
+
this.receiver.checkNPE(currentScope, flowContext, flowInfo);
-
+
if (assignment.expression != null) {
flowInfo =
assignment
@@ -181,7 +181,7 @@ public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowConte
&& TypeBinding.equalsEquals(this.receiver.resolvedType, this.binding.declaringClass) // inherited fields are not tracked here
&& ((this.receiver.bits & ASTNode.ParenthesizedMASK) == 0)) { // (this).x is forbidden
flowInfo.markAsDefinitelyAssigned(this.binding);
- }
+ }
}
return flowInfo;
}
@@ -319,7 +319,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
this.receiver.generateCode(currentScope, codeStream, !isStatic);
if ((this.bits & NeedReceiverGenericCast) != 0) {
codeStream.checkcast(this.actualReceiverType);
- }
+ }
pc = codeStream.position;
if (codegenBinding.declaringClass == null) { // array length
codeStream.arraylength();
@@ -470,7 +470,7 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
operandType = this.genericCast;
} else {
operandType = codegenBinding.type;
- }
+ }
if (valueRequired) {
if (isStatic) {
switch (operandType.id) {
@@ -481,7 +481,7 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
default :
codeStream.dup();
break;
- }
+ }
} else { // Stack: [owner][old field value] ---> [old field value][owner][old field value]
switch (operandType.id) {
case TypeIds.T_long :
@@ -491,10 +491,10 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
default :
codeStream.dup_x1();
break;
- }
+ }
}
}
- codeStream.generateImplicitConversion(this.implicitConversion);
+ codeStream.generateImplicitConversion(this.implicitConversion);
codeStream.generateConstant(
postIncrement.expression.constant,
this.implicitConversion);
@@ -530,7 +530,7 @@ public boolean isEquivalent(Reference reference) {
FieldReference fr = (FieldReference) reference;
if (fr.receiver.isThis() && !(fr.receiver instanceof QualifiedThisReference)) {
otherToken = fr.token;
- }
+ }
}
return otherToken != null && CharOperation.equals(this.token, otherToken);
} else {
@@ -594,13 +594,13 @@ public FieldBinding lastFieldBinding() {
*/
public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo, boolean isReadAccess) {
if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0) return;
-
+
//{ObjectTeams: don't create (more) synthetics for base field accessed via callout:
- if ( FieldModel.isCalloutAccessed(this.binding)
- && this.syntheticAccessors != null
- && this.syntheticAccessors[isReadAccess ? FieldReference.READ : FieldReference.WRITE] != null)
+ if ( FieldModel.isCalloutAccessed(this.binding)
+ && this.syntheticAccessors != null
+ && this.syntheticAccessors[isReadAccess ? FieldReference.READ : FieldReference.WRITE] != null)
{
- return; // synthetic binding already created during resolveType; avoid CCE if declaringClass is binary.
+ return; // synthetic binding already created during resolveType; avoid CCE if declaringClass is binary.
}
// SH}
// if field from parameterized type got found, use the original field at codegen time
@@ -803,7 +803,7 @@ public TypeBinding resolveType(BlockScope scope) {
return null;
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=245007 avoid secondary errors in case of
- // missing super type for anonymous classes ...
+ // missing super type for anonymous classes ...
ReferenceBinding declaringClass = fieldBinding.declaringClass;
boolean avoidSecondary = declaringClass != null &&
declaringClass.isAnonymousType() &&
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FloatLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FloatLiteral.java
index 0ea54ee2e..039e2ad80 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FloatLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FloatLiteral.java
@@ -22,9 +22,9 @@ import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
import org.eclipse.jdt.internal.compiler.util.FloatUtil;
public class FloatLiteral extends NumberLiteral {
-
+
float value;
-
+
public FloatLiteral(char[] token, int s, int e) {
super(token, s, e);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java
index acaf0cdf0..dc970d20b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java
@@ -11,7 +11,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Technical University Berlin - extended API and implementation
- * Stephan Herrmann - Contributions for
+ * Stephan Herrmann - Contributions for
* bug 319201 - [null] no warning when unboxing SingleNameReference causes NPE
* bug 349326 - [1.7] new warning for missing try-with-resources
* bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null"
@@ -90,7 +90,7 @@ public class ForStatement extends Statement {
cst = this.condition == null ? null : this.condition.optimizedBooleanConstant();
boolean isConditionOptimizedTrue = cst == null || (cst != Constant.NotAConstant && cst.booleanValue() == true);
boolean isConditionOptimizedFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);
-
+
// process the condition
LoopingFlowContext condLoopContext = null;
FlowInfo condInfo = flowInfo.nullInfoLessUnconditionalCopy();
@@ -452,10 +452,10 @@ public class ForStatement extends Statement {
boolean isConditionTrue = cst == null || cst != Constant.NotAConstant && cst.booleanValue() == true;
cst = this.condition == null ? null : this.condition.optimizedBooleanConstant();
boolean isConditionOptimizedTrue = cst == null ? true : cst != Constant.NotAConstant && cst.booleanValue() == true;
-
+
return (isConditionTrue || isConditionOptimizedTrue) && (this.action == null || !this.action.breaksOut(null));
}
-
+
@Override
public boolean completesByContinue() {
return this.action.continuesAtOuterLabel();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java
index 9b18f386c..8e9dd654d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Technical University Berlin - extended API and implementation
@@ -457,7 +457,7 @@ public class ForeachStatement extends Statement {
public static TypeBinding getCollectionElementType(BlockScope scope, TypeBinding collectionType) {
if (collectionType == null) return null;
-
+
boolean isTargetJsr14 = scope.compilerOptions().targetJDK == ClassFileConstants.JDK1_4;
if (collectionType.isCapture()) {
TypeBinding upperBound = ((CaptureBinding)collectionType).firstBound;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FunctionalExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FunctionalExpression.java
index ec8105264..c52104e23 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FunctionalExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FunctionalExpression.java
@@ -54,7 +54,7 @@ import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
import org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding;
public abstract class FunctionalExpression extends Expression {
-
+
protected TypeBinding expectedType;
public MethodBinding descriptor;
public MethodBinding binding; // Code generation binding. May include synthetics. See getMethodBinding()
@@ -74,20 +74,20 @@ public abstract class FunctionalExpression extends Expression {
public FunctionalExpression(CompilationResult compilationResult) {
this.compilationResult = compilationResult;
}
-
+
public FunctionalExpression() {
super();
}
-
+
@Override
public boolean isBoxingCompatibleWith(TypeBinding targetType, Scope scope) {
return false;
}
-
+
public void setCompilationResult(CompilationResult compilationResult) {
this.compilationResult = compilationResult;
}
-
+
// Return the actual (non-code generation) method binding that is void of synthetics.
public MethodBinding getMethodBinding() {
return null;
@@ -97,7 +97,7 @@ public abstract class FunctionalExpression extends Expression {
public void setExpectedType(TypeBinding expectedType) {
this.expectedType = expectedType;
}
-
+
@Override
public void setExpressionContext(ExpressionContext context) {
this.expressionContext = context;
@@ -121,7 +121,7 @@ public abstract class FunctionalExpression extends Expression {
public boolean isFunctionalType() {
return true;
}
-
+
@Override
public boolean isPertinentToApplicability(TypeBinding targetType, MethodBinding method) {
if (targetType instanceof TypeVariableBinding) {
@@ -159,7 +159,7 @@ public abstract class FunctionalExpression extends Expression {
public TypeBinding expectedType() {
return this.expectedType;
}
-
+
public boolean argumentsTypeElided() { return true; /* only exception: lambda with explicit argument types. */ }
// Notify the compilation unit that it contains some functional types, taking care not to add any transient copies. this is assumed not to be a copy
@@ -173,7 +173,7 @@ public abstract class FunctionalExpression extends Expression {
if (expression != expression.original) // fake universe.
return 0;
}
- break;
+ break;
case Scope.COMPILATION_UNIT_SCOPE :
CompilationUnitDeclaration unit = ((CompilationUnitScope) scope).referenceContext;
return unit.record(this);
@@ -199,7 +199,7 @@ public abstract class FunctionalExpression extends Expression {
if (!sam.isValidBinding() && sam.problemId() != ProblemReasons.ContradictoryNullAnnotations) {
return reportSamProblem(blockScope, sam);
}
-
+
this.descriptor = sam;
if (skipKosherCheck || kosherDescriptor(blockScope, sam, true)) {
if (this.expectedType instanceof IntersectionTypeBinding18) {
@@ -217,9 +217,9 @@ public abstract class FunctionalExpression extends Expression {
if (environment.globalOptions.isAnnotationBasedNullAnalysisEnabled) {
NullAnnotationMatching.checkForContradictions(sam, this, blockScope);
}
- return this.resolvedType = this.expectedType;
+ return this.resolvedType = this.expectedType;
}
-
+
return this.resolvedType = null;
}
@@ -245,7 +245,7 @@ public abstract class FunctionalExpression extends Expression {
private boolean shouldChatter;
private boolean visible = true;
private FunctionalExpression expression;
-
+
public VisibilityInspector(FunctionalExpression expression, Scope scope, boolean shouldChatter) {
this.scope = scope;
this.shouldChatter = shouldChatter;
@@ -259,20 +259,20 @@ public abstract class FunctionalExpression extends Expression {
this.scope.problemReporter().descriptorHasInvisibleType(this.expression, referenceBinding);
}
}
-
+
@Override
public boolean visit(ReferenceBinding referenceBinding) {
checkVisibility(referenceBinding);
return true;
}
-
+
@Override
public boolean visit(ParameterizedTypeBinding parameterizedTypeBinding) {
checkVisibility(parameterizedTypeBinding);
return true;
}
-
+
@Override
public boolean visit(RawTypeBinding rawTypeBinding) {
checkVisibility(rawTypeBinding);
@@ -288,13 +288,13 @@ public abstract class FunctionalExpression extends Expression {
TypeBindingVisitor.visit(this, types);
return this.visible;
}
-
+
}
public boolean kosherDescriptor(Scope scope, MethodBinding sam, boolean shouldChatter) {
-
+
VisibilityInspector inspector = new VisibilityInspector(this, scope, shouldChatter);
-
+
boolean status = true;
if (!inspector.visible(sam.returnType))
status = false;
@@ -319,7 +319,7 @@ public abstract class FunctionalExpression extends Expression {
public MethodBinding[] getRequiredBridges() {
class BridgeCollector {
-
+
MethodBinding [] bridges;
MethodBinding method;
char [] selector;
@@ -333,19 +333,19 @@ public abstract class FunctionalExpression extends Expression {
this.scope = FunctionalExpression.this.enclosingScope;
collectBridges(new ReferenceBinding[]{functionalType});
}
-
+
void collectBridges(ReferenceBinding[] interfaces) {
int length = interfaces == null ? 0 : interfaces.length;
for (int i = 0; i < length; i++) {
ReferenceBinding superInterface = interfaces[i];
- if (superInterface == null)
+ if (superInterface == null)
continue;
MethodBinding [] methods = superInterface.getMethods(this.selector);
for (int j = 0, count = methods == null ? 0 : methods.length; j < count; j++) {
MethodBinding inheritedMethod = methods[j];
if (inheritedMethod == null || this.method == inheritedMethod) // descriptor declaring class may not be same functional interface target type.
continue;
- if (inheritedMethod.isStatic() || inheritedMethod.redeclaresPublicObjectMethod(this.scope))
+ if (inheritedMethod.isStatic() || inheritedMethod.redeclaresPublicObjectMethod(this.scope))
continue;
inheritedMethod = MethodVerifier.computeSubstituteMethod(inheritedMethod, this.method, this.environment);
if (inheritedMethod == null || !MethodVerifier.isSubstituteParameterSubsignature(this.method, inheritedMethod, this.environment) ||
@@ -376,7 +376,7 @@ public abstract class FunctionalExpression extends Expression {
return this.bridges;
}
}
-
+
ReferenceBinding functionalType;
if (this.expectedType instanceof IntersectionTypeBinding18) {
functionalType = (ReferenceBinding) ((IntersectionTypeBinding18)this.expectedType).getSAMType(this.enclosingScope);
@@ -386,7 +386,7 @@ public abstract class FunctionalExpression extends Expression {
return new BridgeCollector(functionalType, this.descriptor).getBridges();
}
boolean requiresBridges() {
- return getRequiredBridges() != null;
+ return getRequiredBridges() != null;
}
public void cleanUp() {
// to be overridden by sub-classes
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IPolyExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IPolyExpression.java
index 62af5576f..8bd42cc18 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IPolyExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IPolyExpression.java
@@ -25,9 +25,9 @@ import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
/**
Contract to be implemented by all poly expressions and potential poly expressions for uniform integration into overload resolution and type inference.
- Additional contracts may be imposed by {@link Invocation} and {@link InvocationSite}. For most contracts "default" implementations are furnished by
+ Additional contracts may be imposed by {@link Invocation} and {@link InvocationSite}. For most contracts "default" implementations are furnished by
{@link Expression} or {@link Statement} or by {@link ASTNode} and the poly expression should suitably override where required.
-
+
@see PolyTypeBinding
@see ExpressionContext
*/
@@ -36,17 +36,17 @@ public interface IPolyExpression {
// Expression context manipulation
public void setExpressionContext(ExpressionContext context);
public ExpressionContext getExpressionContext();
-
+
// Target type injection.
public void setExpectedType(TypeBinding targetType);
public TypeBinding invocationTargetType();
-
+
// Compatibility checks.
public boolean isPotentiallyCompatibleWith(TypeBinding targetType, Scope scope);
public boolean isCompatibleWith(TypeBinding targetType, final Scope scope);
public boolean isBoxingCompatibleWith(TypeBinding targetType, Scope scope);
- public boolean sIsMoreSpecific(TypeBinding s, TypeBinding t, Scope skope);
-
+ public boolean sIsMoreSpecific(TypeBinding s, TypeBinding t, Scope skope);
+
// Pertinence checks.
public boolean isPertinentToApplicability(TypeBinding targetType, MethodBinding method);
@@ -55,14 +55,14 @@ public interface IPolyExpression {
public boolean isPolyExpression();
public boolean isFunctionalType();
public Expression[] getPolyExpressions();
-
-
+
+
/* Resolution: A poly expression must be prepared to be resolved multiple times and should manage matters in a side effect free fashion.
Typically, in invocation contexts, there is an initial resolution, multiple tentative resolutions and then a final resolution against
the ultimate target type.
*/
public TypeBinding resolveType(BlockScope blockScope);
- // Resolve expression tentatively - should have no lingering side-effects that may impact final resolution !
+ // Resolve expression tentatively - should have no lingering side-effects that may impact final resolution !
public Expression resolveExpressionExpecting(TypeBinding targetType, Scope scope, InferenceContext18 inferenceContext);
-
+
} \ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java
index e987b027b..fa4f4609f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java
@@ -10,7 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Stephan Herrmann - Contributions for
+ * Stephan Herrmann - Contributions for
* bug 319201 - [null] no warning when unboxing SingleNameReference causes NPE
* bug 349326 - [1.7] new warning for missing try-with-resources
* bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null"
@@ -82,7 +82,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
if (isConditionOptimizedTrue) {
elseFlowInfo.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
}
- if (((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) &&
+ if (((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) &&
((thenFlowInfo.tagBits & FlowInfo.UNREACHABLE) != 0)) {
// Mark then block as unreachable
// No need if the whole if-else construct itself lies in unreachable code
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java
index 75ae8d653..9e41eadb1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java
@@ -143,7 +143,7 @@ public class Initializer extends FieldDeclaration {
public MethodBinding getMethodBinding() {
if (this.methodBinding == null) {
Scope scope = this.block.scope;
- this.methodBinding = isStatic()
+ this.methodBinding = isStatic()
? new MethodBinding(ClassFileConstants.AccStatic, CharOperation.NO_CHAR, TypeBinding.VOID, Binding.NO_PARAMETERS, Binding.NO_EXCEPTIONS, scope.enclosingSourceType())
: new MethodBinding(0, CharOperation.NO_CHAR, TypeBinding.VOID, Binding.NO_PARAMETERS, Binding.NO_EXCEPTIONS, scope.enclosingSourceType());
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
index 38173b0c7..0dae2ee46 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
@@ -166,7 +166,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
}
// SH}
initializePatternVariables(currentScope, codeStream);
-
+
int pc = codeStream.position;
this.expression.generateCode(currentScope, codeStream, true);
codeStream.instance_of(this.type, this.type.resolvedType);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntersectionCastTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntersectionCastTypeReference.java
index f7745d171..f239f4a23 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntersectionCastTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntersectionCastTypeReference.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Stephan Herrmann - Contribution for
@@ -67,14 +67,14 @@ public class IntersectionCastTypeReference extends TypeReference {
public TypeReference[] getTypeReferences() {
return this.typeReferences;
}
-
+
@Override
public TypeBinding resolveType(BlockScope scope, boolean checkBounds, int location) {
int length = this.typeReferences.length;
ReferenceBinding[] intersectingTypes = new ReferenceBinding[length];
boolean hasError = false;
-
+
int typeCount = 0;
nextType:
for (int i = 0; i < length; i++) {
@@ -137,7 +137,7 @@ public class IntersectionCastTypeReference extends TypeReference {
itsSuperclass = firstType.superclass();
System.arraycopy(intersectingTypes, 1, interfaces = new ReferenceBinding[typeCount - 1], 0, typeCount - 1);
}
-
+
Map invocations = new HashMap(2);
nextInterface: for (int i = 0, interfaceCount = interfaces.length; i < interfaceCount; i++) {
ReferenceBinding one = interfaces[i];
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Invocation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Invocation.java
index c20d074e3..5dc4f1d49 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Invocation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Invocation.java
@@ -29,7 +29,7 @@ public interface Invocation extends InvocationSite {
/** Answer the resolved method binding of this invocation */
MethodBinding binding();
-
+
/**
* Register the given inference context, which produced the given method as its intermediate result.
* Later when the same method is selected as the most specific method, the inference context
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
index b7825bc07..3d3b25465 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
@@ -236,7 +236,7 @@ public class Javadoc extends ASTNode {
// @param tags
int paramTagsSize = this.paramReferences == null ? 0 : this.paramReferences.length;
for (int i = 0; i < paramTagsSize; i++) {
- if(scope.referenceContext instanceof RecordDeclaration) {
+ if(scope.referenceContext instanceof RecordDeclaration) {
RecordDeclaration rd = (RecordDeclaration)scope.referenceContext;
if( rd.nRecordComponents > 0)
break;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java
index 6e3f0cb44..093658e0f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java
@@ -29,7 +29,7 @@ public class JavadocImplicitTypeReference extends TypeReference {
this.sourceStart = pos;
this.sourceEnd = pos;
}
-
+
@Override
public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
return null;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LabeledStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LabeledStatement.java
index 74f7893a4..b252fc8af 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LabeledStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LabeledStatement.java
@@ -156,7 +156,7 @@ public class LabeledStatement extends Statement {
return false;
return this.statement.doesNotCompleteNormally();
}
-
+
@Override
public boolean completesByContinue() {
return this.statement instanceof ContinueStatement; // NOT this.statement.continuesAtOuterLabel
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
index 5b07ed635..bb6d3b3b0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
@@ -139,7 +139,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
private Map<Integer/*sourceStart*/, LocalTypeBinding> localTypes; // support look-up of a local type from this lambda copy
public boolean argumentsTypeVar = false;
-
+
public LambdaExpression(CompilationResult compilationResult, boolean assistNode, boolean requiresGenericSignature) {
super(compilationResult);
this.assistNode = assistNode;
@@ -156,7 +156,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
this.arguments = arguments != null ? arguments : ASTNode.NO_ARGUMENTS;
this.argumentTypes = new TypeBinding[arguments != null ? arguments.length : 0];
}
-
+
public Argument [] arguments() {
return this.arguments;
}
@@ -168,7 +168,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
public void setBody(Statement body) {
this.body = body == null ? NO_BODY : body;
}
-
+
public Statement body() {
return this.body;
}
@@ -180,15 +180,15 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
public void setArrowPosition(int arrowPosition) {
this.arrowPosition = arrowPosition;
}
-
+
public int arrowPosition() {
return this.arrowPosition;
}
-
+
protected FunctionalExpression original() {
return this.original;
}
-
+
@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
//{ObjectTeams: this needs to happen after AbstractMethodDeclaration.generateCode() has started
@@ -231,7 +231,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
codeStream.invokeDynamic(invokeDynamicNumber, (this.shouldCaptureInstance ? 1 : 0) + this.outerLocalVariablesSlotSize, 1, this.descriptor.selector, signature.toString().toCharArray());
if (!valueRequired)
codeStream.pop();
- codeStream.recordPositionsFrom(pc, this.sourceStart);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
}
@Override
@@ -243,8 +243,8 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
return super.kosherDescriptor(currentScope, sam, shouldChatter);
}
-
- /* This code is arranged so that we can continue with as much analysis as possible while avoiding
+
+ /* This code is arranged so that we can continue with as much analysis as possible while avoiding
* mine fields that would result in a slew of spurious messages. This method is a merger of:
* @see org.eclipse.jdt.internal.compiler.lookup.MethodScope.createMethod(AbstractMethodDeclaration)
* @see org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(MethodBinding)
@@ -252,44 +252,44 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
*/
@Override
public TypeBinding resolveType(BlockScope blockScope, boolean skipKosherCheck) {
-
+
boolean argumentsTypeElided = argumentsTypeElided();
int argumentsLength = this.arguments == null ? 0 : this.arguments.length;
-
+
if (this.constant != Constant.NotAConstant) {
this.constant = Constant.NotAConstant;
this.enclosingScope = blockScope;
if (this.original == this)
this.ordinal = recordFunctionalType(blockScope);
-
+
if (!argumentsTypeElided) {
for (int i = 0; i < argumentsLength; i++)
this.argumentTypes[i] = this.arguments[i].type.resolveType(blockScope, true /* check bounds*/);
}
if (this.expectedType == null && this.expressionContext == INVOCATION_CONTEXT) {
return new PolyTypeBinding(this);
- }
+ }
}
-
+
MethodScope methodScope = blockScope.methodScope();
this.scope = new MethodScope(blockScope, this, methodScope.isStatic, methodScope.lastVisibleFieldID);
this.scope.isConstructorCall = methodScope.isConstructorCall;
super.resolveType(blockScope, skipKosherCheck); // compute & capture interface function descriptor.
-
+
final boolean haveDescriptor = this.descriptor != null;
-
+
if (!skipKosherCheck && (!haveDescriptor || this.descriptor.typeVariables != Binding.NO_TYPE_VARIABLES)) // already complained in kosher*
return this.resolvedType = null;
-
+
this.binding = new MethodBinding(ClassFileConstants.AccPrivate | ClassFileConstants.AccSynthetic | ExtraCompilerModifiers.AccUnresolved,
CharOperation.concat(TypeConstants.ANONYMOUS_METHOD, Integer.toString(this.ordinal).toCharArray()), // will be fixed up later.
- haveDescriptor ? this.descriptor.returnType : TypeBinding.VOID,
- Binding.NO_PARAMETERS, // for now.
- haveDescriptor ? this.descriptor.thrownExceptions : Binding.NO_EXCEPTIONS,
+ haveDescriptor ? this.descriptor.returnType : TypeBinding.VOID,
+ Binding.NO_PARAMETERS, // for now.
+ haveDescriptor ? this.descriptor.thrownExceptions : Binding.NO_EXCEPTIONS,
blockScope.enclosingSourceType());
this.binding.typeVariables = Binding.NO_TYPE_VARIABLES;
-
+
boolean argumentsHaveErrors = false;
if (haveDescriptor) {
int parametersLength = this.descriptor.parameters.length;
@@ -303,7 +303,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
}
}
-
+
TypeBinding[] newParameters = new TypeBinding[argumentsLength];
AnnotationBinding [][] parameterAnnotations = null;
@@ -317,7 +317,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
argumentsHaveErrors = true;
}
}
-
+
TypeBinding argumentType;
final TypeBinding expectedParameterType = haveDescriptor && i < this.descriptor.parameters.length ? this.descriptor.parameters[i] : null;
argumentType = argumentsTypeElided ? expectedParameterType : this.argumentTypes[i];
@@ -339,19 +339,19 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
ReferenceBinding groundType = null;
ReferenceBinding expectedSAMType = null;
if (this.expectedType instanceof IntersectionTypeBinding18)
- expectedSAMType = (ReferenceBinding) ((IntersectionTypeBinding18) this.expectedType).getSAMType(blockScope);
+ expectedSAMType = (ReferenceBinding) ((IntersectionTypeBinding18) this.expectedType).getSAMType(blockScope);
else if (this.expectedType instanceof ReferenceBinding)
expectedSAMType = (ReferenceBinding) this.expectedType;
if (expectedSAMType != null)
groundType = findGroundTargetType(blockScope, this.expectedType, expectedSAMType, argumentsTypeElided);
-
+
if (groundType != null) {
this.descriptor = groundType.getSingleAbstractMethod(blockScope, true);
if (!this.descriptor.isValidBinding()) {
reportSamProblem(blockScope, this.descriptor);
} else {
if (groundType != expectedSAMType) { //$IDENTITY-COMPARISON$
- if (!groundType.isCompatibleWith(expectedSAMType, this.scope)) { // the ground has shifted, are we still on firm grounds ?
+ if (!groundType.isCompatibleWith(expectedSAMType, this.scope)) { // the ground has shifted, are we still on firm grounds ?
blockScope.problemReporter().typeMismatchError(groundType, this.expectedType, this, null); // report deliberately against block scope so as not to blame the lambda.
return null;
}
@@ -387,7 +387,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
if (leafType instanceof ReferenceBinding && (((ReferenceBinding) leafType).modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
this.binding.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
}
- newParameters[i] = argument.bind(this.scope, argumentType, false);
+ newParameters[i] = argument.bind(this.scope, argumentType, false);
if (argument.annotations != null) {
this.binding.tagBits |= TagBits.HasParameterAnnotations;
if (parameterAnnotations == null) {
@@ -413,7 +413,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
if (parameterAnnotations != null)
this.binding.setParameterAnnotations(parameterAnnotations);
}
-
+
if (!argumentsTypeElided && !argumentsHaveErrors && this.binding.isVarargs()) {
if (!this.binding.parameters[this.binding.parameters.length - 1].isReifiable()) {
this.scope.problemReporter().possibleHeapPollutionFromVararg(this.arguments[this.arguments.length - 1]);
@@ -430,7 +430,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
if (genericSignatureNeeded)
this.binding.modifiers |= (exception.modifiers & ExtraCompilerModifiers.AccGenericSignature);
}
-
+
TypeBinding returnType = this.binding.returnType;
if (returnType != null) {
if ((returnType.tagBits & TagBits.HasMissingType) != 0) {
@@ -453,7 +453,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
this.binding.modifiers &= ~ExtraCompilerModifiers.AccUnresolved;
-
+
if (this.body instanceof Expression && ((Expression) this.body).isTrulyExpression()) {
Expression expression = (Expression) this.body;
new ReturnStatement(expression, expression.sourceStart, expression.sourceEnd, true).resolve(this.scope); // :-) ;-)
@@ -506,10 +506,10 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
return onlyWildcardMismatch;
}
private ReferenceBinding findGroundTargetType(BlockScope blockScope, TypeBinding targetType, TypeBinding expectedSAMType, boolean argumentTypesElided) {
-
+
if (expectedSAMType instanceof IntersectionTypeBinding18)
- expectedSAMType = ((IntersectionTypeBinding18) expectedSAMType).getSAMType(blockScope);
-
+ expectedSAMType = ((IntersectionTypeBinding18) expectedSAMType).getSAMType(blockScope);
+
if (expectedSAMType instanceof ReferenceBinding && expectedSAMType.isValidBinding()) {
ParameterizedTypeBinding withWildCards = InferenceContext18.parameterizedWithWildcard(expectedSAMType);
if (withWildCards != null) {
@@ -550,8 +550,8 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
boolean oldAnalyseResources = compilerOptions.analyseResourceLeaks;
compilerOptions.analyseResourceLeaks = false;
try {
- this.body.analyseCode(this.scope,
- ehfc = new ExceptionInferenceFlowContext(null, this, Binding.NO_EXCEPTIONS, null, this.scope, FlowInfo.DEAD_END),
+ this.body.analyseCode(this.scope,
+ ehfc = new ExceptionInferenceFlowContext(null, this, Binding.NO_EXCEPTIONS, null, this.scope, FlowInfo.DEAD_END),
UnconditionalFlowInfo.fakeInitializedFlowInfo(this.scope.outerMostMethodScope().analysisIndex, this.scope.referenceType().maxFieldCount));
this.thrownExceptions = ehfc.extendedExceptions == null ? Collections.emptySet() : new HashSet<TypeBinding>(ehfc.extendedExceptions);
} catch (Exception e) {
@@ -562,10 +562,10 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, final FlowInfo flowInfo) {
-
- if (this.ignoreFurtherInvestigation)
+
+ if (this.ignoreFurtherInvestigation)
return flowInfo;
-
+
FlowInfo lambdaInfo = flowInfo.copy(); // what happens in vegas, stays in vegas ...
ExceptionHandlingFlowContext methodContext =
new ExceptionHandlingFlowContext(
@@ -585,9 +585,9 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
this.bits |= (this.arguments[i].bits & ASTNode.HasTypeAnnotations);
}
}
-
+
lambdaInfo = this.body.analyseCode(this.scope, methodContext, lambdaInfo);
-
+
// check for missing returning path for block body's ...
if (this.body instanceof Block) {
TypeBinding returnTypeBinding = expectedResultType();
@@ -601,7 +601,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
}
} else { // Expression
- if (currentScope.compilerOptions().isAnnotationBasedNullAnalysisEnabled
+ if (currentScope.compilerOptions().isAnnotationBasedNullAnalysisEnabled
&& lambdaInfo.reachMode() == FlowInfo.REACHABLE)
{
Expression expression = (Expression)this.body;
@@ -651,7 +651,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
inheritedAnnotationName = env.getNullableAnnotationName();
currentScope.problemReporter().illegalRedefinitionToNonNullParameter(this.arguments[i], this.descriptor.declaringClass, inheritedAnnotationName);
}
- }
+ }
}
}
@@ -699,10 +699,10 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
return true;
if (argumentsTypeElided())
return false;
-
+
if (!super.isPertinentToApplicability(targetType, method))
return false;
-
+
if (this.body instanceof Expression && ((Expression) this.body).isTrulyExpression()) {
if (!((Expression) this.body).isPertinentToApplicability(targetType, method))
return false;
@@ -722,10 +722,10 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
}
}
-
+
return true;
}
-
+
public boolean isVoidCompatible() {
return this.voidCompatible;
}
@@ -733,7 +733,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
public boolean isValueCompatible() {
return this.valueCompatible;
}
-
+
@Override
public StringBuffer printExpression(int tab, StringBuffer output) {
return printExpression(tab, output, false);
@@ -768,7 +768,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
public TypeBinding expectedResultType() {
return this.descriptor != null && this.descriptor.isValidBinding() ? this.descriptor.returnType : null;
}
-
+
@Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
@@ -785,11 +785,11 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
visitor.endVisit(this, blockScope);
}
-
+
public MethodScope getScope() {
return this.scope;
}
-
+
private boolean enclosingScopesHaveErrors() {
Scope skope = this.enclosingScope;
while (skope != null) {
@@ -800,7 +800,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
return false;
}
-
+
private void analyzeShape() { // Simple minded analysis for code assist & potential compatibility.
class ShapeComputer extends ASTVisitor {
@Override
@@ -844,11 +844,11 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
this.valueCompatible = this.body.doesNotCompleteNormally();
}
}
-
+
@Override
public boolean isPotentiallyCompatibleWith(TypeBinding targetType, Scope skope) {
/* We get here only when the lambda is NOT pertinent to applicability and that too only for type elided lambdas. */
-
+
/* 15.12.2.1: A lambda expression (§15.27) is potentially compatible with a functional interface type (§9.8) if all of the following are true:
– The arity of the target type's function type is the same as the arity of the lambda expression.
– If the target type's function type has a void return, then the lambda body is either a statement expression (§14.8) or a void-compatible block (§15.27.2).
@@ -856,14 +856,14 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
*/
if (!super.isPertinentToApplicability(targetType, null))
return true;
-
+
final MethodBinding sam = targetType.getSingleAbstractMethod(skope, true);
if (sam == null || !sam.isValidBinding())
return false;
-
+
if (sam.parameters.length != this.arguments.length)
return false;
-
+
analyzeShape();
if (sam.returnType.id == TypeIds.T_void) {
if (!this.voidCompatible)
@@ -886,10 +886,10 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
return internalIsCompatibleWith(targetType, skope, false) == CompatibilityResult.COMPATIBLE;
}
CompatibilityResult internalIsCompatibleWith(TypeBinding targetType, Scope skope, boolean reportShapeProblem) {
-
+
if (!super.isPertinentToApplicability(targetType, null))
return CompatibilityResult.COMPATIBLE;
-
+
LambdaExpression copy = null;
try {
copy = cachedResolvedCopy(targetType, argumentsTypeElided(), false, null); // if argument types are elided, we don't care for result expressions against *this* target, any valid target is OK.
@@ -900,7 +900,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
if (copy == null)
return CompatibilityResult.INCOMPATIBLE;
-
+
// copy here is potentially compatible with the target type and has its shape fully computed: i.e value/void compatibility is determined and result expressions have been gathered.
targetType = findGroundTargetType(this.enclosingScope, targetType, targetType, argumentsTypeElided());
MethodBinding sam = targetType.getSingleAbstractMethod(this.enclosingScope, true);
@@ -941,7 +941,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
return CompatibilityResult.COMPATIBLE;
}
-
+
class CopyFailureException extends RuntimeException {
private static final long serialVersionUID = 1L;
}
@@ -951,14 +951,14 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
targetType = findGroundTargetType(this.enclosingScope, targetType, targetType, argumentsTypeElided());
if (targetType == null)
return null;
-
+
MethodBinding sam = targetType.getSingleAbstractMethod(this.enclosingScope, true);
if (sam == null || !sam.isValidBinding())
return null;
-
+
if (sam.parameters.length != this.arguments.length)
return null;
-
+
LambdaExpression copy = null;
if (this.copiesPerTargetType != null) {
copy = this.copiesPerTargetType.get(targetType);
@@ -1008,12 +1008,12 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
// SH}
}
}
-
+
/**
* Get a resolved copy of this lambda for use by type inference, as to avoid spilling any premature
* type results into the original lambda.
- *
- * @param targetType the target functional type against which inference is attempted, must be a non-null valid functional type
+ *
+ * @param targetType the target functional type against which inference is attempted, must be a non-null valid functional type
* @return a resolved copy of 'this' or null if significant errors where encountered
*/
@Override
@@ -1029,12 +1029,12 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
@Override
public boolean sIsMoreSpecific(TypeBinding s, TypeBinding t, Scope skope) {
-
- // 15.12.2.5
-
+
+ // 15.12.2.5
+
if (super.sIsMoreSpecific(s, t, skope))
return true;
-
+
if (argumentsTypeElided() || t.findSuperTypeOriginatingFrom(s) != null)
return false;
TypeBinding sPrime = s; // uncaptured
@@ -1060,17 +1060,17 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
TypeBinding r1 = adapted.returnType; // return type of S adapted to type parameters of T
TypeBinding r2 = tSam.returnType;
-
+
if (r2.id == TypeIds.T_void)
return true;
-
+
if (r1.id == TypeIds.T_void)
return false;
-
+
// r1 <: r2
if (r1.isCompatibleWith(r2, skope))
return true;
-
+
LambdaExpression copy;
try {
copy = cachedResolvedCopy(s, true /* any resolved copy is good */, false, null); // we expect a cached copy - otherwise control won't reach here.
@@ -1108,7 +1108,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
if (i == returnExpressionsLength)
return true;
- }
+ }
}
return false;
}
@@ -1117,7 +1117,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
final Parser parser = new Parser(this.enclosingScope.problemReporter(), false);
final ICompilationUnit compilationUnit = this.compilationResult.getCompilationUnit();
char[] source = compilationUnit != null ? compilationUnit.getContents() : this.text;
- LambdaExpression copy = (LambdaExpression) parser.parseLambdaExpression(source, compilationUnit != null ? this.sourceStart : 0, this.sourceEnd - this.sourceStart + 1,
+ LambdaExpression copy = (LambdaExpression) parser.parseLambdaExpression(source, compilationUnit != null ? this.sourceStart : 0, this.sourceEnd - this.sourceStart + 1,
this.enclosingScope.referenceCompilationUnit(), false /* record line separators */);
if (copy != null) { // ==> syntax errors == null
@@ -1152,7 +1152,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
this.voidCompatible = !this.returnsValue;
}
}
-
+
@Override
public CompilationResult compilationResult() {
return this.compilationResult;
@@ -1160,7 +1160,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
@Override
public void abort(int abortLevel, CategorizedProblem problem) {
-
+
switch (abortLevel) {
case AbortCompilation :
throw new AbortCompilation(this.compilationResult, problem);
@@ -1210,7 +1210,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
}
}
-
+
@Override
public void tagAsHavingIgnoredMandatoryErrors(int problemId) {
switch (problemId) {
@@ -1219,7 +1219,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
case IProblem.UnhandledExceptionInDefaultConstructor:
case IProblem.UnhandledException:
return;
- /* The following structural problems can occur only because of target type imposition. Filter, so we can distinguish inherent errors
+ /* The following structural problems can occur only because of target type imposition. Filter, so we can distinguish inherent errors
in explicit lambdas. This is to help decide whether to proceed with data/control flow analysis to discover shape. In case of inherent
errors, we will not call analyze code as it is not prepared to analyze broken programs.
*/
@@ -1235,7 +1235,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
case IProblem.illFormedParameterizationOfFunctionalInterface:
case IProblem.NoGenericLambda:
return;
- default:
+ default:
this.hasIgnoredMandatoryErrors = true;
MethodScope enclosingLambdaScope = this.scope == null ? null : this.scope.enclosingLambdaScope();
while (enclosingLambdaScope != null) {
@@ -1246,7 +1246,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
return;
}
}
-
+
public Set<TypeBinding> getThrownExceptions() {
if (this.thrownExceptions == null)
return Collections.emptySet();
@@ -1281,7 +1281,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
} while (restart);
}
-
+
public void generateCode(ClassFile classFile) {
classFile.generateMethodInfoHeader(this.binding);
int methodAttributeOffset = classFile.contentsOffset;
@@ -1334,12 +1334,12 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
classFile.completeMethodInfo(this.binding, methodAttributeOffset, attributeNumber);
}
-
+
public void addSyntheticArgument(LocalVariableBinding actualOuterLocalVariable) {
-
- if (this.original != this || this.binding == null)
+
+ if (this.original != this || this.binding == null)
return; // Do not bother tracking outer locals for clones created during overload resolution.
-
+
SyntheticArgumentBinding syntheticLocal = null;
int newSlot = this.outerLocalVariables.length;
for (int i = 0; i < newSlot; i++) {
@@ -1366,7 +1366,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
default :
this.outerLocalVariablesSlotSize++;
break;
- }
+ }
}
public SyntheticArgumentBinding getSyntheticArgument(LocalVariableBinding actualOuterLocalVariable) {
@@ -1376,7 +1376,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
return null;
}
- // Return the actual method binding devoid of synthetics.
+ // Return the actual method binding devoid of synthetics.
@Override
public MethodBinding getMethodBinding() {
if (this.actualMethodBinding == null) {
@@ -1428,10 +1428,10 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
}
public ReferenceBinding getTypeBinding() {
-
+
if (this.classType != null || this.resolvedType == null)
return null;
-
+
class LambdaTypeBinding extends ReferenceBinding {
@Override
public MethodBinding[] methods() {
@@ -1484,7 +1484,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
*/
class LocalTypeSubstitutor extends Substitutor {
Map<Integer,LocalTypeBinding> localTypes2;
-
+
public LocalTypeSubstitutor(Map<Integer, LocalTypeBinding> localTypes) {
this.localTypes2 = localTypes;
}
@@ -1496,7 +1496,7 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre
MethodScope lambdaScope2 = orgLocal.scope.enclosingLambdaScope();
if (lambdaScope2 != null) {
if (((LambdaExpression) lambdaScope2.referenceContext).sourceStart == LambdaExpression.this.sourceStart) {
- // local type within this lambda needs replacement:
+ // local type within this lambda needs replacement:
TypeBinding substType = this.localTypes2.get(orgLocal.sourceStart);
if (substType != null && substType != orgLocal) { //$IDENTITY-COMPARISON$
orgLocal.transferConstantPoolNameTo(substType);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
index 026243af0..7ce3c26b3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
@@ -37,7 +37,7 @@
* Bug 529556 - [18.3] Add content assist support for 'var' as a type
* Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
* Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
- * Bug 426616 - [1.8][compiler] Type Annotations, multiple problems
+ * Bug 426616 - [1.8][compiler] Type Annotations, multiple problems
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.ast;
@@ -130,9 +130,9 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
return flowInfo;
}
this.initialization.checkNPEbyUnboxing(currentScope, flowContext, flowInfo);
-
+
FlowInfo preInitInfo = null;
- boolean shouldAnalyseResource = this.binding != null
+ boolean shouldAnalyseResource = this.binding != null
&& flowInfo.reachMode() == FlowInfo.REACHABLE
&& currentScope.compilerOptions().analyseResourceLeaks
//{ObjectTeams: notably lift methods of Closeable roles would trigger warnings against synthetic code
@@ -261,7 +261,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
AnnotationCollector collector = new AnnotationCollector(this, targetType, parameterIndex, allAnnotationContexts);
this.traverse(collector, (BlockScope) null);
}
-
+
public boolean isArgument() {
return false;
}
@@ -272,7 +272,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
// Perform upwards projection on type wrt mentioned type variables
TypeBinding[] mentionedTypeVariables= findCapturedTypeVariables(newType);
if (mentionedTypeVariables != null && mentionedTypeVariables.length > 0) {
- newType = newType.upwardsProjection(this.binding.declaringScope, mentionedTypeVariables);
+ newType = newType.upwardsProjection(this.binding.declaringScope, mentionedTypeVariables);
}
this.type.resolvedType = newType;
if (this.binding != null) {
@@ -295,7 +295,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
if (mentioned.isEmpty()) return null;
return mentioned.toArray(new TypeVariableBinding[mentioned.size()]);
}
-
+
private static Expression findPolyExpression(Expression e) {
// This is simpler than using an ASTVisitor, since we only care about a very few select cases.
if (e instanceof FunctionalExpression) {
@@ -318,7 +318,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
}
return null;
}
-
+
@Override
public void resolve(BlockScope scope) {
resolve(scope, false);
@@ -398,10 +398,10 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
}
if (isTypeNameVar) {
// Create binding for the initializer's type
- // In order to resolve self-referential initializers, we must declare the variable with a placeholder type (j.l.Object), and then patch it later
+ // In order to resolve self-referential initializers, we must declare the variable with a placeholder type (j.l.Object), and then patch it later
this.binding = new LocalVariableBinding(this, variableType != null ? variableType : scope.getJavaLangObject(), this.modifiers, false) {
private boolean isInitialized = false;
-
+
@Override
public void markReferenced() {
if (! this.isInitialized) {
@@ -451,9 +451,9 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
return;
}
boolean resolveAnnotationsEarly = false;
- if (scope.environment().usesNullTypeAnnotations()
+ if (scope.environment().usesNullTypeAnnotations()
&& !isTypeNameVar // 'var' does not provide a target type
- && variableType != null && variableType.isValidBinding()) {
+ && variableType != null && variableType.isValidBinding()) {
resolveAnnotationsEarly = this.initialization instanceof Invocation
|| this.initialization instanceof ConditionalExpression
|| this.initialization instanceof SwitchExpression
@@ -583,8 +583,8 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
}
visitor.endVisit(this, scope);
}
-
- private void traverseWithoutInitializer(ASTVisitor visitor, BlockScope scope) {
+
+ private void traverseWithoutInitializer(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
int annotationsLength = this.annotations.length;
@@ -597,12 +597,12 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
}
public boolean isRecoveredFromLoneIdentifier() { // recovered from lonely identifier or identifier cluster ?
- return this.name == RecoveryScanner.FAKE_IDENTIFIER &&
+ return this.name == RecoveryScanner.FAKE_IDENTIFIER &&
(this.type instanceof SingleTypeReference || (this.type instanceof QualifiedTypeReference && !(this.type instanceof ArrayQualifiedTypeReference))) && this.initialization == null && !this.type.isBaseTypeReference();
}
-
+
public boolean isTypeNameVar(Scope scope) {
return this.type != null && this.type.isTypeNameVar(scope);
}
-
+
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java
index b65a66745..a217432f7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java
@@ -119,7 +119,7 @@ public class MemberValuePair extends ASTNode {
&& requiredType.dimensions() == 1
&& (MemberValuePair.this.value.isConstantValueOfTypeAssignableToType(valueType, leafType)
|| valueType.isCompatibleWith(leafType)))) {
-
+
if (leafType.isAnnotationType() && !valueType.isAnnotationType()) {
scope.problemReporter().annotationValueMustBeAnnotation(MemberValuePair.this.binding.declaringClass,
MemberValuePair.this.name, MemberValuePair.this.value, leafType);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
index db5498f9b..b53b7819e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
@@ -49,7 +49,7 @@
* Bug 426290 - [1.8][compiler] Inference + overloading => wrong method resolution ?
* Bug 427483 - [Java 8] Variables in lambdas sometimes can't be resolved
* Bug 427438 - [1.8][compiler] NPE at org.eclipse.jdt.internal.compiler.ast.ConditionalExpression.generateCode(ConditionalExpression.java:280)
- * Bug 426996 - [1.8][inference] try to avoid method Expression.unresolve()?
+ * Bug 426996 - [1.8][inference] try to avoid method Expression.unresolve()?
* Bug 428352 - [1.8][compiler] Resolution errors don't always surface
* Bug 429430 - [1.8] Lambdas and method reference infer wrong exception type with generics (RuntimeException instead of IOException)
* Bug 441734 - [1.8][inference] Generic method with nested parameterized type argument fails on method reference
@@ -57,7 +57,7 @@
* Bug 456487 - [1.8][null] @Nullable type variant of @NonNull-constrained type parameter causes grief
* Bug 407414 - [compiler][null] Incorrect warning on a primitive type being null
* Bug 472618 - [compiler][null] assertNotNull vs. Assert.assertNotNull
- * Bug 470958 - [1.8] Unable to convert lambda
+ * Bug 470958 - [1.8] Unable to convert lambda
* Bug 410218 - Optional warning for arguments of "unexpected" types to Map#get(Object), Collection#remove(Object) et al.
* Jesper S Moller - Contributions for
* Bug 378674 - "The method can be declared as static" is wrong
@@ -211,12 +211,12 @@ public class MessageSend extends Expression implements IPolyExpression, Invocati
private SimpleLookupTable/*<PGMB,InferenceContext18>*/ inferenceContexts;
private HashMap<TypeBinding, MethodBinding> solutionsPerTargetType;
private InferenceContext18 outerInferenceContext; // resolving within the context of an outer (lambda) inference?
-
+
private boolean receiverIsType;
protected boolean argsContainCast;
public TypeBinding[] argumentTypes = Binding.NO_PARAMETERS;
public boolean argumentsHaveErrors = false;
-
+
public FakedTrackingVariable closeTracker;
//{ObjectTeams:
@@ -248,7 +248,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
for (int i=0; i<TypeConstants.closeMethods.length; i++) {
CloseMethodRecord record = TypeConstants.closeMethods[i];
if (CharOperation.equals(record.selector, this.selector)
- && CharOperation.equals(record.typeName, this.binding.declaringClass.compoundName))
+ && CharOperation.equals(record.typeName, this.binding.declaringClass.compoundName))
{
int len = Math.min(record.numCloseableArgs, this.arguments.length);
for (int j=0; j<len; j++)
@@ -364,19 +364,19 @@ private void recordCallingClose(BlockScope currentScope, FlowContext flowContext
//{ObjectTeams: checkBaseCallsIfSuper
protected FlowInfo checkBaseCallsIfSuper(BlockScope currentScope, FlowInfo flowInfo) {
MethodScope methodScope = currentScope.methodScope();
- if (methodScope == null)
+ if (methodScope == null)
return flowInfo;
AbstractMethodDeclaration methodDecl = methodScope.referenceMethod();
- if (methodDecl == null || !methodDecl.isCallin())
+ if (methodDecl == null || !methodDecl.isCallin())
return flowInfo;
if (!this.isSuperAccess())
return flowInfo;
MethodDeclaration callinMethod = (MethodDeclaration) methodDecl;
if (MethodModel.hasCallinFlag(this.binding, CALLIN_FLAG_DEFINITELY_MISSING_BASECALL))
return flowInfo; // no effect
-
+
boolean definitelyViaSuper = !MethodModel.hasCallinFlag(this.binding, CALLIN_FLAG_POTENTIALLY_MISSING_BASECALL);
-
+
LocalVariableBinding trackingVariable = callinMethod.baseCallTrackingVariable.binding;
if (flowInfo.isDefinitelyAssigned(callinMethod.baseCallTrackingVariable)) {
if (definitelyViaSuper)
@@ -460,13 +460,13 @@ private int detectAssertionUtility(int argumentIdx) {
if (CharOperation.equals(TypeConstants.CHECK_NOT_NULL, this.selector))
return NONNULL_ASSERTION;
}
- break;
+ break;
case TypeIds.T_JavaUtilObjects:
if (parameterType.isTypeVariable()) {
if (CharOperation.equals(TypeConstants.REQUIRE_NON_NULL, this.selector))
return NONNULL_ASSERTION;
}
- break;
+ break;
}
}
}
@@ -510,7 +510,7 @@ private FlowInfo analyseBooleanAssertion(BlockScope currentScope, Expression arg
// if the code does reach ahead, it means the assert didn't cause an exit, and so
// the expression inside it shouldn't change the prior flowinfo
// viz. org.eclipse.core.runtime.Assert.isLegal(false && o != null)
-
+
// keep the merge from the initial code for the definite assignment
// analysis, tweak the null part to influence nulls downstream
flowInfo = flowInfo.mergedWith(assertWhenFailInfo.nullInfoLessUnconditionalCopy()).
@@ -526,14 +526,14 @@ private FlowInfo analyseNullAssertion(BlockScope currentScope, Expression argume
flowInfo = argument.analyseCode(currentScope, flowContext, flowInfo).unconditionalInits();
LocalVariableBinding local = argument.localVariableBinding();
if (local != null) {// beyond this point the argument can only be null/nonnull
- if (expectingNull)
+ if (expectingNull)
flowInfo.markAsDefinitelyNull(local);
- else
+ else
flowInfo.markAsDefinitelyNonNull(local);
} else {
if (!expectingNull
- && argument instanceof Reference
- && currentScope.compilerOptions().enableSyntacticNullAnalysisForFields)
+ && argument instanceof Reference
+ && currentScope.compilerOptions().enableSyntacticNullAnalysisForFields)
{
FieldBinding field = ((Reference)argument).lastFieldBinding();
if (field != null && (field.type.tagBits & TagBits.IsBaseType) == 0) {
@@ -552,7 +552,7 @@ public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flow
int nullStatus = nullStatus(flowInfo, flowContext); // note that flowInfo is not used inside nullStatus(..)
if ((nullStatus & FlowInfo.POTENTIALLY_NULL) != 0) {
if(this.binding.returnType.isTypeVariable() && nullStatus == FlowInfo.FREE_TYPEVARIABLE && scope.environment().globalOptions.pessimisticNullAnalysisForFreeTypeVariablesEnabled) {
- scope.problemReporter().methodReturnTypeFreeTypeVariableReference(this.binding, this);
+ scope.problemReporter().methodReturnTypeFreeTypeVariableReference(this.binding, this);
} else {
scope.problemReporter().messageSendPotentialNullReference(this.binding, this);
}
@@ -590,7 +590,7 @@ public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBind
TypeBinding leafRuntime = runtimeTimeType.leafComponentType();
if ((leafCompile instanceof ReferenceBinding) && (leafRuntime instanceof ReferenceBinding)
&& ((ReferenceBinding)leafCompile).isCompatibleViaLowering((ReferenceBinding) leafRuntime))
- this.valueCast = originalType.genericCast(compileTimeType);
+ this.valueCast = originalType.genericCast(compileTimeType);
// SH}
}
if (this.valueCast instanceof ReferenceBinding) {
@@ -639,13 +639,13 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
}
//{ObjectTeams: various synthetic arguments for static role methods:
// role method bridge needs role arg (null)
- if ( this.syntheticAccessor instanceof SyntheticRoleBridgeMethodBinding
+ if ( this.syntheticAccessor instanceof SyntheticRoleBridgeMethodBinding
&& !this.syntheticAccessor.isStatic() // non-static accessor ...
&& this.binding.isStatic()) // towards static role method
{
codeStream.aload_0(); // receiver: team instance
codeStream.aconst_null(); // arg: no role instance
- codeStream.iconst_0(); // arg: dummy
+ codeStream.iconst_0(); // arg: dummy
codeStream.aload_0(); // arg: team instance
// directly use the accessor and its declaring class for the invoke instruction:
this.binding = this.syntheticAccessor;
@@ -682,7 +682,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean
//{ObjectTeams: decapsulated methods will not be private in the JVM any more:
/* orig:
} else if((this.receiver.isSuper()) || codegenBinding.isPrivate()){
- } else if((this.receiver.isSuper()) ||
+ } else if((this.receiver.isSuper()) ||
(!currentScope.enclosingSourceType().isNestmateOf(this.binding.declaringClass) && codegenBinding.isPrivate())){
:giro */
@@ -765,7 +765,7 @@ public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo f
boolean useNesting = currentScope.enclosingSourceType().isNestmateOf(codegenBinding.declaringClass) &&
!(this.receiver instanceof QualifiedSuperReference);
//{ObjectTeams: nesting a la JEP 181 doesn't help for private role methods
- useNesting &= !this.actualReceiverType.isRole();
+ useNesting &= !this.actualReceiverType.isRole();
// SH}
// depth is set for both implicit and explicit access (see MethodBinding#canBeSeenBy)
if (!useNesting &&
@@ -776,7 +776,7 @@ public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo f
}
} else if (this.receiver instanceof QualifiedSuperReference) { // qualified super
- if (this.actualReceiverType.isInterface())
+ if (this.actualReceiverType.isInterface())
return; // invoking an overridden default method, which is accessible/public by definition
// qualified super need emulation always
SourceTypeBinding destinationType = (SourceTypeBinding)(((QualifiedSuperReference)this.receiver).currentCompatibleType);
@@ -900,7 +900,7 @@ public StringBuffer printExpression(int indent, StringBuffer output){
@Override
public TypeBinding resolveType(BlockScope scope) {
- // Answer the signature return type, answers PolyTypeBinding if a poly expression and there is no target type
+ // Answer the signature return type, answers PolyTypeBinding if a poly expression and there is no target type
// Base type promotion
if (this.constant != Constant.NotAConstant) {
this.constant = Constant.NotAConstant;
@@ -973,7 +973,7 @@ public TypeBinding resolveType(BlockScope scope) {
//{ObjectTeams: keep pre-resolved binding inside generated code:
if (!this.isGenerated)
// SH}
- if (this.arguments[i].resolvedType != null)
+ if (this.arguments[i].resolvedType != null)
scope.problemReporter().genericInferenceError("Argument was unexpectedly found resolved", this); //$NON-NLS-1$
if (argument instanceof CastExpression) {
argument.bits |= ASTNode.DisableUnnecessaryCastCheck; // will check later on
@@ -1038,7 +1038,7 @@ public TypeBinding resolveType(BlockScope scope) {
return null;
}
}
-
+
//{ObjectTeams: revert receiver weakening & setup anchorMapping:
if (this.actualReceiverType instanceof WeakenedTypeBinding) {
// this happens if receiver is a role-type field from a super team, see B.1.1-otjld-sh-32.
@@ -1189,7 +1189,7 @@ public TypeBinding resolveType(BlockScope scope) {
} else {
// orig:
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=245007 avoid secondary errors in case of
- // missing super type for anonymous classes ...
+ // missing super type for anonymous classes ...
ReferenceBinding declaringClass = this.binding.declaringClass;
boolean avoidSecondary = declaringClass != null &&
declaringClass.isAnonymousType() &&
@@ -1273,7 +1273,7 @@ public TypeBinding resolveType(BlockScope scope) {
returnType = scope.environment().createAnnotatedType(returnType, new AnnotationBinding[] {scope.environment().getNonNullAnnotation()});
// SH}
}
-
+
if (((this.bits & ASTNode.InsideExpressionStatement) != 0)
&& this.binding.isPolymorphic()) {
// we only set the return type to be void if this method invocation is used inside an expression statement
@@ -1415,13 +1415,13 @@ protected TypeBinding findMethodBinding(BlockScope scope) {
if (referenceContext instanceof LambdaExpression) {
this.outerInferenceContext = ((LambdaExpression) referenceContext).inferenceContext;
}
-
+
if (this.expectedType != null && this.binding instanceof PolyParameterizedGenericMethodBinding) {
this.binding = this.solutionsPerTargetType.get(this.expectedType);
}
if (this.binding == null) { // first look up or a "cache miss" somehow.
- this.binding = this.receiver.isImplicitThis() ?
- scope.getImplicitMethod(this.selector, this.argumentTypes, this)
+ this.binding = this.receiver.isImplicitThis() ?
+ scope.getImplicitMethod(this.selector, this.argumentTypes, this)
: scope.getMethod(this.actualReceiverType, this.selector, this.argumentTypes, this);
if (this.binding instanceof PolyParameterizedGenericMethodBinding) {
@@ -1461,7 +1461,7 @@ protected AnchorMapping beforeMethodLookup(
if (this.actualReceiverType instanceof ReferenceBinding) // funny thing: receiver could be array..
Dependencies.ensureBindingState(
(ReferenceBinding)this.actualReceiverType,
- ITranslationStates.STATE_METHODS_CREATED); // creates bindings for possible target methods (incl. shorthand callout)
+ ITranslationStates.STATE_METHODS_CREATED); // creates bindings for possible target methods (incl. shorthand callout)
} finally {
// it is essential that we setup an anchor mapping in any case.
result = AnchorMapping.setupNewMapping(receiverForAnchorMapping(scope), this.arguments, scope);
@@ -1560,7 +1560,7 @@ private TypeBinding checkStrengthenReturnType(TypeBinding returnType, Scope scop
strengthenedReturnType = (ReferenceBinding)TeamModel.strengthenRoleType(site, currentType);
if (TypeBinding.equalsEquals(strengthenedReturnType, currentType))
return returnType; //unchanged
-
+
// if strengthenRoleType actually worked it returned a dependent type
this.resolvedType = WeakenedTypeBinding.makeWeakenedTypeBinding((DependentTypeBinding) strengthenedReturnType, currentType, returnType.dimensions());
}
@@ -1622,7 +1622,7 @@ public void setExpressionContext(ExpressionContext context) {
@Override
public boolean isPolyExpression() {
-
+
/* 15.12 has four requirements: 1) The invocation appears in an assignment context or an invocation context
2) The invocation elides NonWildTypeArguments 3) the method to be invoked is a generic method (8.4.4).
4) The return type of the method to be invoked mentions at least one of the method's type parameters.
@@ -1690,26 +1690,26 @@ public boolean isCompatibleWith(TypeBinding targetType, final Scope scope) {
public boolean isPolyExpression(MethodBinding resolutionCandidate) {
if (this.expressionContext != ASSIGNMENT_CONTEXT && this.expressionContext != INVOCATION_CONTEXT)
return false;
-
+
if (this.typeArguments != null && this.typeArguments.length > 0)
return false;
-
+
if (this.constant != Constant.NotAConstant)
throw new UnsupportedOperationException("Unresolved MessageSend can't be queried if it is a polyexpression"); //$NON-NLS-1$
-
+
if (resolutionCandidate != null) {
if (resolutionCandidate instanceof ParameterizedGenericMethodBinding) {
ParameterizedGenericMethodBinding pgmb = (ParameterizedGenericMethodBinding) resolutionCandidate;
if (pgmb.inferredReturnType)
return true; // if already determined
- }
+ }
if (resolutionCandidate.returnType != null) {
// resolution may have prematurely instantiated the generic method, we need the original, though:
MethodBinding candidateOriginal = resolutionCandidate.original();
return candidateOriginal.returnType.mentionsAny(candidateOriginal.typeVariables(), -1);
}
}
-
+
return false;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java
index b962af479..e52d215a1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java
@@ -119,7 +119,7 @@ public class MethodDeclaration extends AbstractMethodDeclaration {
&& this.binding.isOrEnclosedByPrivateType())) {
if (!classScope.referenceCompilationUnit().compilationResult.hasSyntaxError) {
//{ObjectTeams: don't report against generated methods nor roles (could be accessed by tsub role):
- if ( !CharOperation.prefixEquals(IOTConstants.OT_DOLLAR_NAME, this.selector)
+ if ( !CharOperation.prefixEquals(IOTConstants.OT_DOLLAR_NAME, this.selector)
&& (!classScope.referenceContext.isRole()
|| (classScope.referenceContext.binding.isAnonymousType() && !classScope.referenceContext.isPurelyCopied))) // do report against non-copied anonymous types
// SH}
@@ -140,14 +140,14 @@ public class MethodDeclaration extends AbstractMethodDeclaration {
// may be in a non necessary <clinit> for innerclass with static final constant fields
if (this.binding.isAbstract() || this.binding.isNative())
return;
-
+
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=385780
if (this.typeParameters != null &&
!this.scope.referenceCompilationUnit().compilationResult.hasSyntaxError) {
for (int i = 0, length = this.typeParameters.length; i < length; ++i) {
TypeParameter typeParameter = this.typeParameters[i];
if ((typeParameter.binding.modifiers & ExtraCompilerModifiers.AccLocallyUsed) == 0) {
- this.scope.problemReporter().unusedTypeParameter(typeParameter);
+ this.scope.problemReporter().unusedTypeParameter(typeParameter);
}
}
}
@@ -215,7 +215,7 @@ public class MethodDeclaration extends AbstractMethodDeclaration {
this.scope.problemReporter().methodCanBePotentiallyDeclaredStatic(this);
}
}
-
+
}
this.scope.checkUnclosedCloseables(flowInfo, null, null/*don't report against a specific location*/, null);
} catch (AbortMethod e) {
@@ -250,10 +250,10 @@ public class MethodDeclaration extends AbstractMethodDeclaration {
annotation.traverse(collector, (BlockScope) null);
}
}
-
+
public boolean hasNullTypeAnnotation(AnnotationPosition position) {
// parser associates SE8 annotations to the declaration
- return TypeReference.containsNullAnnotation(this.annotations) ||
+ return TypeReference.containsNullAnnotation(this.annotations) ||
(this.returnType != null && this.returnType.hasNullTypeAnnotation(position)); // just in case
}
@@ -397,7 +397,7 @@ public class MethodDeclaration extends AbstractMethodDeclaration {
// actually overrides, but did not claim to do so
this.scope.problemReporter().missingOverrideAnnotationForInterfaceMethodImplementation(this);
}
-
+
}
}
else { //For 1.6 and above only
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleDeclaration.java
index 6fa9fab81..e987dde9b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleDeclaration.java
@@ -7,10 +7,10 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
- *
+ *
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.ast;
@@ -277,13 +277,13 @@ public class ModuleDeclaration extends ASTNode implements ReferenceContext {
}
}
this.binding.setUses(allTypes.toArray(new TypeBinding[allTypes.size()]));
-
+
Set<TypeBinding> interfaces = new HashSet<>();
for(int i = 0; i < this.servicesCount; i++) {
this.services[i].resolve(this.scope);
TypeBinding infBinding = this.services[i].serviceInterface.resolvedType;
if (infBinding != null && infBinding.isValidBinding()) {
- if (!interfaces.add(this.services[i].serviceInterface.resolvedType)) {
+ if (!interfaces.add(this.services[i].serviceInterface.resolvedType)) {
cuScope.problemReporter().duplicateTypeReference(IProblem.DuplicateServices,
this.services[i].serviceInterface);
}
@@ -297,7 +297,7 @@ public class ModuleDeclaration extends ASTNode implements ReferenceContext {
analyseModuleGraph(skope);
analyseReferencedPackages(skope);
}
-
+
private void analyseReferencedPackages(CompilationUnitScope skope) {
if (this.exports != null) {
analyseSomeReferencedPackages(this.exports, skope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleReference.java
index 4f9af71dc..c8ebf645c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleReference.java
@@ -7,10 +7,10 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
- *
+ *
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.ast;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleStatement.java
index a53484f63..62c9ac2d6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ModuleStatement.java
@@ -7,10 +7,10 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
- *
+ *
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.ast;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
index 2e2905f47..a750efc9b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
@@ -15,7 +15,7 @@
* Stephan Herrmann - Contribution for
* bug 331649 - [compiler][null] consider null annotations for fields
* Bug 400874 - [1.8][compiler] Inference infrastructure should evolve to meet JLS8 18.x (Part G of JSR335 spec)
- * Bug 426996 - [1.8][inference] try to avoid method Expression.unresolve()?
+ * Bug 426996 - [1.8][inference] try to avoid method Expression.unresolve()?
* Jesper S Moller - Contributions for
* bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
*******************************************************************************/
@@ -84,7 +84,7 @@ public NameReference() {
this.bits |= Binding.TYPE | Binding.VARIABLE; // restrictiveFlag
}
-/**
+/**
* Use this method only when sure that the current reference is <strong>not</strong>
* a chain of several fields (QualifiedNameReference with more than one field).
* Otherwise use {@link #lastFieldBinding()}.
@@ -147,7 +147,7 @@ public abstract String unboundReferenceErrorName();
public abstract char[][] getName();
-/* Called during code generation to ensure that outer locals's effectively finality is guaranteed.
+/* Called during code generation to ensure that outer locals's effectively finality is guaranteed.
Aborts if constraints are violated. Due to various complexities, this check is not conveniently
implementable in resolve/analyze phases.
*/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NullAnnotationMatching.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NullAnnotationMatching.java
index 1054469f7..6a7c7101c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NullAnnotationMatching.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NullAnnotationMatching.java
@@ -51,7 +51,7 @@ import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
* @since 3.10
*/
public class NullAnnotationMatching {
-
+
public static final NullAnnotationMatching NULL_ANNOTATIONS_OK = new NullAnnotationMatching(Severity.OK, FlowInfo.UNKNOWN, null);
public static final NullAnnotationMatching NULL_ANNOTATIONS_OK_NONNULL = new NullAnnotationMatching(Severity.OK, FlowInfo.NON_NULL, null);
public static final NullAnnotationMatching NULL_ANNOTATIONS_UNCHECKED = new NullAnnotationMatching(Severity.UNCHECKED, FlowInfo.UNKNOWN, null);
@@ -74,7 +74,7 @@ public class NullAnnotationMatching {
OVERRIDE_RETURN {
@Override CheckMode toDetail() {
return OVERRIDE;
- }
+ }
},
/** in this mode we do not tolerate incompatibly missing annotations on type parameters (for overriding analysis) */
OVERRIDE {
@@ -85,7 +85,7 @@ public class NullAnnotationMatching {
return OVERRIDE;
}
};
-
+
boolean requiredNullableMatchesAll() {
return false;
}
@@ -111,18 +111,18 @@ public class NullAnnotationMatching {
return severity;
return this;
}
-
+
public boolean isAnyMismatch() {
return compareTo(LEGACY_WARNING) > 0;
}
}
private final Severity severity;
-
+
/** If non-null this field holds the supertype of the provided type which was used for direct matching. */
public final TypeBinding superTypeHint;
public final int nullStatus;
-
+
NullAnnotationMatching(Severity severity, int nullStatus, TypeBinding superTypeHint) {
this.severity = severity;
this.superTypeHint = superTypeHint;
@@ -150,7 +150,7 @@ public class NullAnnotationMatching {
public String superTypeHintName(CompilerOptions options, boolean shortNames) {
return String.valueOf(this.superTypeHint.nullAnnotatedReadableName(options, shortNames));
}
-
+
/** Check null-ness of 'var' against a possible null annotation */
public static int checkAssignment(BlockScope currentScope, FlowContext flowContext,
VariableBinding var, FlowInfo flowInfo, int nullStatus, Expression expression, TypeBinding providedType)
@@ -180,7 +180,7 @@ public class NullAnnotationMatching {
for (int i = 1, l = resExprs.length; i < l; ++i) {
re = resExprs[i];
int otherStatus = NullAnnotationMatching.checkAssignment(currentScope, flowContext, var, flowInfo, re.nullStatus(flowInfo, flowContext), re, re.resolvedType);
- identicalStatus &= status0 == otherStatus;
+ identicalStatus &= status0 == otherStatus;
}
return identicalStatus ? status0 : nullStatus; // if not all branches agree use the precomputed & merged nullStatus
}
@@ -294,7 +294,7 @@ public class NullAnnotationMatching {
long requiredBits = validNullTagBits(requiredDimsTagBits[i]);
long providedBits = validNullTagBits(providedDimsTagBits[i]);
if (i == 0 && requiredBits == TagBits.AnnotationNullable && nullStatus != -1 && mode.requiredNullableMatchesAll()) {
- // toplevel nullable array: no need to check
+ // toplevel nullable array: no need to check
if (nullStatus == FlowInfo.NULL)
break; // null value has no details
} else {
@@ -395,7 +395,7 @@ public class NullAnnotationMatching {
if (method != null && method.isValidBinding()) {
MethodBinding originalMethod = method.original();
TypeBinding originalDeclaringClass = originalMethod.declaringClass;
- if (originalDeclaringClass instanceof BinaryTypeBinding
+ if (originalDeclaringClass instanceof BinaryTypeBinding
&& ((BinaryTypeBinding) originalDeclaringClass).externalAnnotationStatus.isPotentiallyUnannotatedLib()
&& originalMethod.returnType.isTypeVariable()
&& (originalMethod.returnType.tagBits & TagBits.AnnotationNullMASK) == 0)
@@ -462,8 +462,8 @@ public class NullAnnotationMatching {
break;
}
return TagBits.AnnotationNullMASK;
- }
-
+ }
+
if (type.isTypeVariable()) {
// assume we must require @NonNull, unless lower @Nullable bound
// (annotation directly on the TV has already been checked above)
@@ -496,11 +496,11 @@ public class NullAnnotationMatching {
long tagBits = type.tagBits & TagBits.AnnotationNullMASK;
if (tagBits != 0)
return validNullTagBits(tagBits);
-
+
if (type.isWildcard()) { // wildcard can be 'provided' during inheritance checks
return TagBits.AnnotationNullMASK;
}
-
+
if (type.isTypeVariable()) { // incl. captures
TypeVariableBinding typeVariable = (TypeVariableBinding)type;
boolean haveNullBits = false;
@@ -544,7 +544,7 @@ public class NullAnnotationMatching {
bits &= TagBits.AnnotationNullMASK;
return bits == TagBits.AnnotationNullMASK ? 0 : bits;
}
-
+
/** Provided that both types are {@link TypeBinding#equalsEquals}, return the one that is more likely to show null at runtime. */
public static TypeBinding moreDangerousType(TypeBinding one, TypeBinding two) {
if (one == null) return null;
@@ -578,7 +578,7 @@ public class NullAnnotationMatching {
private static Severity computeNullProblemSeverity(long requiredBits, long providedBits, int nullStatus, CheckMode mode, TypeBinding requiredType) {
if (requiredBits == providedBits)
return Severity.OK;
- if (requiredBits == 0) {
+ if (requiredBits == 0) {
switch (mode) {
case EXACT:
if (providedBits == TagBits.AnnotationNonNull && !(requiredType instanceof TypeVariableBinding))
@@ -629,7 +629,7 @@ public class NullAnnotationMatching {
return Severity.UNCHECKED;
return Severity.MISMATCH;
}
-
+
} else if (requiredBits == TagBits.AnnotationNullable) {
switch (mode) {
case COMPATIBLE:
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/PackageVisibilityStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/PackageVisibilityStatement.java
index 1ecfec767..ca132c9b5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/PackageVisibilityStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/PackageVisibilityStatement.java
@@ -7,10 +7,10 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
- *
+ *
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.ast;
@@ -36,7 +36,7 @@ public abstract class PackageVisibilityStatement extends ModuleStatement {
public boolean isQualified() {
return this.targets != null && this.targets.length > 0;
}
-
+
public ModuleReference[] getTargetedModules() {
return this.targets;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
index d4abdf50d..15b3ef042 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
@@ -192,7 +192,7 @@ public class ParameterizedQualifiedTypeReference extends ArrayQualifiedTypeRefer
public TypeReference[][] getTypeArguments() {
return this.typeArguments;
}
-
+
@Override
protected TypeBinding getTypeBinding(Scope scope) {
return null; // not supported here - combined with resolveType(...)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java
index 4a630bebe..e925d3812 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
@@ -102,7 +102,7 @@ public class ParameterizedSingleTypeReference extends ArrayTypeReference {
}
}
}
-
+
@Override
public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation [][] additionalAnnotations, boolean isVarargs) {
int totalDimensions = this.dimensions() + additionalDimensions;
@@ -157,12 +157,12 @@ public class ParameterizedSingleTypeReference extends ArrayTypeReference {
}
return new char[][]{ name };
}
-
+
@Override
public TypeReference[][] getTypeArguments() {
return new TypeReference[][] { this.typeArguments };
}
-
+
/**
* @see org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope)
*/
@@ -170,7 +170,7 @@ public class ParameterizedSingleTypeReference extends ArrayTypeReference {
protected TypeBinding getTypeBinding(Scope scope) {
return null; // not supported here - combined with resolveType(...)
}
-
+
@Override
public boolean isParameterizedTypeReference() {
return true;
@@ -231,7 +231,7 @@ public class ParameterizedSingleTypeReference extends ArrayTypeReference {
if (!seg.isFinal())
scope.problemReporter().anchorPathNotFinal(typeAnchorReference, seg, this.token);
// proceed to possibly report more errors
-
+
// try member type (role) of anchor's type (team):
this.resolvedType = anchor.resolveRoleType(this.token, this.dimensions); // FIXME(SH): although contained in a loop only one anchor can win
if (this.resolvedType == null) {
@@ -253,7 +253,7 @@ public class ParameterizedSingleTypeReference extends ArrayTypeReference {
if (!checkParameterizedRoleVisibility(scope, anchor, (ReferenceBinding) this.resolvedType))
return this.resolvedType;
}
-
+
if ( shouldAnalyzeRoleReference()
&& isIllegalQualifiedUseOfProtectedRole(scope))
return this.resolvedType; // problem binding may be in this.resolvedType
@@ -270,7 +270,7 @@ public class ParameterizedSingleTypeReference extends ArrayTypeReference {
len = this.typeArguments.length-1;
System.arraycopy(this.typeArguments, 1,
this.typeArguments = new TypeReference[len], 0, len); // FIXME(SH): reducing this array conflicts with loop condition
-
+
// note: handling of arrays differs for role and regular types
if (len == 0) {
resolveAnnotations(scope, location);
@@ -331,7 +331,7 @@ public class ParameterizedSingleTypeReference extends ArrayTypeReference {
ReferenceBinding currentType;
if (enclosingType == null) {
//:giro
- if (importScope != null)
+ if (importScope != null)
this.resolvedType = importScope.getType(this.token);
if (this.resolvedType == null || this.resolvedType.problemId() == ProblemReasons.NotFound)
// SH}
@@ -448,7 +448,7 @@ public class ParameterizedSingleTypeReference extends ArrayTypeReference {
if (!isDiamond) { // check arity, IsDiamond never set for 1.6-
scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes);
return null;
- }
+ }
} else if (!currentType.isStatic()) {
ReferenceBinding actualEnclosing = currentType.enclosingType();
if (actualEnclosing != null && actualEnclosing.isRawType()){
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ProvidesStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ProvidesStatement.java
index 8a429ada5..20eae5c1c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ProvidesStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ProvidesStatement.java
@@ -59,7 +59,7 @@ public class ProvidesStatement extends ModuleStatement {
}
int problemId = ProblemReasons.NoError;
ModuleBinding declaringModule = impl.module();
-
+
if (declaringModule != src) {
problemId = IProblem.ServiceImplNotDefinedByModule;
} else if (!impl.isClass() && !impl.isInterface()) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
index bd6a8d938..17f14a4fc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
@@ -107,7 +107,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.RoleTypeCreator;
* + anchor mapping
*
* What: wrap resolvedType if it's a role.
- *
+ *
* This class adds an alternative implementation using a creator call.
* It is in-lined in the original class in order to defer the decision
* whether or not to translate it into a role creator call.
@@ -166,7 +166,7 @@ public class QualifiedAllocationExpression extends AllocationExpression {
// The corresponding problem (when called from static) is not produced until during code generation
}
}
-
+
}
// check captured variables are initialized in current context (26134)
@@ -180,8 +180,8 @@ public class QualifiedAllocationExpression extends AllocationExpression {
// process arguments
if (this.arguments != null) {
boolean analyseResources = currentScope.compilerOptions().analyseResourceLeaks;
- boolean hasResourceWrapperType = analyseResources
- && this.resolvedType instanceof ReferenceBinding
+ boolean hasResourceWrapperType = analyseResources
+ && this.resolvedType instanceof ReferenceBinding
&& ((ReferenceBinding)this.resolvedType).hasTypeBit(TypeIds.BitWrapperCloseable);
for (int i = 0, count = this.arguments.length; i < count; i++) {
flowInfo = this.arguments[i].analyseCode(currentScope, flowContext, flowInfo);
@@ -205,7 +205,7 @@ public class QualifiedAllocationExpression extends AllocationExpression {
if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643, align with javac on JLS 15.12.2.6
thrownExceptions = currentScope.environment().convertToRawTypes(this.binding.thrownExceptions, true, true);
- }
+ }
// check exception handling
flowContext.checkExceptionHandlers(
thrownExceptions,
@@ -517,7 +517,7 @@ public class QualifiedAllocationExpression extends AllocationExpression {
}
return result;
}
-
+
private TypeBinding resolveTypeForQualifiedAllocationExpression(BlockScope scope) {
// Propagate the type checking to the arguments, and checks if the constructor is defined.
// ClassInstanceCreationExpression ::= Primary '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
@@ -708,7 +708,7 @@ public class QualifiedAllocationExpression extends AllocationExpression {
scope.problemReporter().diamondNotWithAnoymousClasses(this.type);
return null;
}
- }
+ }
ReferenceBinding superType = (ReferenceBinding) receiverType;
if (superType.isTypeVariable()) {
superType = new ProblemReferenceBinding(new char[][]{superType.sourceName()}, superType, ProblemReasons.IllegalSuperTypeVariable);
@@ -834,7 +834,7 @@ public class QualifiedAllocationExpression extends AllocationExpression {
}
this.enclosingInstance.computeConversion(scope, targetEnclosing, enclosingInstanceType);
}
- if (!isDiamond && receiverType.isParameterizedTypeWithActualArguments() &&
+ if (!isDiamond && receiverType.isParameterizedTypeWithActualArguments() &&
(this.anonymousType == null || sourceLevel >= ClassFileConstants.JDK9)) {
checkTypeArgumentRedundancy((ParameterizedTypeBinding) receiverType, scope);
}
@@ -894,7 +894,7 @@ public class QualifiedAllocationExpression extends AllocationExpression {
return this.noErrors;
}
}
-
+
return new ValidityInspector().isValid();
}
private MethodBinding getAnonymousConstructorBinding(ReferenceBinding receiverType, BlockScope scope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
index e062d288b..e09bdcb43 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
@@ -476,7 +476,7 @@ public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeS
boolean isFirst = lastFieldBinding == this.binding
&& (this.indexOfFirstFieldBinding == 1 || TypeBinding.equalsEquals(lastFieldBinding.declaringClass, currentScope.enclosingReceiverType()))
&& this.otherBindings == null; // could be dup: next.next.next
- TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, getFinalReceiverType(), isFirst);
+ TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, getFinalReceiverType(), isFirst);
SyntheticMethodBinding accessor = this.syntheticReadAccessors == null ? null : this.syntheticReadAccessors[this.syntheticReadAccessors.length - 1];
if (lastFieldBinding.isStatic()) {
if (accessor == null) {
@@ -530,7 +530,7 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
boolean isFirst = lastFieldBinding == this.binding
&& (this.indexOfFirstFieldBinding == 1 || TypeBinding.equalsEquals(lastFieldBinding.declaringClass, currentScope.enclosingReceiverType()))
&& this.otherBindings == null; // could be dup: next.next.next
- TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, getFinalReceiverType(), isFirst);
+ TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, getFinalReceiverType(), isFirst);
SyntheticMethodBinding accessor = this.syntheticReadAccessors == null
? null
: this.syntheticReadAccessors[this.syntheticReadAccessors.length - 1];
@@ -555,7 +555,7 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
operandType = requiredGenericCast;
} else {
operandType = lastFieldBinding.type;
- }
+ }
// duplicate the old field value
if (valueRequired) {
if (lastFieldBinding.isStatic()) {
@@ -567,7 +567,7 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
default:
codeStream.dup();
break;
- }
+ }
} else { // Stack: [owner][old field value] ---> [old field value][owner][old field value]
switch (operandType.id) {
case TypeIds.T_long :
@@ -577,10 +577,10 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
default:
codeStream.dup_x1();
break;
- }
+ }
}
}
- codeStream.generateImplicitConversion(this.implicitConversion);
+ codeStream.generateImplicitConversion(this.implicitConversion);
codeStream.generateConstant(
postIncrement.expression.constant,
this.implicitConversion);
@@ -759,7 +759,7 @@ protected TypeBinding getFinalReceiverType() {
default:
TypeBinding previousGenericCast = this.otherGenericCasts == null ? null : this.otherGenericCasts[otherBindingsCount-2];
return previousGenericCast != null ? previousGenericCast : this.otherBindings[otherBindingsCount-2].type;
- }
+ }
}
// get the matching generic cast
@@ -814,7 +814,7 @@ public TypeBinding getOtherFieldBindings(BlockScope scope) {
FieldBinding originalBinding = previousField.original();
if (TypeBinding.notEquals(fieldReceiverType, oldReceiverType) || originalBinding.type.leafComponentType().isTypeVariable()) { // record need for explicit cast at codegen
setGenericCast(index-1,originalBinding.type.genericCast(fieldReceiverType)); // type cannot be base-type even in boxing case
- }
+ }
}
// only last field is actually a write access if any
if (isFieldUseDeprecated(field, scope, index+1 == length ? this.bits : 0)) {
@@ -837,7 +837,7 @@ public TypeBinding getOtherFieldBindings(BlockScope scope) {
&& field.id >= methodScope.lastVisibleFieldID
&& (!field.isStatic() || methodScope.isStatic)) {
scope.problemReporter().forwardReference(this, index, field);
- }
+ }
// check if accessing enum static field in initializer
if ((TypeBinding.equalsEquals(sourceType, declaringClass) || TypeBinding.equalsEquals(sourceType.superclass, declaringClass)) // enum constant body
&& field.constant(scope) == Constant.NotAConstant
@@ -898,8 +898,8 @@ public TypeBinding getOtherFieldBindings(BlockScope scope) {
if ( !scope.isGeneratedScope() // wrapping types breaks cast methods for nested roles (see http://trac.objectteams.org/ot/changeset/5348)
|| CharOperation.equals(IOTConstants._OT_BASE, this.tokens[0])) // direct callout-set-to-field needs wrapping (see test3317_multipleCalloutToSameField2)
{
- final BlockScope theScope = scope;
- type = RoleTypeCreator.deepSubstitute(type, scope.environment(),
+ final BlockScope theScope = scope;
+ type = RoleTypeCreator.deepSubstitute(type, scope.environment(),
new IDependentTypeSubstitution() {
@Override
public TypeBinding substitute(DependentTypeBinding original, TypeBinding[] typeArguments, int dimensions) {
@@ -957,7 +957,7 @@ private void accessAsCalloutToField(BlockScope scope, ReferenceBinding enclosing
SyntheticMethodBinding accessor = (strategy == ImplementationStrategy.DYN_ACCESS)
? new SyntheticOTTargetMethod.OTDREFieldDecapsulation(fakedAccessorBinding, baseclassField.type, accessid, 0/*get*/, scope, this)
: new SyntheticOTTargetMethod.CalloutToField(fakedAccessorBinding);
-
+
// convert to a synthetic method that generateCode can use:
setSyntheticAccessor(baseclassField, idx, accessor);
}
@@ -996,7 +996,7 @@ public boolean isFieldAccess() {
@Override
public FieldBinding lastFieldBinding() {
if (this.otherBindings != null) {
- return this.otherBindings[this.otherBindings.length - 1];
+ return this.otherBindings[this.otherBindings.length - 1];
} else if (this.binding != null && (this.bits & RestrictiveFlagMASK) == Binding.FIELD) {
return (FieldBinding) this.binding;
}
@@ -1063,8 +1063,8 @@ public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FieldBindi
int prevIndex = Math.abs(index) - 1;
boolean isExternalRoleAccess = false;
if (prevIndex >= 0) { // after the first dot, check if previous segment was an anchored type
- TypeBinding receiverType = prevIndex == 0
- ? ((VariableBinding)this.binding).type
+ TypeBinding receiverType = prevIndex == 0
+ ? ((VariableBinding)this.binding).type
: this.otherBindings[prevIndex-1].type;
isExternalRoleAccess = RoleTypeBinding.isRoleWithExplicitAnchor(receiverType);
}
@@ -1225,7 +1225,7 @@ public TypeBinding resolveType(BlockScope scope) {
this.bits &= ~ASTNode.RestrictiveFlagMASK; // clear bits
this.bits |= Binding.LOCAL;
LocalVariableBinding local = (LocalVariableBinding) this.binding;
- if (!local.isFinal() && (this.bits & ASTNode.IsCapturedOuterLocal) != 0) {
+ if (!local.isFinal() && (this.bits & ASTNode.IsCapturedOuterLocal) != 0) {
if (scope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_8) // for 8, defer till effective finality could be ascertained.
scope.problemReporter().cannotReferToNonFinalOuterLocal((LocalVariableBinding) this.binding, this);
}
@@ -1263,7 +1263,7 @@ public TypeBinding resolveType(BlockScope scope) {
}
}
if (isFieldUseDeprecated(fieldBinding, scope, this.indexOfFirstFieldBinding == this.tokens.length ? this.bits : 0)) {
- scope.problemReporter().deprecatedField(fieldBinding, this);
+ scope.problemReporter().deprecatedField(fieldBinding, this);
}
if (fieldBinding.isStatic()) {
// only last field is actually a write access if any
@@ -1280,7 +1280,7 @@ public TypeBinding resolveType(BlockScope scope) {
&& TypeBinding.notEquals(fieldBinding.declaringClass, this.actualReceiverType)
&& fieldBinding.declaringClass.canBeSeenBy(scope)) {
scope.problemReporter().indirectAccessToStaticField(this, fieldBinding);
- }
+ }
} else {
boolean inStaticContext = scope.methodScope().isStatic;
if (this.indexOfFirstFieldBinding == 1) {
@@ -1298,7 +1298,7 @@ public TypeBinding resolveType(BlockScope scope) {
return null;
}
}
-
+
this.resolvedType = getOtherFieldBindings(scope);
if (this.resolvedType != null
&& (this.resolvedType.tagBits & TagBits.HasMissingType) != 0) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedSuperReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedSuperReference.java
index edc4c8f15..286fe9191 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedSuperReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedSuperReference.java
@@ -95,7 +95,7 @@ int findCompatibleEnclosing(ReferenceBinding enclosingType, TypeBinding type, Bl
compoundName = supers[i].compoundName;
if (closestMatch == null)
closestMatch = supers[i];
- // keep looking to ensure we always find the referenced type (even if illegal)
+ // keep looking to ensure we always find the referenced type (even if illegal)
}
}
if (!isLegal || !isJava8) {
@@ -104,7 +104,7 @@ int findCompatibleEnclosing(ReferenceBinding enclosingType, TypeBinding type, Bl
// we use the problem's compoundName to report the type being illegally bypassed,
// whereas the closestMatch denotes the resolved (though illegal) target type
// for downstream resolving.
- this.resolvedType = new ProblemReferenceBinding(compoundName,
+ this.resolvedType = new ProblemReferenceBinding(compoundName,
closestMatch, isJava8 ? ProblemReasons.AttemptToBypassDirectSuper : ProblemReasons.InterfaceMethodInvocationNotBelow18);
}
return 0; // never an outer enclosing type
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java
index b5f9e75c9..a75af4944 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java
@@ -153,7 +153,7 @@ public class QualifiedThisReference extends ThisReference {
if (depth == 0) {
checkAccess(scope, null);
} // if depth>0, path emulation will diagnose bad scenarii
-
+
MethodScope methodScope = scope.namedMethodScope();
if (methodScope != null) {
MethodBinding method = methodScope.referenceMethodBinding();
@@ -162,7 +162,7 @@ public class QualifiedThisReference extends ThisReference {
while (receiver != null) {
if (TypeBinding.equalsEquals(receiver, this.resolvedType))
return this.resolvedType = receiver;
- receiver = receiver.enclosingType();
+ receiver = receiver.enclosingType();
}
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
index d3d2ae81c..7604af30f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
@@ -196,7 +196,7 @@ public class QualifiedTypeReference extends TypeReference {
}
PackageBinding packageBinding = binding == null ? null : (PackageBinding) binding;
int typeStart = packageBinding == null ? 0 : packageBinding.compoundName.length;
-
+
if (packageBinding != null) {
PackageBinding uniquePackage = packageBinding.getVisibleFor(scope.module(), false);
if (uniquePackage instanceof SplitPackageBinding) {
@@ -272,7 +272,7 @@ public class QualifiedTypeReference extends TypeReference {
}
//{ObjectTeams: overridable hook for above
protected void reportDeprecatedPathSyntax(Scope scope) {
- scope.problemReporter().deprecatedPathSyntax(this);
+ scope.problemReporter().deprecatedPathSyntax(this);
}
// SH}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Receiver.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Receiver.java
index dce07d32d..739888691 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Receiver.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Receiver.java
@@ -24,7 +24,7 @@ public class Receiver extends Argument {
public boolean isReceiver() {
return true;
}
-
+
@Override
public StringBuffer print(int indent, StringBuffer output) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/RecordDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/RecordDeclaration.java
index cb94f7680..37470c238 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/RecordDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/RecordDeclaration.java
@@ -107,7 +107,7 @@ public class RecordDeclaration extends TypeDeclaration {
}
}
/* At this point we can only say that there is high possibility that there is a constructor
- * If it is a CCD, then definitely it is there (except for empty one); else we need to check
+ * If it is a CCD, then definitely it is there (except for empty one); else we need to check
* the bindings to say that there is a canonical constructor. To take care at binding resolution time.
*/
return null;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java
index 43ed61877..b1f7c17d0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java
@@ -18,7 +18,7 @@
* bug 331649 - [compiler][null] consider null annotations for fields
* bug 383368 - [compiler][null] syntactic null analysis for field references
* bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
- * Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ * Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
* Bug 411964 - [1.8][null] leverage null type annotation in foreach statement
* Bug 407414 - [compiler][null] Incorrect warning on a primitive type being null
*******************************************************************************/
@@ -49,7 +49,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.model.TeamModel;
*
* What: support notion of expected type
* Why: inferred callout to field must be created with proper type, possibly involving lifting.
- *
+ *
* @author stephan
*/
public abstract class Reference extends Expression {
@@ -89,7 +89,7 @@ protected boolean checkNullableFieldDereference(Scope scope, FieldBinding field,
if ((field.type.tagBits & TagBits.AnnotationNullable) != 0) {
scope.problemReporter().dereferencingNullableExpression(sourcePosition, scope.environment());
return true;
- }
+ }
if (field.type.isFreeTypeVariable()) {
scope.problemReporter().fieldFreeTypeVariableReference(field, sourcePosition);
return true;
@@ -117,7 +117,7 @@ public void fieldStore(Scope currentScope, CodeStream codeStream, FieldBinding f
case TypeIds.T_double :
codeStream.dup2();
break;
- default :
+ default :
codeStream.dup();
break;
}
@@ -135,7 +135,7 @@ public void fieldStore(Scope currentScope, CodeStream codeStream, FieldBinding f
case TypeIds.T_double :
codeStream.dup2_x1();
break;
- default :
+ default :
codeStream.dup_x1();
break;
}
@@ -156,8 +156,8 @@ public abstract void generateCompoundAssignment(BlockScope currentScope, CodeStr
public abstract void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired);
-/**
- * Is the given reference equivalent to the receiver,
+/**
+ * Is the given reference equivalent to the receiver,
* meaning that both denote the same path of field reads?
* Used from {@link FlowContext#isNullcheckedFieldAccess(Reference)}.
*/
@@ -205,7 +205,7 @@ void reportOnlyUselesslyReadPrivateField(BlockScope currentScope, FieldBinding f
if (fieldBinding.isUsedOnlyInCompound()) {
fieldBinding.compoundUseFlag--; // consume one
if (fieldBinding.compoundUseFlag == 0 // report only the last usage
- && fieldBinding.isOrEnclosedByPrivateType()
+ && fieldBinding.isOrEnclosedByPrivateType()
&& (this.implicitConversion & TypeIds.UNBOXING) == 0) // don't report if unboxing is involved (might cause NPE)
{
// compoundAssignment/postIncrement is the only usage of this field
@@ -240,14 +240,14 @@ static void reportOnlyUselesslyReadLocal(BlockScope currentScope, LocalVariableB
MethodScope methodScope = currentScope.methodScope();
if (methodScope != null && !methodScope.isLambdaScope()) { // lambda must be congruent with the descriptor.
MethodBinding method = ((AbstractMethodDeclaration)methodScope.referenceContext()).binding;
-
+
boolean shouldReport = !method.isMain();
if (method.isImplementing()) {
shouldReport &= currentScope.compilerOptions().reportUnusedParameterWhenImplementingAbstract;
} else if (method.isOverriding()) {
shouldReport &= currentScope.compilerOptions().reportUnusedParameterWhenOverridingConcrete;
}
-
+
if (shouldReport) {
// report the case of an argument that is unread except through a special operator
currentScope.problemReporter().unusedArgument(localBinding.declaration);
@@ -281,8 +281,8 @@ protected int getDepthForSynthFieldAccess(FieldBinding fieldBinding, SourceTypeB
}
return depth;
}
-/**
- * If this reference is an inferred call to a c-t-f to static, synthetic args (int,Team) must be generated.
+/**
+ * If this reference is an inferred call to a c-t-f to static, synthetic args (int,Team) must be generated.
* @return true if synthetic args have been generated
*/
protected boolean checkGeneratedSynthArgsForFieldAccess(MethodBinding[] accessors, CodeStream codeStream, BlockScope scope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
index bec3ac776..bf1eb632f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
@@ -15,7 +15,7 @@
* Bug 384687 - [1.8] Wildcard type arguments should be rejected for lambda and reference expressions
* Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit)
* Stephan Herrmann - Contribution for
- * bug 402028 - [1.8][compiler] null analysis for reference expressions
+ * bug 402028 - [1.8][compiler] null analysis for reference expressions
* bug 404649 - [1.8][compiler] detect illegal reference to indirect or redundant super via I.super.m() syntax
* Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
* Bug 415850 - [1.8] Ensure RunJDTCoreTests can cope with null annotations enabled
@@ -106,14 +106,14 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
public Expression lhs;
public TypeReference [] typeArguments;
public char [] selector;
-
+
public int nameSourceStart;
public TypeBinding receiverType;
public boolean haveReceiver;
public TypeBinding[] resolvedTypeArguments;
private boolean typeArgumentsHaveErrors;
-
+
MethodBinding syntheticAccessor; // synthetic accessor for inner-emulation
private int depth;
private MethodBinding exactMethodBinding; // != null ==> exact method reference.
@@ -128,14 +128,14 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
// the scanner used when creating this expression, may be a RecoveryScanner (with proper RecoveryScannerData),
// need to keep it so copy() can parse in the same mode (normal/recovery):
- private Scanner scanner;
-
+ private Scanner scanner;
+
public ReferenceExpression(Scanner scanner) {
super();
this.original = this;
this.scanner = scanner;
}
-
+
public void initialize(CompilationResult result, Expression expression, TypeReference [] optionalTypeArguments, char [] identifierOrNew, int sourceEndPosition) {
super.setCompilationResult(result);
this.lhs = expression;
@@ -144,20 +144,20 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
this.sourceStart = expression.sourceStart;
this.sourceEnd = sourceEndPosition;
}
-
+
private ReferenceExpression copy() {
final Parser parser = new Parser(this.enclosingScope.problemReporter(), false);
final ICompilationUnit compilationUnit = this.compilationResult.getCompilationUnit();
final char[] source = compilationUnit != null ? compilationUnit.getContents() : this.text;
parser.scanner = this.scanner;
- ReferenceExpression copy = (ReferenceExpression) parser.parseExpression(source, compilationUnit != null ? this.sourceStart : 0, this.sourceEnd - this.sourceStart + 1,
+ ReferenceExpression copy = (ReferenceExpression) parser.parseExpression(source, compilationUnit != null ? this.sourceStart : 0, this.sourceEnd - this.sourceStart + 1,
this.enclosingScope.referenceCompilationUnit(), false /* record line separators */);
copy.original = this;
copy.sourceStart = this.sourceStart;
copy.sourceEnd = this.sourceEnd;
return copy;
}
-
+
private boolean shouldGenerateSecretReceiverVariable() {
if (isMethodReference() && this.haveReceiver) {
if (this.lhs instanceof Invocation)
@@ -188,11 +188,11 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
return false;
}
public void generateImplicitLambda(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
-
+
ReferenceExpression copy = copy();
-
+
int argc = this.descriptor.parameters.length;
-
+
LambdaExpression implicitLambda = new LambdaExpression(this.compilationResult, false, (this.binding.modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0);
Argument [] arguments = new Argument[argc];
for (int i = 0; i < argc; i++)
@@ -200,7 +200,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
implicitLambda.setArguments(arguments);
implicitLambda.setExpressionContext(this.expressionContext);
implicitLambda.setExpectedType(this.expectedType);
-
+
int parameterShift = this.receiverPrecedesParameters ? 1 : 0;
Expression [] argv = new SingleNameReference[argc - parameterShift];
for (int i = 0, length = argv.length; i < length; i++) {
@@ -217,7 +217,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
MessageSend message = new MessageSend();
message.selector = this.selector;
Expression receiver = generateSecretReceiverVariable ? new SingleNameReference(this.receiverVariable.name, 0) : copy.lhs;
- message.receiver = this.receiverPrecedesParameters ?
+ message.receiver = this.receiverPrecedesParameters ?
new SingleNameReference(CharOperation.append(ImplicitArgName, Integer.toString(0).toCharArray()), 0) : receiver;
message.typeArguments = copy.typeArguments;
message.arguments = argv;
@@ -228,12 +228,12 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
arrayAllocationExpression.dimensions = new Expression[] { argv[0] };
if (this.lhs instanceof ArrayTypeReference) {
ArrayTypeReference arrayTypeReference = (ArrayTypeReference) this.lhs;
- arrayAllocationExpression.type = arrayTypeReference.dimensions == 1 ? new SingleTypeReference(arrayTypeReference.token, 0L) :
+ arrayAllocationExpression.type = arrayTypeReference.dimensions == 1 ? new SingleTypeReference(arrayTypeReference.token, 0L) :
new ArrayTypeReference(arrayTypeReference.token, arrayTypeReference.dimensions - 1, 0L);
} else {
ArrayQualifiedTypeReference arrayQualifiedTypeReference = (ArrayQualifiedTypeReference) this.lhs;
arrayAllocationExpression.type = arrayQualifiedTypeReference.dimensions == 1 ? new QualifiedTypeReference(arrayQualifiedTypeReference.tokens, arrayQualifiedTypeReference.sourcePositions)
- : new ArrayQualifiedTypeReference(arrayQualifiedTypeReference.tokens, arrayQualifiedTypeReference.dimensions - 1,
+ : new ArrayQualifiedTypeReference(arrayQualifiedTypeReference.tokens, arrayQualifiedTypeReference.dimensions - 1,
arrayQualifiedTypeReference.sourcePositions);
}
implicitLambda.setBody(arrayAllocationExpression);
@@ -252,14 +252,14 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
allocation.arguments = argv;
implicitLambda.setBody(allocation);
}
-
+
// Process the lambda, taking care not to double report diagnostics. Don't expect any from resolve, Any from code generation should surface, but not those from flow analysis.
BlockScope lambdaScope = this.receiverVariable != null ? this.receiverVariable.declaringScope : currentScope;
IErrorHandlingPolicy oldPolicy = lambdaScope.problemReporter().switchErrorHandlingPolicy(silentErrorHandlingPolicy);
try {
implicitLambda.resolveType(lambdaScope, true);
- implicitLambda.analyseCode(lambdaScope,
- new FieldInitsFakingFlowContext(null, this, Binding.NO_EXCEPTIONS, null, lambdaScope, FlowInfo.DEAD_END),
+ implicitLambda.analyseCode(lambdaScope,
+ new FieldInitsFakingFlowContext(null, this, Binding.NO_EXCEPTIONS, null, lambdaScope, FlowInfo.DEAD_END),
UnconditionalFlowInfo.fakeInitializedFlowInfo(lambdaScope.outerMostMethodScope().analysisIndex, lambdaScope.referenceType().maxFieldCount));
} finally {
lambdaScope.problemReporter().switchErrorHandlingPolicy(oldPolicy);
@@ -267,16 +267,16 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
SyntheticArgumentBinding[] outerLocals = this.receiverType.syntheticOuterLocalVariables();
for (int i = 0, length = outerLocals == null ? 0 : outerLocals.length; i < length; i++)
implicitLambda.addSyntheticArgument(outerLocals[i].actualOuterLocalVariable);
-
+
implicitLambda.generateCode(lambdaScope, codeStream, valueRequired);
if (generateSecretReceiverVariable) {
codeStream.removeVariable(this.receiverVariable);
}
- }
-
+ }
+
private boolean shouldGenerateImplicitLambda(BlockScope currentScope) {
- // these cases are either too complicated, impossible to handle or result in significant code duplication
- return (this.binding.isVarargs() ||
+ // these cases are either too complicated, impossible to handle or result in significant code duplication
+ return (this.binding.isVarargs() ||
(isConstructorReference() && this.receiverType.syntheticOuterLocalVariables() != null && this.shouldCaptureInstance) ||
this.requiresBridges() || // bridges.
!isDirectCodeGenPossible());
@@ -304,7 +304,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
for (int i = 0; i < descriptorParams.length - offset; i++) {
TypeBinding descType = descriptorParams[i + offset];
TypeBinding origDescType = origDescParams[i + offset];
- if (descType.isIntersectionType18() ||
+ if (descType.isIntersectionType18() ||
(descType.isTypeVariable() && ((TypeVariableBinding) descType).boundsCount() > 1)) {
return CharOperation.equals(origDescType.signature(), origParams[i].signature());
}
@@ -331,7 +331,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
} else if (this.syntheticAccessor != null) {
if (this.lhs.isSuper() || isMethodReference())
this.binding = this.syntheticAccessor;
- } else { // cf. MessageSend.generateCode()'s call to CodeStream.getConstantPoolDeclaringClass. We have extracted the relevant portions sans side effect here.
+ } else { // cf. MessageSend.generateCode()'s call to CodeStream.getConstantPoolDeclaringClass. We have extracted the relevant portions sans side effect here.
if (this.binding != null && isMethodReference()) {
if (TypeBinding.notEquals(this.binding.declaringClass, this.lhs.resolvedType.erasure())) {
if (!this.binding.declaringClass.canBeSeenBy(currentScope)) {
@@ -362,7 +362,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
} else {
buffer.append(((QualifiedSuperReference) this.lhs).currentCompatibleType.signature());
}
- } else {
+ } else {
buffer.append(sourceType.signature());
}
} else {
@@ -409,13 +409,13 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
sourceType.addSyntheticMethod(this);
}
int invokeDynamicNumber = codeStream.classFile.recordBootstrapMethod(this);
- codeStream.invokeDynamic(invokeDynamicNumber, argumentsSize, 1, this.descriptor.selector, buffer.toString().toCharArray(),
+ codeStream.invokeDynamic(invokeDynamicNumber, argumentsSize, 1, this.descriptor.selector, buffer.toString().toCharArray(),
this.isConstructorReference(), (this.lhs instanceof TypeReference? (TypeReference) this.lhs : null), this.typeArguments);
if (!valueRequired)
codeStream.pop();
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
-
+
@Override
public void cleanUp() {
// no more rescanning needed beyond this point, so free the memory:
@@ -431,16 +431,16 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
}
public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
-
- if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0 || this.binding == null || !this.binding.isValidBinding())
+
+ if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0 || this.binding == null || !this.binding.isValidBinding())
return;
-
+
MethodBinding codegenBinding = this.binding.original();
if (codegenBinding.isVarargs())
return; // completely managed by transforming into implicit lambda expression.
-
+
SourceTypeBinding enclosingSourceType = currentScope.enclosingSourceType();
-
+
if (this.isConstructorReference()) {
ReferenceBinding allocatedType = codegenBinding.declaringClass;
if (codegenBinding.isPrivate() &&
@@ -458,7 +458,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
}
return;
}
-
+
// ----------------------------------- Only method references from now on -----------
if (this.binding.isPrivate()) {
if (TypeBinding.notEquals(enclosingSourceType, codegenBinding.declaringClass)){
@@ -467,7 +467,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
}
return;
}
-
+
if (this.lhs.isSuper()) {
SourceTypeBinding destinationType = enclosingSourceType;
if (this.lhs instanceof QualifiedSuperReference) { // qualified super
@@ -476,12 +476,12 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
if (!qualification.resolvedType.isInterface()) // we can't drop the bridge in I, it may not even be a source type.
destinationType = (SourceTypeBinding) (qualifiedSuperReference.currentCompatibleType);
}
-
+
this.syntheticAccessor = destinationType.addSyntheticMethod(codegenBinding, true);
currentScope.problemReporter().needToEmulateMethodAccess(codegenBinding, this);
return;
}
-
+
if (this.binding.isProtected() && (this.bits & ASTNode.DepthMASK) != 0 && codegenBinding.declaringClass.getPackage() != enclosingSourceType.getPackage()) {
SourceTypeBinding currentCompatibleType = (SourceTypeBinding) enclosingSourceType.enclosingTypeAt((this.bits & ASTNode.DepthMASK) >> ASTNode.DepthSHIFT);
this.syntheticAccessor = currentCompatibleType.addSyntheticMethod(codegenBinding, isSuperAccess());
@@ -489,7 +489,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
return;
}
}
-
+
@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// static methods with receiver value never get here
@@ -532,10 +532,10 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
if (argumentCheck != null && argumentCheck.isDangerous(currentScope)) {
currentScope.problemReporter().unlikelyArgumentType(this, this.binding, argumentType2,
argumentCheck.typeToReport, argumentCheck.dangerousMethod);
- }
+ }
}
}
-
+
if (currentScope.compilerOptions().analyseResourceLeaks) {
if (this.haveReceiver && CharOperation.equals(this.selector, TypeConstants.CLOSE)) {
FakedTrackingVariable trackingVariable = FakedTrackingVariable.getCloseTrackingVariable(this.lhs, flowInfo, flowContext);
@@ -552,16 +552,16 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
public boolean checkingPotentialCompatibility() {
return this.checkingPotentialCompatibility;
}
-
+
@Override
public void acceptPotentiallyCompatibleMethods(MethodBinding[] methods) {
if (this.checkingPotentialCompatibility)
this.potentialMethods = methods;
}
-
+
@Override
public TypeBinding resolveType(BlockScope scope) {
-
+
final CompilerOptions compilerOptions = scope.compilerOptions();
TypeBinding lhsType;
if (this.constant != Constant.NotAConstant) {
@@ -595,12 +595,12 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
}
if (this.typeArgumentsHaveErrors || lhsType == null)
return this.resolvedType = null;
-
+
if (lhsType.problemId() == ProblemReasons.AttemptToBypassDirectSuper)
lhsType = lhsType.closestMatch(); // improve resolving experience
- if (lhsType == null || !lhsType.isValidBinding())
+ if (lhsType == null || !lhsType.isValidBinding())
return this.resolvedType = null; // nope, no useful type found
-
+
this.receiverType = lhsType;
this.haveReceiver = true;
if (this.lhs instanceof NameReference) {
@@ -626,7 +626,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
scope.problemReporter().cannotInstantiate(this.lhs, lhsType);
return this.resolvedType = null;
}
-
+
if (this.lhs instanceof TypeReference && ((TypeReference)this.lhs).hasNullTypeAnnotation(AnnotationPosition.ANY)) {
scope.problemReporter().nullAnnotationUnsupportedLocation((TypeReference) this.lhs);
}
@@ -667,30 +667,30 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
super.resolveType(scope);
- /* For Reference expressions unlike other call sites, we always have a receiver _type_ since LHS of :: cannot be empty.
+ /* For Reference expressions unlike other call sites, we always have a receiver _type_ since LHS of :: cannot be empty.
LHS's resolved type == actual receiver type. All code below only when a valid descriptor is available.
*/
if (this.descriptor == null || !this.descriptor.isValidBinding())
return this.resolvedType = null;
-
+
// Convert parameters into argument expressions for look up.
TypeBinding[] descriptorParameters = descriptorParametersAsArgumentExpressions();
-
+
if (lhsType.isBaseType()) {
scope.problemReporter().errorNoMethodFor(this.lhs, lhsType, this.selector, descriptorParameters);
return this.resolvedType = null;
}
-
+
/* 15.13: "If a method reference expression has the form super :: [TypeArguments] Identifier or TypeName . super :: [TypeArguments] Identifier,
it is a compile-time error if the expression occurs in a static context. ": This is nop since the primary when it resolves
itself will complain automatically.
-
- 15.13: "The immediately enclosing instance of an inner class instance (15.9.2) must be provided for a constructor reference by a lexically
+
+ 15.13: "The immediately enclosing instance of an inner class instance (15.9.2) must be provided for a constructor reference by a lexically
enclosing instance of this (8.1.3)", we will actually implement this check in code generation. Emulation path computation will fail if there
- is no suitable enclosing instance. While this could be pulled up to here, leaving it to code generation is more consistent with Java 5,6,7
+ is no suitable enclosing instance. While this could be pulled up to here, leaving it to code generation is more consistent with Java 5,6,7
modus operandi.
*/
-
+
// handle the special case of array construction first.
final int parametersLength = descriptorParameters.length;
if (isConstructorReference() && lhsType.isArrayType()) {
@@ -728,7 +728,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
return this.resolvedType = null;
}
}
-
+
if (this.lhs.isSuper() && this.lhs.resolvedType.isInterface()) {
scope.checkAppropriateMethodAgainstSupers(this.selector, someMethod, this.descriptor.parameters, this);
}
@@ -756,12 +756,12 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
this.depth = 0;
}
}
-
+
if (someMethod != null && someMethod.isValidBinding() && someMethod.isStatic() && anotherMethod != null && anotherMethod.isValidBinding() && !anotherMethod.isStatic()) {
scope.problemReporter().methodReferenceSwingsBothWays(this, anotherMethod, someMethod);
return this.resolvedType = null;
}
-
+
if (someMethod != null && someMethod.isValidBinding() && (anotherMethod == null || !anotherMethod.isValidBinding() || anotherMethod.isStatic())) {
this.binding = someMethod;
this.bits &= ~ASTNode.DepthMASK;
@@ -773,7 +773,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
scope.problemReporter().methodMustBeAccessedWithInstance(this, someMethod);
return this.resolvedType = null;
}
- }
+ }
} else if (anotherMethod != null && anotherMethod.isValidBinding() && (someMethod == null || !someMethod.isValidBinding() || !someMethod.isStatic())) {
this.binding = anotherMethod;
this.receiverPrecedesParameters = true; // 0 is receiver, real parameters start at 1
@@ -795,12 +795,12 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
scope.problemReporter().danglingReference(this, this.receiverType, visibleName, descriptorParameters);
return this.resolvedType = null;
}
-
+
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=382350#c2, I.super::abstractMethod will be handled there.
if (this.binding.isAbstract() && this.lhs.isSuper())
scope.problemReporter().cannotDireclyInvokeAbstractMethod(this, this.binding);
-
+
if (this.binding.isStatic()) {
if (TypeBinding.notEquals(this.binding.declaringClass, this.receiverType))
scope.problemReporter().indirectAccessToStaticMethod(this, this.binding);
@@ -809,16 +809,16 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
if (srcMethod != null && srcMethod.isMethod())
srcMethod.bits &= ~ASTNode.CanBeStatic;
}
-
+
if (isMethodUseDeprecated(this.binding, scope, true, this))
scope.problemReporter().deprecatedMethod(this.binding, this);
if (this.typeArguments != null && this.binding.original().typeVariables == Binding.NO_TYPE_VARIABLES)
scope.problemReporter().unnecessaryTypeArgumentsForMethodInvocation(this.binding, this.resolvedTypeArguments, this.typeArguments);
-
+
if ((this.binding.tagBits & TagBits.HasMissingType) != 0)
scope.problemReporter().missingTypeInMethod(this, this.binding);
-
+
// OK, we have a compile time declaration, see if it passes muster.
TypeBinding [] methodExceptions = this.binding.thrownExceptions;
@@ -835,7 +835,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
}
checkNullAnnotations(scope);
this.freeParameters = null; // not used after method lookup
-
+
if (checkInvocationArguments(scope, null, this.receiverType, this.binding, null, descriptorParameters, false, this))
this.bits |= ASTNode.Unchecked;
@@ -886,7 +886,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
final TypeBinding receiver = scope.environment().createAnnotatedType(this.binding.declaringClass,
new AnnotationBinding[] { scope.environment().getNonNullAnnotation() });
scope.problemReporter().referenceExpressionArgumentNullityMismatch(this, receiver, descriptorParameter, this.descriptor, -1, NullAnnotationMatching.NULL_ANNOTATIONS_MISMATCH);
- }
+ }
}
boolean isVarArgs = false;
if (this.binding.isVarargs()) {
@@ -929,10 +929,10 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
}
private TypeBinding[] descriptorParametersAsArgumentExpressions() {
-
+
if (this.descriptor == null || this.descriptor.parameters == null || this.descriptor.parameters.length == 0)
return Binding.NO_PARAMETERS;
-
+
/* 15.13.1, " ... method reference is treated as if it were an invocation with argument expressions of types P1, ..., Pn;"
This implies/requires wildcard capture. This creates interesting complications, we can't just take the descriptor parameters
and apply captures - where a single wildcard type got "fanned out" and propagated into multiple locations through type variable
@@ -943,7 +943,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
ParameterizedTypeBinding type = (ParameterizedTypeBinding) this.expectedType;
MethodBinding method = type.getSingleAbstractMethod(this.enclosingScope, true, this.sourceStart, this.sourceEnd);
return method.parameters;
- }
+ }
return this.descriptor.parameters;
}
@@ -975,29 +975,29 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
copy.setExpressionContext(this.expressionContext);
copy.setExpectedType(targetType);
copy.resolveType(this.enclosingScope);
-
+
if (this.copiesPerTargetType == null)
this.copiesPerTargetType = new HashMap<TypeBinding, ReferenceExpression>();
this.copiesPerTargetType.put(targetType, copy);
-
+
return copy;
} finally {
this.enclosingScope.problemReporter().switchErrorHandlingPolicy(oldPolicy);
}
}
-
+
public void registerInferenceContext(ParameterizedGenericMethodBinding method, InferenceContext18 context) {
if (this.inferenceContexts == null)
this.inferenceContexts = new HashMap<ParameterizedGenericMethodBinding, InferenceContext18>();
this.inferenceContexts.put(method, context);
}
-
+
public InferenceContext18 getInferenceContext(ParameterizedMethodBinding method) {
if (this.inferenceContexts == null)
return null;
return this.inferenceContexts.get(method);
}
-
+
@Override
public ReferenceExpression resolveExpressionExpecting(TypeBinding targetType, Scope scope, InferenceContext18 inferenceContext) {
if (this.exactMethodBinding != null) { // We may see inference variables in target type.
@@ -1006,34 +1006,34 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
return null;
int n = functionType.parameters.length;
int k = this.exactMethodBinding.parameters.length;
-
+
if (!this.haveReceiver && this.isMethodReference() && !this.exactMethodBinding.isStatic()) {
k++;
}
return (n == k) ? this : null;
}
// descriptors parameters should be free of inference variables.
- ReferenceExpression copy = cachedResolvedCopy(targetType);
+ ReferenceExpression copy = cachedResolvedCopy(targetType);
return copy != null && copy.resolvedType != null && copy.resolvedType.isValidBinding() && copy.binding != null && copy.binding.isValidBinding() ? copy : null;
}
public boolean isConstructorReference() {
return CharOperation.equals(this.selector, ConstantPool.Init);
}
-
+
@Override
public boolean isExactMethodReference() {
return this.exactMethodBinding != null;
}
-
+
public MethodBinding getExactMethod() {
return this.exactMethodBinding;
}
-
+
public boolean isMethodReference() {
return !CharOperation.equals(this.selector, ConstantPool.Init);
}
-
+
@Override
public boolean isPertinentToApplicability(TypeBinding targetType, MethodBinding method) {
if (!this.isExactMethodReference()) {
@@ -1041,7 +1041,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
}
return super.isPertinentToApplicability(targetType, method);
}
-
+
@Override
public TypeBinding[] genericTypeArguments() {
return this.resolvedTypeArguments;
@@ -1083,7 +1083,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
@Override
public StringBuffer printExpression(int tab, StringBuffer output) {
-
+
this.lhs.print(0, output);
output.append("::"); //$NON-NLS-1$
if (this.typeArguments != null) {
@@ -1098,19 +1098,19 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
}
if (isConstructorReference())
output.append("new"); //$NON-NLS-1$
- else
+ else
output.append(this.selector);
-
+
return output;
}
-
+
@Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
-
+
this.lhs.traverse(visitor, blockScope);
-
+
int length = this.typeArguments == null ? 0 : this.typeArguments.length;
for (int i = 0; i < length; i++) {
this.typeArguments[i].traverse(visitor, blockScope);
@@ -1120,7 +1120,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
}
public Expression[] createPseudoExpressions(TypeBinding[] p) {
- // from 15.13.1:
+ // from 15.13.1:
// ... the reference is treated as if it were an invocation with argument expressions of types P1..Pn
// ... the reference is treated as if it were an invocation with argument expressions of types P2..Pn
// (the different sets of types are passed from our resolveType to scope.getMethod(..), see someMethod, anotherMethod)
@@ -1156,7 +1156,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
return false;
if (this.typeArgumentsHaveErrors || this.receiverType == null || !this.receiverType.isValidBinding())
return false;
-
+
int parametersLength = sam.parameters.length;
TypeBinding[] descriptorParameters = new TypeBinding[parametersLength];
for (int i = 0; i < parametersLength; i++) {
@@ -1178,7 +1178,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
}
};
}
-
+
// 15.13.1
this.freeParameters = descriptorParameters;
this.checkingPotentialCompatibility = true;
@@ -1188,12 +1188,12 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
if (compileTimeDeclaration != null && compileTimeDeclaration.isValidBinding()) // we have the mSMB.
this.potentialMethods = new MethodBinding [] { compileTimeDeclaration };
else {
- /* We EITHER have potential methods that are input to Scope.mSMb already captured in this.potentialMethods
+ /* We EITHER have potential methods that are input to Scope.mSMb already captured in this.potentialMethods
OR there is no potentially compatible compile time declaration ...
*/
}
- /* 15.12.2.1: A method reference expression (§15.13) is potentially compatible with a functional interface type if, where the type's function type arity is n,
+ /* 15.12.2.1: A method reference expression (§15.13) is potentially compatible with a functional interface type if, where the type's function type arity is n,
there exists at least one potentially applicable method for the method reference expression with arity n (§15.13.1), and one of the following is true:
– The method reference expression has the form ReferenceType ::[TypeArguments] Identifier and at least one potentially applicable method is
i) static and supports arity n, or ii) not static and supports arity n-1.
@@ -1217,11 +1217,11 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
this.freeParameters = descriptorParameters;
this.potentialMethods = Binding.NO_METHODS;
compileTimeDeclaration = getCompileTimeDeclaration(scope, false, descriptorParameters);
-
+
if (compileTimeDeclaration != null && compileTimeDeclaration.isValidBinding()) // we have the mSMB.
this.potentialMethods = new MethodBinding [] { compileTimeDeclaration };
else {
- /* We EITHER have potential methods that are input to Scope.mSMb already captured in this.potentialMethods
+ /* We EITHER have potential methods that are input to Scope.mSMb already captured in this.potentialMethods
OR there is no potentially compatible compile time declaration ...
*/
}
@@ -1237,7 +1237,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
}
return false;
}
-
+
MethodBinding getCompileTimeDeclaration(Scope scope, boolean isConstructorRef, TypeBinding[] parameters) {
if (this.exactMethodBinding != null)
return this.exactMethodBinding;
@@ -1258,22 +1258,22 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
return copy.resolvedType != null && copy.resolvedType.isValidBinding() && copy.binding != null && copy.binding.isValidBinding();
}
}
-
+
@Override
public boolean sIsMoreSpecific(TypeBinding s, TypeBinding t, Scope scope) {
-
+
if (super.sIsMoreSpecific(s, t, scope))
return true;
-
+
if (this.exactMethodBinding == null || t.findSuperTypeOriginatingFrom(s) != null)
return false;
-
+
s = s.capture(this.enclosingScope, this.sourceStart, this.sourceEnd);
MethodBinding sSam = s.getSingleAbstractMethod(this.enclosingScope, true);
if (sSam == null || !sSam.isValidBinding())
return false;
TypeBinding r1 = sSam.returnType;
-
+
MethodBinding tSam = t.getSingleAbstractMethod(this.enclosingScope, true);
if (tSam == null || !tSam.isValidBinding())
return false;
@@ -1288,14 +1288,14 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
}
if (r2.id == TypeIds.T_void)
return true;
-
+
if (r1.id == TypeIds.T_void)
return false;
-
+
// r1 <: r2
if (r1.isCompatibleWith(r2, scope))
return true;
-
+
return r1.isBaseType() != r2.isBaseType() && r1.isBaseType() == this.exactMethodBinding.returnType.isBaseType();
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/RequiresStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/RequiresStatement.java
index 110ab4acc..ea1b95d46 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/RequiresStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/RequiresStatement.java
@@ -7,10 +7,10 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
- *
+ *
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.ast;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java
index a4f8fec71..21f6132c8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java
@@ -88,12 +88,12 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
// to each of the traversed try statements, so that execution will terminate properly.
// lookup the label, this should answer the returnContext
-
+
if (this.expression instanceof FunctionalExpression) {
if (this.expression.resolvedType == null || !this.expression.resolvedType.isValidBinding()) {
/* Don't descend without proper target types. For lambda shape analysis, what is pertinent is value vs void return and the fact that
this constitutes an abrupt exit. The former is already gathered, the latter is handled here.
- */
+ */
flowContext.recordAbruptExit();
return FlowInfo.DEAD_END;
}
@@ -307,7 +307,7 @@ public void resolve(BlockScope scope) {
: methodBinding.returnType)
: TypeBinding.VOID;
TypeBinding expressionType;
-
+
if (this.expression != null) {
this.expression.setExpressionContext(ASSIGNMENT_CONTEXT);
this.expression.setExpectedType(methodType);
@@ -315,7 +315,7 @@ public void resolve(BlockScope scope) {
this.expression.bits |= ASTNode.DisableUnnecessaryCastCheck;
}
}
-
+
if (methodType == TypeBinding.VOID) {
// the expression should be null, exceptions exist for lambda expressions.
if (this.expression == null) {
@@ -338,11 +338,11 @@ public void resolve(BlockScope scope) {
if (methodType != null) scope.problemReporter().shouldReturn(methodType, this);
return;
}
-
+
expressionType = this.expression.resolveType(scope);
if (lambda != null)
lambda.returnsExpression(this.expression, expressionType);
-
+
if (expressionType == null) return;
if (expressionType == TypeBinding.VOID) {
scope.problemReporter().attemptToReturnVoidValue(this);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleMemberAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleMemberAnnotation.java
index 4a5fbb046..193692428 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleMemberAnnotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleMemberAnnotation.java
@@ -31,7 +31,7 @@ public class SingleMemberAnnotation extends Annotation {
this.sourceStart = sourceStart;
this.sourceEnd = type.sourceEnd;
}
-
+
public SingleMemberAnnotation() {
// for subclasses.
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
index d6d50ee1e..4f01d918d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
@@ -20,7 +20,7 @@
* Bug 412203 - [compiler] Internal compiler error: java.lang.IllegalArgumentException: info cannot be null
* Bug 458396 - NPE in CodeStream.invoke()
* Bug 407414 - [compiler][null] Incorrect warning on a primitive type being null
- * Jesper S Moller - <jesper@selskabet.org> - Contributions for
+ * Jesper S Moller - <jesper@selskabet.org> - Contributions for
* bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
* bug 378674 - "The method can be declared as static" is wrong
* bug 404657 - [1.8][compiler] Analysis for effectively final variables fails to consider loops
@@ -84,7 +84,7 @@ public class SingleNameReference extends NameReference implements OperatorIds {
public MethodBinding[] syntheticAccessors; // [0]=read accessor [1]=write accessor
public TypeBinding genericCast;
public boolean isLabel;// flagging for break expression when expression is SwitchExpression - java 12 preview-feature
-//{ObjectTeams: in generated out-of-scope code a name may have the privilige of a (t)this:
+//{ObjectTeams: in generated out-of-scope code a name may have the privilige of a (t)this:
public boolean isThisLike;
// SH}
@@ -419,7 +419,7 @@ public void generateAssignment(BlockScope currentScope, CodeStream codeStream, A
default :
codeStream.pop();
break;
- }
+ }
}
}
return;
@@ -603,7 +603,7 @@ public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeS
FieldBinding codegenField = ((FieldBinding) this.binding).original();
if (codegenField.isStatic()) {
if ((this.syntheticAccessors == null) || (this.syntheticAccessors[SingleNameReference.READ] == null)) {
- TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenField, this.actualReceiverType, true /* implicit this */);
+ TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenField, this.actualReceiverType, true /* implicit this */);
codeStream.fieldAccess(Opcodes.OPC_getstatic, codegenField, constantPoolDeclaringClass);
} else {
codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessors[SingleNameReference.READ], null /* default declaringClass */);
@@ -798,7 +798,7 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
default:
codeStream.dup();
break;
- }
+ }
} else { // Stack: [owner][old field value] ---> [old field value][owner][old field value]
switch (operandType.id) {
case TypeIds.T_long :
@@ -816,7 +816,7 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
codeStream.sendOperator(postIncrement.operator, this.implicitConversion & TypeIds.COMPILE_TYPE_MASK);
codeStream.generateImplicitConversion(postIncrement.preAssignImplicitConversion);
fieldStore(currentScope, codeStream, codegenField, this.syntheticAccessors == null ? null : this.syntheticAccessors[SingleNameReference.WRITE], this.actualReceiverType, true /*implicit this*/, false);
- // no need for generic cast
+ // no need for generic cast
return;
case Binding.LOCAL : // assigning to a local variable
LocalVariableBinding localBinding = (LocalVariableBinding) this.binding;
@@ -853,7 +853,7 @@ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream
default:
codeStream.dup();
break;
- }
+ }
}
codeStream.generateImplicitConversion(this.implicitConversion);
codeStream.generateConstant(postIncrement.expression.constant, this.implicitConversion);
@@ -910,7 +910,7 @@ public VariableBinding nullAnnotatedVariableBinding(boolean supportTypeAnnotatio
switch (this.bits & ASTNode.RestrictiveFlagMASK) {
case Binding.FIELD : // reading a field
case Binding.LOCAL : // reading a local variable
- if (supportTypeAnnotations
+ if (supportTypeAnnotations
|| (((VariableBinding)this.binding).tagBits & TagBits.AnnotationNullMASK) != 0)
return (VariableBinding) this.binding;
}
@@ -1146,7 +1146,7 @@ public TypeBinding resolveType(BlockScope scope) {
if (((FieldAccessSpec)callout.baseMethodSpec).isSetter())
this.resolvedType = callout.roleMethodSpec.resolvedParameters()[0];
else
- this.resolvedType = callout.roleMethodSpec.resolvedType();
+ this.resolvedType = callout.roleMethodSpec.resolvedType();
return this.resolvedType;
}
// SH}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
index 97bb12728..ec3c66b5a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
@@ -65,7 +65,7 @@ public class SingleTypeReference extends TypeReference {
return this.resolvedType;
this.resolvedType = scope.getType(this.token);
-
+
if (this.resolvedType instanceof TypeVariableBinding) {
TypeVariableBinding typeVariable = (TypeVariableBinding) this.resolvedType;
if (typeVariable.declaringElement instanceof SourceTypeBinding) {
@@ -101,9 +101,9 @@ public class SingleTypeReference extends TypeReference {
this.token == CHAR ||
this.token == BOOLEAN ||
this.token == NULL ||
- this.token == VOID;
+ this.token == VOID;
}
-
+
@Override
public StringBuffer printExpression(int indent, StringBuffer output){
if (this.annotations != null && this.annotations[0] != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
index 18249ba69..1063a56fa 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
@@ -81,7 +81,7 @@ public abstract class Statement extends ASTNode {
// case OperatorIds.AND_AND :
// case OperatorIds.OR_OR :
// break;
-// default:
+// default:
// // if (DEBUG_LEVEL > 0) print(); - tolerated
// if ((binary.left instanceof Reference) && binary.right.constant != Constant.NotAConstant)
// return true;
@@ -96,8 +96,8 @@ public abstract FlowInfo analyseCode(BlockScope currentScope, FlowContext flowCo
/** Lambda shape analysis: *Assuming* this is reachable, analyze if this completes normally i.e control flow can reach the textually next statement.
For blocks, we don't perform intra-reachability analysis. We assume the lambda body is free of intrinsic control flow errors (if such errors
- exist they will not be flagged by this analysis, but are guaranteed to surface later on.)
-
+ exist they will not be flagged by this analysis, but are guaranteed to surface later on.)
+
@see Block#doesNotCompleteNormally
*/
public boolean doesNotCompleteNormally() {
@@ -105,7 +105,7 @@ public boolean doesNotCompleteNormally() {
}
/** Lambda shape analysis: *Assuming* this is reachable, analyze if this completes by continuing i.e control flow cannot reach the textually next statement.
- This is necessitated by the fact that continue claims to not complete normally. So this is necessary to discriminate between do { continue; } while (false);
+ This is necessitated by the fact that continue claims to not complete normally. So this is necessary to discriminate between do { continue; } while (false);
which completes normally and do { throw new Exception(); } while (false); which does not complete normally.
*/
public boolean completesByContinue() {
@@ -115,7 +115,7 @@ public boolean completesByContinue() {
public static final int NOT_COMPLAINED = 0;
public static final int COMPLAINED_FAKE_REACHABLE = 1;
public static final int COMPLAINED_UNREACHABLE = 2;
-
+
/** Analysing arguments of MessageSend, ExplicitConstructorCall, AllocationExpression. */
protected void analyseArguments(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, MethodBinding methodBinding, Expression[] arguments)
@@ -173,7 +173,7 @@ protected void analyseArguments(BlockScope currentScope, FlowContext flowContext
flowContext.recordNullityMismatch(currentScope, argument, argument.resolvedType, expectedType, flowInfo, nullStatus, null);
}
}
- }
+ }
}
}
void analyseOneArgument18(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo,
@@ -199,16 +199,16 @@ void analyseOneArgument18(BlockScope currentScope, FlowContext flowContext, Flow
nullStatus, expectedNonNullness, originalExpected);
}
void internalAnalyseOneArgument18(BlockScope currentScope, FlowContext flowContext, TypeBinding expectedType,
- Expression argument, FlowInfo flowInfo, int nullStatus, Boolean expectedNonNullness, TypeBinding originalExpected)
+ Expression argument, FlowInfo flowInfo, int nullStatus, Boolean expectedNonNullness, TypeBinding originalExpected)
{
// here we consume special case information generated in the ctor of ParameterizedGenericMethodBinding (see there):
- int statusFromAnnotatedNull = expectedNonNullness == Boolean.TRUE ? nullStatus : 0;
-
+ int statusFromAnnotatedNull = expectedNonNullness == Boolean.TRUE ? nullStatus : 0;
+
NullAnnotationMatching annotationStatus = NullAnnotationMatching.analyse(expectedType, argument.resolvedType, nullStatus);
-
+
if (!annotationStatus.isAnyMismatch() && statusFromAnnotatedNull != 0)
expectedType = originalExpected; // to avoid reports mentioning '@NonNull null'!
-
+
if (statusFromAnnotatedNull == FlowInfo.NULL) {
// immediate reporting:
currentScope.problemReporter().nullityMismatchingTypeAnnotation(argument, argument.resolvedType, expectedType, annotationStatus);
@@ -232,7 +232,7 @@ void internalAnalyseOneArgument18(BlockScope currentScope, FlowContext flowConte
} catch (NullPointerException npe) {
// chain of references in try-block has several potential nulls;
// any null means we cannot perform the following check
- return;
+ return;
}
if (useTypeAnnotations) {
checkAgainstNullTypeAnnotation(scope, methodBinding.returnType, expr, flowContext, flowInfo);
@@ -254,8 +254,8 @@ protected void checkAgainstNullTypeAnnotation(BlockScope scope, TypeBinding requ
} else if (expression instanceof SwitchExpression && expression.isPolyExpression()) {
SwitchExpression se = (SwitchExpression) expression;
for (int i = 0; i < se.resultExpressions.size(); i++) {
- internalCheckAgainstNullTypeAnnotation(scope, requiredType,
- se.resultExpressions.get(i),
+ internalCheckAgainstNullTypeAnnotation(scope, requiredType,
+ se.resultExpressions.get(i),
se.resultExpressionNullStatus.get(i), flowContext, flowInfo);
}
return;
@@ -288,7 +288,7 @@ public void branchChainTo(BranchLabel label) {
// Inspect AST nodes looking for a break statement, descending into nested control structures only when necessary (looking for a break with a specific label.)
public boolean breaksOut(final char[] label) {
return new ASTVisitor() {
-
+
boolean breaksOut;
@Override
public boolean visit(TypeDeclaration type, BlockScope skope) { return label != null; }
@@ -306,7 +306,7 @@ public boolean breaksOut(final char[] label) {
public boolean visit(ForStatement forStatement, BlockScope skope) { return label != null; }
@Override
public boolean visit(SwitchStatement switchStatement, BlockScope skope) { return label != null; }
-
+
@Override
public boolean visit(BreakStatement breakStatement, BlockScope skope) {
if (label == null || CharOperation.equals(label, breakStatement.label))
@@ -374,7 +374,7 @@ public int complainIfUnreachable(FlowInfo flowInfo, BlockScope scope, int previo
return COMPLAINED_UNREACHABLE;
} else {
if (previousComplaintLevel < COMPLAINED_FAKE_REACHABLE) {
-/* OT: */ if (shouldReport)
+/* OT: */ if (shouldReport)
// SH}
scope.problemReporter().fakeReachable(this);
if (endOfBlock)
@@ -460,7 +460,7 @@ public void generateArguments(MethodBinding binding, Expression[] arguments, Blo
//{ObjectTeams:
private TypeBinding checkRoleToPlainCast(TypeBinding providedType, TypeBinding requiredBinding) {
- if ( providedType.isRole()
+ if ( providedType.isRole()
&& !TeamModel.isTeamContainingRole(((ReferenceBinding)providedType).enclosingType(), (ReferenceBinding) requiredBinding))
return requiredBinding;
return null;
@@ -525,7 +525,7 @@ public Constant[] resolveCase(BlockScope scope, TypeBinding testType, SwitchStat
public TypeBinding resolveExpressionType(BlockScope scope) {
return null;
}
-/**
+/**
* Implementation of {@link org.eclipse.jdt.internal.compiler.lookup.InvocationSite#invocationTargetType}
* suitable at this level. Subclasses should override as necessary.
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#invocationTargetType()
@@ -542,7 +542,7 @@ public ExpressionContext getExpressionContext() {
return ExpressionContext.VANILLA_CONTEXT;
}
/**
- * For all constructor invocations: find the constructor binding;
+ * For all constructor invocations: find the constructor binding;
* if site.innersNeedUpdate() perform some post processing for those and produce
* any updates as side-effects into 'argumentTypes'.
*/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SuperReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SuperReference.java
index 65395586c..8aaf7a2f9 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SuperReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SuperReference.java
@@ -44,7 +44,7 @@ public class SuperReference extends ThisReference {
return true;
}
-
+
@Override
public boolean isUnqualifiedSuper() {
return true;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java
index 8feb17d3a..4f056ea2f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java
@@ -89,7 +89,7 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
protected int getFallThroughState(Statement stmt, BlockScope blockScope) {
if ((stmt instanceof Expression && ((Expression) stmt).isTrulyExpression())|| stmt instanceof ThrowStatement)
return BREAKING;
- if (this.switchLabeledRules // do this check for every block if '->' (Switch Labeled Rules)
+ if (this.switchLabeledRules // do this check for every block if '->' (Switch Labeled Rules)
&& stmt instanceof Block) {
Block block = (Block) stmt;
if (block.doesNotCompleteNormally()) {
@@ -161,11 +161,11 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
}
}
if (firstTrailingCaseStmt != null) {
- blockScope.problemReporter().switchExpressionTrailingSwitchLabels(firstTrailingCaseStmt);
+ blockScope.problemReporter().switchExpressionTrailingSwitchLabels(firstTrailingCaseStmt);
}
}
@Override
- protected boolean needToCheckFlowInAbsenceOfDefaultBranch() { // JLS 12 16.1.8
+ protected boolean needToCheckFlowInAbsenceOfDefaultBranch() { // JLS 12 16.1.8
return !this.switchLabeledRules;
}
@Override
@@ -292,18 +292,18 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
continue;
if (!this.labelDecls.contains(new String(bs.label)))
blockScope.problemReporter().switchExpressionsBreakOutOfSwitchExpression(bs);
- }
+ }
for (ContinueStatement cs : this.referencedContinueLabels) {
if (cs.label == null || cs.label.length == 0)
continue;
if (!this.labelDecls.contains(new String(cs.label)))
blockScope.problemReporter().switchExpressionsContinueOutOfSwitchExpression(cs);
- }
+ }
} catch (EmptyStackException e) {
// ignore
}
}
-
+
@Override
public void endVisit(SwitchExpression switchExpression, BlockScope blockScope) {
checkForOutofBoundLabels(blockScope);
@@ -337,8 +337,8 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
int resultExpressionsCount;
if (this.constant != Constant.NotAConstant) {
this.constant = Constant.NotAConstant;
-
- // A switch expression is a poly expression if it appears in an assignment context or an invocation context (5.2, 5.3).
+
+ // A switch expression is a poly expression if it appears in an assignment context or an invocation context (5.2, 5.3).
// Otherwise, it is a standalone expression.
if (this.expressionContext == ASSIGNMENT_CONTEXT || this.expressionContext == INVOCATION_CONTEXT) {
for (Expression e : this.resultExpressions) {
@@ -348,24 +348,24 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
e.setExpectedType(this.expectedType);
}
}
-
+
resolve(upperScope);
-
+
if (this.statements == null || this.statements.length == 0) {
// Report Error JLS 13 15.28.1 The switch block must not be empty.
upperScope.problemReporter().switchExpressionEmptySwitchBlock(this);
return null;
}
-
+
resultExpressionsCount = this.resultExpressions != null ? this.resultExpressions.size() : 0;
if (resultExpressionsCount == 0) {
- // Report Error JLS 13 15.28.1
+ // Report Error JLS 13 15.28.1
// It is a compile-time error if a switch expression has no result expressions.
upperScope.problemReporter().switchExpressionNoResultExpressions(this);
return null;
}
this.traverse(new OOBLFlagger(this), upperScope);
-
+
if (this.originalValueResultExpressionTypes == null) {
this.originalValueResultExpressionTypes = new TypeBinding[resultExpressionsCount];
this.finalValueResultExpressionTypes = new TypeBinding[resultExpressionsCount];
@@ -387,7 +387,7 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
for (int i = 0; i < resultExpressionsCount; i++) {
Expression resultExpr = this.resultExpressions.get(i);
if (resultExpr.resolvedType == null || resultExpr.resolvedType.kind() == Binding.POLY_TYPE) {
- this.finalValueResultExpressionTypes[i] = this.originalValueResultExpressionTypes[i] =
+ this.finalValueResultExpressionTypes[i] = this.originalValueResultExpressionTypes[i] =
resultExpr.resolveTypeExpecting(upperScope, this.expectedType);
}
// This is a kludge and only way completion can tell this node to resolve all
@@ -413,7 +413,7 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
break;
}
}
- // If the result expressions all have the same type (which may be the null type),
+ // If the result expressions all have the same type (which may be the null type),
// then that is the type of the switch expression.
if (typeUniformAcrossAllArms) {
tmp = this.originalValueResultExpressionTypes[0];
@@ -423,7 +423,7 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
}
return this.resolvedType = tmp;
}
-
+
boolean typeBbolean = true;
for (TypeBinding t : this.originalValueResultExpressionTypes) {
if (t != null)
@@ -472,7 +472,7 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
* are widened to double.
* Otherwise, if any result expression is of type float, then other result expressions that are not of
* type float are widened to float.
- * Otherwise, if any result expression is of type long, then other result expressions that are not of
+ * Otherwise, if any result expression is of type long, then other result expressions that are not of
* type long are widened to long.
*/
TypeBinding[] dfl = new TypeBinding[]{// do not change the order JLS 13 5.6
@@ -493,7 +493,7 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
* a standalone switch expression where all the result expressions are convertible to a numeric type.]
*/
- /* Otherwise, if any result expression is of type int and is not a constant expression, the other
+ /* Otherwise, if any result expression is of type int and is not a constant expression, the other
* result expressions that are not of type int are widened to int.
*/
resultNumeric = resultNumeric != null ? resultNumeric : check_nonconstant_int();
@@ -582,16 +582,16 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
candidate : null;
}
private TypeBinding getResultNumeric(Set<TypeBinding> typeSet, TypeBinding[] armTypes) {
- // note: if an expression has a type integer, then it will be a constant
+ // note: if an expression has a type integer, then it will be a constant
// since non-constant integers are already processed before reaching here.
/* Otherwise, if any expression is of type short, and every other expression is either of type short,
* or of type byte, or a constant expression of type int with a value that is representable in the
- * type short, then T is short, the byte expressions undergo widening primitive conversion to short,
+ * type short, then T is short, the byte expressions undergo widening primitive conversion to short,
* and the int expressions undergo narrowing primitive conversion to short.\
*
* Otherwise, if any expression is of type byte, and every other expression is either of type byte or a
- * constant expression of type int with a value that is representable in the type byte, then T is byte
+ * constant expression of type int with a value that is representable in the type byte, then T is byte
* and the int expressions undergo narrowing primitive conversion to byte.
*
* Otherwise, if any expression is of type char, and every other expression is either of type char or a
@@ -618,7 +618,7 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
return true;
// JLS 13 15.28.1 A switch expression is a poly expression if it appears in an assignment context or
// an invocation context (5.2, 5.3). Otherwise, it is a standalone expression.
- return this.isPolyExpression = this.expressionContext == ASSIGNMENT_CONTEXT ||
+ return this.isPolyExpression = this.expressionContext == ASSIGNMENT_CONTEXT ||
this.expressionContext == INVOCATION_CONTEXT;
}
@Override
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
index 620e4dc5b..d18bae6b0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
@@ -10,7 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Stephan Herrmann - Contributions for
+ * Stephan Herrmann - Contributions for
* bug 319201 - [null] no warning when unboxing SingleNameReference causes NPE
* bug 349326 - [1.7] new warning for missing try-with-resources
* bug 265744 - Enum switch should warn about missing default
@@ -65,7 +65,7 @@ public class SwitchStatement extends Expression {
public final static int FALLTHROUGH = 1;
public final static int ESCAPING = 2;
public final static int BREAKING = 3;
-
+
// for switch on strings
private static final char[] SecretStringVariableName = " switchDispatchString".toCharArray(); //$NON-NLS-1$
@@ -75,7 +75,7 @@ public class SwitchStatement extends Expression {
// for local variables table attributes
int preSwitchInitStateIndex = -1;
int mergedInitStateIndex = -1;
-
+
CaseStatement[] duplicateCaseStatements = null;
int duplicateCaseStatementsCounter = 0;
private LocalVariableBinding dispatchStringCopy = null;
@@ -84,7 +84,7 @@ public class SwitchStatement extends Expression {
if (this.switchLabeledRules) {
if ((stmt instanceof Expression && ((Expression) stmt).isTrulyExpression()) || stmt instanceof ThrowStatement)
return BREAKING;
-
+
if (stmt instanceof Block) {
Block block = (Block) stmt;
if (block.doesNotCompleteNormally()) {
@@ -225,7 +225,7 @@ public class SwitchStatement extends Expression {
return;
}
int pc = codeStream.position;
-
+
class StringSwitchCase implements Comparable {
int hashCode;
String string;
@@ -249,13 +249,13 @@ public class SwitchStatement extends Expression {
@Override
public String toString() {
return "StringSwitchCase :\n" + //$NON-NLS-1$
- "case " + this.hashCode + ":(" + this.string + ")\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "case " + this.hashCode + ":(" + this.string + ")\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
/*
* With multi constant case statements, the number of case statements (hence branch labels)
* and number of constants (hence hashcode labels) could be different. For e.g:
-
+
switch(s) {
case "FB", "c":
System.out.println("A/C");
@@ -263,18 +263,18 @@ public class SwitchStatement extends Expression {
case "Ea":
System.out.println("B");
break;
-
- With the above code, we will have
+
+ With the above code, we will have
2 branch labels for FB and c
3 stringCases for FB, c and Ea
2 hashCodeCaseLabels one for FB, Ea and one for c
-
- Should produce something like this:
+
+ Should produce something like this:
lookupswitch { // 2
99: 32
2236: 44
default: 87
-
+
"FB" and "Ea" producing the same hashcode values, but still belonging in different case statements.
First, produce the two branch labels pertaining to the case statements
And the three string cases and use the this.constMapping to get the correct branch label.
@@ -285,7 +285,7 @@ public class SwitchStatement extends Expression {
if (currentScope.compilerOptions().complianceLevel >= ClassFileConstants.JDK12) {
for (int i = 0, max = this.caseCount; i < max; i++) {
int l = this.cases[i].constantExpressions.length;
- this.cases[i].targetLabels = new BranchLabel[l];
+ this.cases[i].targetLabels = new BranchLabel[l];
}
sourceCaseLabels = new BranchLabel[this.nConstants];
int j = 0;
@@ -314,14 +314,14 @@ public class SwitchStatement extends Expression {
Arrays.sort(stringCases);
int uniqHashCount = 0;
- int lastHashCode = 0;
+ int lastHashCode = 0;
for (int i = 0, length = constSize; i < length; ++i) {
int hashCode = stringCases[i].hashCode;
if (i == 0 || hashCode != lastHashCode) {
lastHashCode = this.constants[uniqHashCount++] = hashCode;
}
}
-
+
if (uniqHashCount != constSize) { // multiple keys hashed to the same value.
System.arraycopy(this.constants, 0, this.constants = new int[uniqHashCount], 0, uniqHashCount);
System.arraycopy(hashCodeCaseLabels, 0, hashCodeCaseLabels = new CaseLabel[uniqHashCount], 0, uniqHashCount);
@@ -336,7 +336,7 @@ public class SwitchStatement extends Expression {
// prepare the labels and constants
this.breakLabel.initialize(codeStream);
-
+
BranchLabel defaultBranchLabel = new BranchLabel(codeStream);
if (hasCases) defaultBranchLabel.tagBits |= BranchLabel.USED;
if (this.defaultCase != null) {
@@ -391,7 +391,7 @@ public class SwitchStatement extends Expression {
statementGenerateCode(currentScope, codeStream, statement);
}
}
-
+
// May loose some local variable initializations : affecting the local variable attributes
if (this.mergedInitStateIndex != -1) {
codeStream.removeNotDefinitelyAssignedVariables(currentScope, this.mergedInitStateIndex);
@@ -412,7 +412,7 @@ public class SwitchStatement extends Expression {
if (this.expectedType() != null) {
TypeBinding expectedType = this.expectedType().erasure();
boolean optimizedGoto = codeStream.lastAbruptCompletion == -1;
- // if the last bytecode was an optimized goto (value is already on the stack) or an enum switch without default case, then we need to adjust the
+ // if the last bytecode was an optimized goto (value is already on the stack) or an enum switch without default case, then we need to adjust the
// stack depth to reflect the fact that there is an value on the stack (return type of the switch expression)
codeStream.recordExpressionType(expectedType, optimizedGoto ? 0 : 1, optimizedGoto);
}
@@ -422,7 +422,7 @@ public class SwitchStatement extends Expression {
}
}
-
+
/**
* Switch code generation
*
@@ -450,7 +450,7 @@ public class SwitchStatement extends Expression {
for (int i = 0, max = this.caseCount; i < max; i++) {
int l = this.cases[i].constantExpressions.length;
nCaseLabels += l;
- this.cases[i].targetLabels = new BranchLabel[l];
+ this.cases[i].targetLabels = new BranchLabel[l];
}
caseLabels = new CaseLabel[nCaseLabels];
int j = 0;
@@ -568,7 +568,7 @@ public class SwitchStatement extends Expression {
* to make the stack map consistent. All cases will return a value on the stack except the missing default
* case.
* There is no returned value for the default case so we handle it with an exception thrown. An
- * IllegalClassChangeError seems legitimate as this would mean the enum type has been recompiled with more
+ * IllegalClassChangeError seems legitimate as this would mean the enum type has been recompiled with more
* enum constants and the class that is using the switch on the enum has not been recompiled
*/
codeStream.newJavaLangIncompatibleClassChangeError();
@@ -597,7 +597,7 @@ public class SwitchStatement extends Expression {
switchResolveType = this.expectedType().erasure();
}
boolean optimizedGoto = codeStream.lastAbruptCompletion == -1;
- // if the last bytecode was an optimized goto (value is already on the stack) or an enum switch without default case, then we need to adjust the
+ // if the last bytecode was an optimized goto (value is already on the stack) or an enum switch without default case, then we need to adjust the
// stack depth to reflect the fact that there is an value on the stack (return type of the switch expression)
codeStream.recordExpressionType(switchResolveType, optimizedGoto ? 0 : 1, optimizedGoto || isEnumSwitchWithoutDefaultCase);
}
@@ -715,7 +715,7 @@ public class SwitchStatement extends Expression {
}
if ((constantsList = statement.resolveCase(this.scope, expressionType, this)) != Constant.NotAConstantList) {
for (Constant con : constantsList) {
- if (con == Constant.NotAConstant)
+ if (con == Constant.NotAConstant)
continue;
if (!isStringSwitch) {
int key = con.intValue();
@@ -825,11 +825,11 @@ public class SwitchStatement extends Expression {
private void reportDuplicateCase(final CaseStatement duplicate, final CaseStatement original, int length) {
if (this.duplicateCaseStatements == null) {
this.scope.problemReporter().duplicateCase(original);
- if (duplicate != original)
+ if (duplicate != original)
this.scope.problemReporter().duplicateCase(duplicate);
this.duplicateCaseStatements = new CaseStatement[length];
this.duplicateCaseStatements[this.duplicateCaseStatementsCounter++] = original;
- if (duplicate != original)
+ if (duplicate != original)
this.duplicateCaseStatements[this.duplicateCaseStatementsCounter++] = duplicate;
} else {
boolean found = false;
@@ -888,7 +888,7 @@ public class SwitchStatement extends Expression {
}
return this.statements[this.statements.length - 1].doesNotCompleteNormally();
}
-
+
@Override
public boolean completesByContinue() {
if (this.statements == null || this.statements.length == 0)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SynchronizedStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SynchronizedStatement.java
index d6465cb9c..cbc5e9170 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SynchronizedStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SynchronizedStatement.java
@@ -113,7 +113,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
default :
codeStream.dup();
break;
- }
+ }
// only take the lock
codeStream.monitorenter();
codeStream.monitorexit();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThisReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThisReference.java
index 079c138e9..e33228ca4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThisReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThisReference.java
@@ -139,7 +139,7 @@ public class ThisReference extends Reference {
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
-
+
ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
if (!isImplicitThis() &&!checkAccess(scope, enclosingReceiverType)) {
return null;
@@ -156,7 +156,7 @@ public class ThisReference extends Reference {
this.resolvedType = RoleTypeCreator.maybeWrapUnqualifiedRoleType(
this.resolvedType,
scope,
- this);
+ this);
}
// SH}
return this.resolvedType;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TrueLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TrueLiteral.java
index 1ef7a61bc..00955c887 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TrueLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TrueLiteral.java
@@ -21,9 +21,9 @@ import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
public class TrueLiteral extends MagicLiteral {
-
+
static final char[] source = {'t' , 'r' , 'u' , 'e'};
-
+
public TrueLiteral(int s , int e) {
super(s,e);
}
@@ -76,7 +76,7 @@ public char[] source() {
}
@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
-//{ObjectTeams: hide synthetic nodes from visitors (e.g., inserted into a base call)
+//{ObjectTeams: hide synthetic nodes from visitors (e.g., inserted into a base call)
if (this.isGenerated) return;
// SH}
visitor.visit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
index af44a2a03..c39dde83a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
@@ -162,7 +162,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
FlowInfo tryInfo = flowInfo.copy();
for (int i = 0; i < resourcesLength; i++) {
- final Statement resource = this.resources[i];
+ final Statement resource = this.resources[i];
tryInfo = resource.analyseCode(currentScope, handlingContext, tryInfo);
this.postResourcesInitStateIndexes[i] = currentScope.methodScope().recordInitializationStates(tryInfo);
TypeBinding resolvedType = null;
@@ -261,7 +261,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
null,
this.scope,
flowInfo);
- insideSubContext.initsOnFinally = handlingContext.initsOnFinally;
+ insideSubContext.initsOnFinally = handlingContext.initsOnFinally;
subInfo =
this.finallyBlock
@@ -600,7 +600,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
for (int i = resourceCount; i >= 0; i--) {
BranchLabel exitLabel = new BranchLabel(codeStream);
this.resourceExceptionLabels[i].placeEnd(); // outer handler if any is the one that should catch exceptions out of close()
-
+
Statement stmt = i > 0 ? this.resources[i - 1] : null;
if ((this.bits & ASTNode.IsTryBlockExiting) == 0) {
// inline resource closure
@@ -631,8 +631,8 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
codeStream.pushExceptionOnStack(this.scope.getJavaLangThrowable());
this.resourceExceptionLabels[i].place();
- if (i == resourceCount) {
- // inner most try's catch/finally can be a lot simpler.
+ if (i == resourceCount) {
+ // inner most try's catch/finally can be a lot simpler.
codeStream.store(this.primaryExceptionVariable, false);
// fall through, invoke close() and re-throw.
} else {
@@ -655,7 +655,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if (i > 0) {
// inline resource close here rather than bracketing the current catch block with a try region.
BranchLabel postCloseLabel = new BranchLabel(codeStream);
- generateCodeSnippet(stmt, codeStream, postCloseLabel, true /* record */, i, codeStream.position);
+ generateCodeSnippet(stmt, codeStream, postCloseLabel, true /* record */, i, codeStream.position);
postCloseLabel.place();
}
codeStream.load(this.primaryExceptionVariable);
@@ -911,8 +911,8 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
private void generateCodeSnippet(Statement statement, CodeStream codeStream, BranchLabel postCloseLabel, boolean record, int... values) {
-
- int i = -1;
+
+ int i = -1;
int invokeCloseStartPc = -1;
if (record) {
i = values[0];
@@ -953,11 +953,11 @@ private boolean isDuplicateResourceReference(int index) {
Binding refBinding = ref instanceof NameReference ? ((NameReference) ref).binding :
ref instanceof FieldReference ? ((FieldReference) ref).binding : null;
if (refBinding == null) return false;
-
+
//TODO: For field accesses in the form of a.b.c and b.c - could there be a non-trivial dup - to check?
for (int i = 0; i < index; i++) {
Statement stmt = this.resources[i];
- Binding b = stmt instanceof LocalDeclaration ? ((LocalDeclaration) stmt).binding :
+ Binding b = stmt instanceof LocalDeclaration ? ((LocalDeclaration) stmt).binding :
stmt instanceof NameReference ? ((NameReference) stmt).binding :
stmt instanceof FieldReference ? ((FieldReference) stmt).binding : null;
if (b == refBinding) {
@@ -1189,7 +1189,7 @@ public void resolve(BlockScope upperScope) {
if (!methodScope.isInsideInitializer()) {
MethodBinding methodBinding = methodScope.referenceContext instanceof AbstractMethodDeclaration ?
- ((AbstractMethodDeclaration) methodScope.referenceContext).binding : (methodScope.referenceContext instanceof LambdaExpression ?
+ ((AbstractMethodDeclaration) methodScope.referenceContext).binding : (methodScope.referenceContext instanceof LambdaExpression ?
((LambdaExpression)methodScope.referenceContext).binding : null);
if (methodBinding != null) {
TypeBinding methodReturnType = methodBinding.returnType;
@@ -1363,7 +1363,7 @@ public boolean doesNotCompleteNormally() {
public boolean completesByContinue() {
if (this.tryBlock.completesByContinue()) {
return (this.finallyBlock == null) ? true :
- !this.finallyBlock.doesNotCompleteNormally() || this.finallyBlock.completesByContinue();
+ !this.finallyBlock.doesNotCompleteNormally() || this.finallyBlock.completesByContinue();
}
if (this.catchBlocks != null) {
for (int i = 0; i < this.catchBlocks.length; i++) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
index 214371ccf..d94a50cfe 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
@@ -701,7 +701,7 @@ public ConstructorDeclaration createDefaultConstructor( boolean needExplicitCons
// if roleModel != null assume were called later than during parsing:
// - from CopyInheritance.copyMethod(OTConfined)
// - crom Dependencies.establishMethodsCreated(RoleModel)
- if (this.isDirectRole() && this.roleModel == null)
+ if (this.isDirectRole() && this.roleModel == null)
return null;
// SH}
@@ -806,11 +806,11 @@ public MethodBinding createDefaultConstructorWithBinding(MethodBinding inherited
constructor.binding.tagBits |= (inheritedConstructorBinding.tagBits & TagBits.HasMissingType);
constructor.binding.modifiers |= ExtraCompilerModifiers.AccIsDefaultConstructor;
if (inheritedConstructorBinding.parameterNonNullness != null // this implies that annotation based null analysis is enabled
- && argumentsLength > 0)
+ && argumentsLength > 0)
{
// copy nullness info from inherited constructor to the new constructor:
int len = inheritedConstructorBinding.parameterNonNullness.length;
- System.arraycopy(inheritedConstructorBinding.parameterNonNullness, 0,
+ System.arraycopy(inheritedConstructorBinding.parameterNonNullness, 0,
constructor.binding.parameterNonNullness = new Boolean[len], 0, len);
}
// TODO(stephan): do argument types already carry sufficient info about type annotations?
@@ -1090,7 +1090,7 @@ public void generateCode(ClassFile enclosingClassFile) {
//{ObjectTeams: mark as done:
finally {
if (this.isTeam())
- this.teamModel.setState(ITranslationStates.STATE_BYTE_CODE_GENERATED);
+ this.teamModel.setState(ITranslationStates.STATE_BYTE_CODE_GENERATED);
}
// SH}
}
@@ -1152,7 +1152,7 @@ protected AbstractSmapGenerator createSmapGenerator()
return new TeamSmapGenerator(this);
// NOTE: currently no special treatment for nested team (team&role)
-
+
return null;
}
//ike}
@@ -1233,9 +1233,9 @@ private void internalAnalyseCode(FlowContext flowContext, FlowInfo flowInfo) {
this.scope.problemReporter().unusedPrivateType(this);
}
}
-
+
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=385780
- if (this.typeParameters != null &&
+ if (this.typeParameters != null &&
!this.scope.referenceCompilationUnit().compilationResult.hasSyntaxError) {
for (int i = 0, length = this.typeParameters.length; i < length; ++i) {
TypeParameter typeParameter = this.typeParameters[i];
@@ -1243,11 +1243,11 @@ private void internalAnalyseCode(FlowContext flowContext, FlowInfo flowInfo) {
if (!(typeParameter instanceof TypeValueParameter))
// SH}
if ((typeParameter.binding.modifiers & ExtraCompilerModifiers.AccLocallyUsed) == 0) {
- this.scope.problemReporter().unusedTypeParameter(typeParameter);
+ this.scope.problemReporter().unusedTypeParameter(typeParameter);
}
}
}
-
+
// for local classes we use the flowContext as our parent, but never use an initialization context for this purpose
// see Bug 360328 - [compiler][null] detect null problems in nested code (local class inside a loop)
FlowContext parentContext = (flowContext instanceof InitializationFlowContext) ? null : flowContext;
@@ -2066,7 +2066,7 @@ public void resolve() {
}
StateMemento.methodResolveStart(this.binding);
// any role types found during field resolve? If so, catch up now:
- if (this.memberTypes != null && this.memberTypes.length > resolvedMemberCount
+ if (this.memberTypes != null && this.memberTypes.length > resolvedMemberCount
&& this.teamModel != null)
{
Dependencies.lateRolesCatchup(this.teamModel);
@@ -2153,7 +2153,7 @@ checkOuterScope:while (outerScope != null) {
}
} else if (existing2 instanceof ReferenceBinding
&& existing2.isValidBinding()
- && outerScope.isDefinedInType((ReferenceBinding) existing2)) {
+ && outerScope.isDefinedInType((ReferenceBinding) existing2)) {
blockScope.problemReporter().typeCollidesWithEnclosingType(this);
break checkOuterScope;
} else if (existing2 == null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java
index 109373335..92d12f677 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java
@@ -189,7 +189,7 @@ public class TypeParameter extends AbstractVariableDeclaration {
this.binding.evaluateNullAnnotations(scope, this);
}
}
- }
+ }
}
@Override
@@ -263,7 +263,7 @@ public class TypeParameter extends AbstractVariableDeclaration {
visitor.endVisit(this, scope);
}
//{ObjectTeams: for type parameters with an anchor (C<R<@t..>>)
- public void connectTypeAnchors(Scope scope) {
+ public void connectTypeAnchors(Scope scope) {
if (this.type instanceof TypeAnchorReference) {
int numParams = 1;
if (this.bounds != null)
@@ -287,7 +287,7 @@ public class TypeParameter extends AbstractVariableDeclaration {
this.binding.superclass = (ReferenceBinding) bound;
else
scope.problemReporter().incompleteDependentTypesImplementation(this, "Cannot combine more than one type bound with an instance bound");
- }
+ }
}
this.binding.anchors = anchors;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
index 37cc590b9..23aefe397 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
@@ -28,7 +28,7 @@
* Bug 435570 - [1.8][null] @NonNullByDefault illegally tries to affect "throws E"
* Bug 435805 - [1.8][compiler][null] Java 8 compiler does not recognize declaration style null annotations
* Bug 437072 - [compiler][null] Null analysis emits possibly incorrect warning for new int[][] despite @NonNullByDefault
- * Bug 466713 - Null Annotations: NullPointerException using <int @Nullable []> as Type Param
+ * Bug 466713 - Null Annotations: NullPointerException using <int @Nullable []> as Type Param
* Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
* Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
* Bug 409236 - [1.8][compiler] Type annotations on intersection cast types dropped by code generator
@@ -36,7 +36,7 @@
* Jesper S Møller <jesper@selskabet.org> - Contributions for
* bug 527554 - [18.3] Compiler support for JEP 286 Local-Variable Type
* bug 529556 - [18.3] Add content assist support for 'var' as a type
- *
+ *
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.ast;
@@ -95,7 +95,7 @@ public abstract class TypeReference extends Expression {
/** Any position admitting type annotations. */
ANY
}
-
+
static class AnnotationCollector extends ASTVisitor {
List annotationContexts;
Expression typeReference;
@@ -189,7 +189,7 @@ static class AnnotationCollector extends ASTVisitor {
// of the dimensions.
this.dimensions = dimensions;
}
-
+
private boolean internalVisit(Annotation annotation) {
AnnotationContext annotationContext = null;
if (annotation.isRuntimeTypeInvisible()) {
@@ -230,7 +230,7 @@ static class AnnotationCollector extends ASTVisitor {
case AnnotationTargetTypeConstants.METHOD_RETURN :
case AnnotationTargetTypeConstants.METHOD_RECEIVER :
break;
-
+
}
this.annotationContexts.add(annotationContext);
}
@@ -410,7 +410,7 @@ protected Annotation[][] getMergedAnnotationsOnDimensions(int additionalDimensio
*/
Annotation[][] annotationsOnDimensions = this.getAnnotationsOnDimensions(true);
int dimensions = this.dimensions();
-
+
if (annotationsOnDimensions == null && additionalAnnotations == null)
return null;
@@ -419,7 +419,7 @@ protected Annotation[][] getMergedAnnotationsOnDimensions(int additionalDimensio
if (annotationsOnDimensions != null) {
for (int i = 0; i < dimensions; i++) {
mergedAnnotations[i] = annotationsOnDimensions[i];
- }
+ }
}
if (additionalAnnotations != null) {
for (int i = dimensions, j = 0; i < totalDimensions; i++, j++) {
@@ -515,8 +515,8 @@ public TypeReference [][] getTypeArguments() {
* int @Nullable [] f @NonNull [] ==> f is really a @NonNull array of @Nullable arrays of ints. This is the type system
* view since extended dimensions bind more readily than type components that precede the identifier. This is how it ought
* to be encoded in bindings and how it ought to be persisted in class files. However for DOM/AST construction, we need the
- * dimensions in source order, so we provide a way for the clients to ask what they want.
- *
+ * dimensions in source order, so we provide a way for the clients to ask what they want.
+ *
*/
public Annotation[][] getAnnotationsOnDimensions(boolean useSourceOrder) {
return null;
@@ -874,7 +874,7 @@ protected void resolveAnnotations(Scope scope, int location) {
&& !this.resolvedType.isTypeVariable()
&& !this.resolvedType.isWildcard()
&& location != 0
- && scope.hasDefaultNullnessFor(location, this.sourceStart))
+ && scope.hasDefaultNullnessFor(location, this.sourceStart))
{
if (location == Binding.DefaultLocationTypeBound && this.resolvedType.id == TypeIds.T_JavaLangObject) {
scope.problemReporter().implicitObjectBoundNoNullDefault(this);
@@ -911,7 +911,7 @@ protected void checkNullConstraints(Scope scope, Substitution substitution, Type
}
protected void checkIllegalNullAnnotation(Scope scope) {
if (this.resolvedType.leafComponentType().isBaseType() && hasNullTypeAnnotation(AnnotationPosition.LEAF_TYPE))
- scope.problemReporter().illegalAnnotationForBaseType(this, this.annotations[0], this.resolvedType.tagBits & TagBits.AnnotationNullMASK);
+ scope.problemReporter().illegalAnnotationForBaseType(this, this.annotations[0], this.resolvedType.tagBits & TagBits.AnnotationNullMASK);
}
/** Retrieve the null annotation that has been translated to the given nullTagBits. */
public Annotation findAnnotation(long nullTagBits) {
@@ -948,7 +948,7 @@ public static boolean containsNullAnnotation(Annotation[] annotations) {
return true;
}
}
- return false;
+ return false;
}
public TypeReference[] getTypeReferences() {
return new TypeReference [] { this };
@@ -963,9 +963,9 @@ private char[] getTypeName(int index) {
CharOperation.NO_CHAR;
}
/**
- * Checks to see if the declaration uses 'var' as type name
+ * Checks to see if the declaration uses 'var' as type name
* @param scope Relevant scope, for error reporting
- * @return true, if source level is Java 10 or above and the type name is just 'var', false otherwise
+ * @return true, if source level is Java 10 or above and the type name is just 'var', false otherwise
*/
public boolean isTypeNameVar(Scope scope) {
CompilerOptions compilerOptions = scope != null ? scope.compilerOptions() : null;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnionTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnionTypeReference.java
index 49e08f05a..cb9b2e838 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnionTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnionTypeReference.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Stephan Herrmann - Contribution for
@@ -49,7 +49,7 @@ public class UnionTypeReference extends TypeReference {
@Override
public TypeBinding resolveType(BlockScope scope, boolean checkBounds, int location) {
- // return the lub (least upper bound of all type binding)
+ // return the lub (least upper bound of all type binding)
int length = this.typeReferences.length;
TypeBinding[] allExceptionTypes = new TypeBinding[length];
boolean hasError = false;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnlikelyArgumentCheck.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnlikelyArgumentCheck.java
index f8ba8be90..7eebf7418 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnlikelyArgumentCheck.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnlikelyArgumentCheck.java
@@ -133,7 +133,7 @@ public class UnlikelyArgumentCheck {
ReferenceBinding argumentCollectionType = argumentType
.findSuperTypeOriginatingFrom(TypeIds.T_JavaUtilCollection, false);
if (collectionType != null && argumentCollectionType != null
- && argumentCollectionType.isParameterizedTypeWithActualArguments()
+ && argumentCollectionType.isParameterizedTypeWithActualArguments()
&& collectionType.isParameterizedTypeWithActualArguments()) {
return new UnlikelyArgumentCheck(suspect,
((ParameterizedTypeBinding) argumentCollectionType).typeArguments()[0],
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java
index 84f301c39..000bd31b1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java
@@ -10,7 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Stephan Herrmann - Contributions for
+ * Stephan Herrmann - Contributions for
* bug 319201 - [null] no warning when unboxing SingleNameReference causes NPE
* bug 349326 - [1.7] new warning for missing try-with-resources
* bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null"
@@ -63,7 +63,7 @@ public class WhileStatement extends Statement {
this.preCondInitStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo);
LoopingFlowContext condLoopContext;
FlowInfo condInfo = flowInfo.nullInfoLessUnconditionalCopy();
-
+
// we need to collect the contribution to nulls of the coming paths through the
// loop, be they falling through normally or branched to break, continue labels
// or catch blocks
@@ -312,7 +312,7 @@ public class WhileStatement extends Statement {
boolean isConditionOptimizedTrue = cst == null ? true : cst != Constant.NotAConstant && cst.booleanValue() == true;
return (isConditionTrue || isConditionOptimizedTrue) && (this.action == null || !this.action.breaksOut(null));
}
-
+
@Override
public boolean completesByContinue() {
return this.action.continuesAtOuterLabel();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java
index 42fd68e0f..15caa6a31 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java
@@ -79,11 +79,11 @@ public class Wildcard extends SingleTypeReference {
}
this.resolvedType = scope.environment().createWildcard(genericType, rank, boundType, null /*no extra bound*/, this.kind);
resolveAnnotations(scope, 0); // no defaultNullness for wildcards
-
+
if(scope.environment().usesNullTypeAnnotations()) {
((WildcardBinding)this.resolvedType).evaluateNullAnnotations(scope, this);
}
-
+
return this.resolvedType;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/YieldStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/YieldStatement.java
index 8adc75c5f..14e6fc9bb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/YieldStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/YieldStatement.java
@@ -41,7 +41,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
// lookup the null label, this should answer the returnContext - for implicit yields, the nesting
- // doesn't occur since it immediately follow '->' and hence identical to default break - ie the
+ // doesn't occur since it immediately follow '->' and hence identical to default break - ie the
// immediate breakable context is guaranteed to be the one intended;
// while explicit yield should move up the parent to the switch expression.
FlowContext targetContext = this.isImplicit ? flowContext.getTargetContextForDefaultBreak() :
@@ -124,7 +124,7 @@ public void resolve(BlockScope scope) {
if (this.expression == null) {
//currentScope.problemReporter().switchExpressionYieldMissingExpression(this);
return;
-
+
}
if (this.switchExpression != null || this.isImplicit) {
if (this.switchExpression == null && this.isImplicit && !this.expression.statementExpression()) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java
index 8640bc5a1..a47853e01 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java
@@ -13,7 +13,7 @@
* Fraunhofer FIRST - extended API and implementation
* Technical University Berlin - extended API and implementation
* Jesper S Moller - Contributions for
- * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
+ * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
* Bug 406982 - [1.8][compiler] Generation of MethodParameters Attribute in classfile
* Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
* Bug 405104 - [1.8][compiler][codegen] Implement support for serializeable lambdas
@@ -64,7 +64,7 @@ public interface ClassFileConstants {
int ACC_TRANSITIVE = 0x0020;
int ACC_STATIC_PHASE = 0x0040;
int ACC_SYNTHETIC = 0x1000;
-
+
/**
* Other VM flags.
*/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java
index 38700ef74..eb424c12e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java
@@ -811,7 +811,7 @@ public char[] getEnclosingMethod() {
if (this.enclosingMethod == null) {
// read the name
StringBuffer buffer = new StringBuffer();
-
+
int nameAndTypeOffset = this.constantPoolOffsets[this.enclosingNameAndTypeIndex];
int utf8Offset = this.constantPoolOffsets[u2At(nameAndTypeOffset + 1)];
buffer.append(utf8At(utf8Offset + 3, u2At(utf8Offset + 1)));
@@ -849,9 +849,9 @@ public char[] getModule() {
return this.moduleName;
}
/**
- * Returns the module declaration that this class file represents. This will be
+ * Returns the module declaration that this class file represents. This will be
* null for non module-info class files.
- *
+ *
* @return the module declaration this represents
*/
public IBinaryModule getModuleDeclaration() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ComponentInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ComponentInfo.java
index 7fe4459dd..f357ad2dc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ComponentInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ComponentInfo.java
@@ -37,7 +37,7 @@ public class ComponentInfo extends ClassFileStruct implements IComponent, Compar
public static ComponentInfo createComponent(byte classFileBytes[], int offsets[], int offset, long version) {
ComponentInfo componentInfo = new ComponentInfo(classFileBytes, offsets, offset, version);
-
+
int attributesCount = componentInfo.u2At(4);
int readOffset = 6;
AnnotationInfo[] annotations = null;
@@ -90,7 +90,7 @@ public static ComponentInfo createComponent(byte classFileBytes[], int offsets[]
readOffset += (6 + componentInfo.u4At(readOffset + 2));
}
componentInfo.attributeBytes = readOffset;
-
+
if (typeAnnotations != null)
return new ComponentInfoWithTypeAnnotation(componentInfo, annotations, typeAnnotations);
if (annotations != null)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationDecorator.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationDecorator.java
index d67ce1296..afcef9d87 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationDecorator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationDecorator.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Stefan Xenos <sxenos@gmail.com> (Google) - initial API and implementation
*******************************************************************************/
@@ -239,7 +239,7 @@ public class ExternalAnnotationDecorator implements IBinaryType {
* annotations is associated. This provider is constructed using the given basePath, which is either a directory
* holding .eea text files, or a zip file of entries of the same format. If no such provider could be constructed,
* then the original binary type is returned unchanged.
- *
+ *
* @param toDecorate
* the binary type to wrap, if needed
* @param basePath
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationProvider.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationProvider.java
index a40a380fd..8dbd7d95d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationProvider.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationProvider.java
@@ -59,7 +59,7 @@ public class ExternalAnnotationProvider {
Map<String,String> supertypeAnnotationSources;
private Map<String,String> methodAnnotationSources;
private Map<String,String> fieldAnnotationSources;
-
+
/**
* Create and initialize.
* @param input open input stream to read the annotations from, will be closed by the constructor.
@@ -86,7 +86,7 @@ public class ExternalAnnotationProvider {
this.typeParametersAnnotationSource = line.substring(TYPE_PARAMETER_PREFIX.length());
if ((line = reader.readLine()) == null)
return;
- }
+ }
}
String pendingLine;
do {
@@ -171,7 +171,7 @@ public class ExternalAnnotationProvider {
int tail = line.indexOf(' ');
if (tail == -1)
tail = line.indexOf('\t');
- if (tail != -1)
+ if (tail != -1)
return line.substring(0, tail);
return line;
}
@@ -257,7 +257,7 @@ public class ExternalAnnotationProvider {
public ITypeAnnotationWalker toTypeParameter(boolean isClassTypeParameter, int rank) {
String source = ExternalAnnotationProvider.this.typeParametersAnnotationSource;
if (source != null) {
- if (this.typeParametersWalker == null)
+ if (this.typeParametersWalker == null)
this.typeParametersWalker = new TypeParametersAnnotationWalker(source.toCharArray(), 0, 0, null, this.environment);
return this.typeParametersWalker.toTypeParameter(isClassTypeParameter, rank);
}
@@ -305,7 +305,7 @@ public class ExternalAnnotationProvider {
}
abstract class BasicAnnotationWalker implements ITypeAnnotationWalker {
-
+
char[] source;
SignatureWrapper wrapper;
int pos;
@@ -319,7 +319,7 @@ public class ExternalAnnotationProvider {
this.environment = environment;
initAnnotations(environment);
}
-
+
SignatureWrapper wrapperWithStart(int start) {
if (this.wrapper == null)
this.wrapper = new SignatureWrapper(this.source);
@@ -362,10 +362,10 @@ public class ExternalAnnotationProvider {
}
int next = this.prevTypeArgStart;
switch (this.source[next]) {
- case '*':
+ case '*':
next = skipNullAnnotation(next+1);
break;
- case '-':
+ case '-':
case '+':
next = skipNullAnnotation(next+1);
//$FALL-THROUGH$
@@ -380,13 +380,13 @@ public class ExternalAnnotationProvider {
@Override
public ITypeAnnotationWalker toWildcardBound() {
switch (this.source[this.pos]) {
- case '-':
+ case '-':
case '+':
int newPos = skipNullAnnotation(this.pos+1);
return new MethodAnnotationWalker(this.source, newPos, this.environment);
default: // includes unbounded '*'
return ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER;
- }
+ }
}
@Override
@@ -419,7 +419,7 @@ public class ExternalAnnotationProvider {
case NONNULL:
return new IBinaryAnnotation[]{ ExternalAnnotationProvider.this.NONNULL_ANNOTATION };
}
- }
+ }
}
return NO_ANNOTATIONS;
}
@@ -431,7 +431,7 @@ public class ExternalAnnotationProvider {
case NULLABLE:
return cur+1;
default:
- return cur;
+ return cur;
}
}
}
@@ -501,7 +501,7 @@ public class ExternalAnnotationProvider {
System.arraycopy(rankStarts, 0, this.rankStarts = new int[curRank], 0, curRank);
}
}
-
+
@Override
public ITypeAnnotationWalker toTypeParameter(boolean isClassTypeParameter, int rank) {
if (rank == this.currentRank)
@@ -564,7 +564,7 @@ public class ExternalAnnotationProvider {
return new IBinaryAnnotation[]{ ExternalAnnotationProvider.this.NULLABLE_ANNOTATION };
case NONNULL:
return new IBinaryAnnotation[]{ ExternalAnnotationProvider.this.NONNULL_ANNOTATION };
- }
+ }
}
return super.getAnnotationsAtCursor(currentTypeId, mayApplyArrayContentsDefaultNullness);
}
@@ -611,7 +611,7 @@ public class ExternalAnnotationProvider {
MethodAnnotationWalker(char[] source, int pos, LookupEnvironment environment) {
super(source, pos, environment);
}
-
+
int typeEnd(int start) {
while (this.source[start] == '[') {
start++;
@@ -621,7 +621,7 @@ public class ExternalAnnotationProvider {
int end = wrapper1.skipAngleContents(wrapper1.computeEnd());
return end;
}
-
+
@Override
public ITypeAnnotationWalker toTypeParameter(boolean isClassTypeParameter, int rank) {
if (this.source[0] == '<') {
@@ -689,7 +689,7 @@ public class ExternalAnnotationProvider {
return count;
}
}
-
+
class FieldAnnotationWalker extends BasicAnnotationWalker {
public FieldAnnotationWalker(char[] source, int pos, LookupEnvironment environment) {
super(source, pos, environment);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java
index c265f2d06..41d60c6e1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java
@@ -59,7 +59,7 @@ public class FieldInfo extends ClassFileStruct implements IBinaryField, Comparab
public static FieldInfo createField(byte classFileBytes[], int offsets[], int offset, long version) {
FieldInfo fieldInfo = new FieldInfo(classFileBytes, offsets, offset, version);
-
+
int attributesCount = fieldInfo.u2At(6);
int readOffset = 8;
AnnotationInfo[] annotations = null;
@@ -112,7 +112,7 @@ public static FieldInfo createField(byte classFileBytes[], int offsets[], int of
readOffset += (6 + fieldInfo.u4At(readOffset + 2));
}
fieldInfo.attributeBytes = readOffset;
-
+
if (typeAnnotations != null)
return new FieldInfoWithTypeAnnotation(fieldInfo, annotations, typeAnnotations);
if (annotations != null)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java
index d1569bddc..aad385dee 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java
@@ -319,7 +319,7 @@ static AnnotationInfo[][] decodeParamAnnotations(int offset, boolean runtimeVisi
* @param classFileBytes byte[]
* @param offsets int[]
* @param offset int
- * @param version class file version
+ * @param version class file version
*/
protected MethodInfo (byte classFileBytes[], int offsets[], int offset, long version) {
super(classFileBytes, offsets, offset);
@@ -563,7 +563,7 @@ private synchronized void readModifierRelatedAttributes() {
* @param readOffset
* @param aStructOffset (subtract when indexing via constantPoolOffsets)
* @param someConstantPoolOffsets
- * @return (visibility modifiers | HAVE_OT_MODIFIERS) or 0
+ * @return (visibility modifiers | HAVE_OT_MODIFIERS) or 0
*/
long readOTAttribute(
char[] attributeName,
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ModuleInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ModuleInfo.java
index aa091f8a8..f2807b7da 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ModuleInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ModuleInfo.java
@@ -280,7 +280,7 @@ public class ModuleInfo extends ClassFileStruct implements IBinaryModule {
}
@Override
public boolean equals(Object o) {
- if (this == o)
+ if (this == o)
return true;
if (!(o instanceof IModule.IModuleReference))
return false;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/NonNullDefaultAwareTypeAnnotationWalker.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/NonNullDefaultAwareTypeAnnotationWalker.java
index ad0f05079..5cc61289e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/NonNullDefaultAwareTypeAnnotationWalker.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/NonNullDefaultAwareTypeAnnotationWalker.java
@@ -34,12 +34,12 @@ public class NonNullDefaultAwareTypeAnnotationWalker extends TypeAnnotationWalke
private final boolean isEmpty;
private final IBinaryAnnotation nonNullAnnotation;
private final LookupEnvironment environment;
-
+
private boolean nextIsDefaultLocation;
private boolean nextIsTypeBound;
private boolean nextArrayContentIsNonNull;
-
+
/** Create initial walker with non-empty type annotations. */
public NonNullDefaultAwareTypeAnnotationWalker(IBinaryTypeAnnotation[] typeAnnotations,
int defaultNullness, LookupEnvironment environment) {
@@ -52,7 +52,7 @@ public class NonNullDefaultAwareTypeAnnotationWalker extends TypeAnnotationWalke
this.isEmpty = false;
this.currentArrayContentIsNonNull = false;
}
-
+
/** Create an initial walker without 'real' type annotations, but with a nonnull default. */
public NonNullDefaultAwareTypeAnnotationWalker(int defaultNullness, LookupEnvironment environment) {
this(defaultNullness, getNonNullAnnotation(environment), false, false, environment, false);
@@ -84,7 +84,7 @@ public class NonNullDefaultAwareTypeAnnotationWalker extends TypeAnnotationWalke
this.environment = environment;
this.currentArrayContentIsNonNull = this.nextArrayContentIsNonNull = currentArrayContentIsNonNull;
}
-
+
private static IBinaryAnnotation getNonNullAnnotation(LookupEnvironment environment) {
final char[] nonNullAnnotationName = CharOperation.concat(
'L', CharOperation.concatWith(environment.getNonNullAnnotationName(), '/'), ';');
@@ -111,7 +111,7 @@ public class NonNullDefaultAwareTypeAnnotationWalker extends TypeAnnotationWalke
return this;
// are we running out of real type annotations?
if (newMatches == 0 || this.typeAnnotations == null || this.typeAnnotations.length == 0)
- return new NonNullDefaultAwareTypeAnnotationWalker(this.defaultNullness, this.nonNullAnnotation,
+ return new NonNullDefaultAwareTypeAnnotationWalker(this.defaultNullness, this.nonNullAnnotation,
this.nextIsDefaultLocation, this.nextIsTypeBound, this.environment, this.nextArrayContentIsNonNull);
// proceed as normal, but pass on our specific fields, too:
return new NonNullDefaultAwareTypeAnnotationWalker(this.typeAnnotations, newMatches, newPathPtr,
@@ -123,7 +123,7 @@ public class NonNullDefaultAwareTypeAnnotationWalker extends TypeAnnotationWalke
this.nextArrayContentIsNonNull = this.currentArrayContentIsNonNull;
}
}
-
+
@Override
public ITypeAnnotationWalker toSupertype(short index, char[] superTypeSignature) {
if (this.isEmpty) return restrict(this.matches, this.pathPtr);
@@ -143,7 +143,7 @@ public class NonNullDefaultAwareTypeAnnotationWalker extends TypeAnnotationWalke
if (this.isEmpty) return restrict(this.matches, this.pathPtr);
return super.toField();
}
-
+
@Override
public ITypeAnnotationWalker toMethodReturn() {
// don't set nextIsDefaultLocation, because signature-level nullness is handled by ImplicitNullAnnotationVerifier (triggered per invocation via MessageSend.resolveType() et al)
@@ -225,7 +225,7 @@ public class NonNullDefaultAwareTypeAnnotationWalker extends TypeAnnotationWalke
}
return normalAnnotations;
}
-
+
@Override
public ITypeAnnotationWalker toNextArrayDimension() {
boolean hasNNBDForArrayContents = (this.defaultNullness & Binding.DefaultLocationArrayContents) != 0;
@@ -255,12 +255,12 @@ public class NonNullDefaultAwareTypeAnnotationWalker extends TypeAnnotationWalke
} else {
if (walker instanceof TypeAnnotationWalker) {
TypeAnnotationWalker typeAnnotationWalker = (TypeAnnotationWalker) walker;
-
+
IBinaryAnnotation nonNullAnnotation2;
if (walker instanceof NonNullDefaultAwareTypeAnnotationWalker) {
NonNullDefaultAwareTypeAnnotationWalker nonNullDefaultAwareTypeAnnotationWalker = (NonNullDefaultAwareTypeAnnotationWalker) walker;
if(nonNullDefaultAwareTypeAnnotationWalker.isEmpty) {
- return new NonNullDefaultAwareTypeAnnotationWalker(defaultNullness, environment);
+ return new NonNullDefaultAwareTypeAnnotationWalker(defaultNullness, environment);
}
nonNullAnnotation2 = nonNullDefaultAwareTypeAnnotationWalker.nonNullAnnotation;
} else {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java
index e0d84a176..ba20fb026 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java
@@ -22,38 +22,38 @@ import org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation;
/**
* The TypeAnnotationInfo class does not currently support type annotations within code
- * blocks (those that have a target type of 0x40 and higher) - it is not yet clear that
+ * blocks (those that have a target type of 0x40 and higher) - it is not yet clear that
* these need to be accessible.
*/
public class TypeAnnotationInfo extends ClassFileStruct implements IBinaryTypeAnnotation {
private AnnotationInfo annotation;
-
+
private int targetType = 0;
-
+
// info is used in different ways:
// TargetType 0x00: CLASS_TYPE_PARAMETER: type parameter index
- // TargetType 0x01: METHOD_TYPE_PARAMETER: type parameter index
+ // TargetType 0x01: METHOD_TYPE_PARAMETER: type parameter index
// TargetType 0x10: CLASS_EXTENDS: supertype index (-1 = superclass, 0..N superinterface)
// TargetType 0x11: CLASS_TYPE_PARAMETER_BOUND: type parameter index
// TargetType 0x12: METHOD_TYPE_PARAMETER_BOUND: type parameter index
// TargetType 0x16: METHOD_FORMAL_PARAMETER: method formal parameter index
// TargetType 0x17: THROWS: throws type index
private int info;
-
+
// TargetType 0x11: CLASS_TYPE_PARAMETER_BOUND: bound index
// TargetType 0x12: METHOD_TYPE_PARAMETER_BOUND: bound index
private int info2;
-
+
private int[] typePath; // each pair of ints in the array is a type path entry
-
+
int readOffset = 0;
-
-
+
+
TypeAnnotationInfo(byte[] classFileBytes, int[] contantPoolOffsets, int offset) {
super(classFileBytes, contantPoolOffsets, offset);
}
-
+
TypeAnnotationInfo(byte[] classFileBytes, int[] contantPoolOffsets, int offset, boolean runtimeVisible, boolean populate) {
this(classFileBytes, contantPoolOffsets, offset);
this.readOffset = 0;
@@ -64,30 +64,30 @@ TypeAnnotationInfo(byte[] classFileBytes, int[] contantPoolOffsets, int offset,
this.info = u1At(1); // typeParameterIndex
this.readOffset += 2;
break;
-
+
case AnnotationTargetTypeConstants.CLASS_EXTENDS:
this.info = u2At(1); // supertypeIndex
this.readOffset += 3;
break;
-
+
case AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER_BOUND:
case AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER_BOUND:
this.info = u1At(1); // typeParameterIndex
this.info2 = u1At(2); // boundIndex;
this.readOffset += 3;
break;
-
+
case AnnotationTargetTypeConstants.FIELD:
case AnnotationTargetTypeConstants.METHOD_RETURN:
case AnnotationTargetTypeConstants.METHOD_RECEIVER:
this.readOffset ++;
break;
-
+
case AnnotationTargetTypeConstants.METHOD_FORMAL_PARAMETER :
this.info = u1At(1); // methodFormalParameterIndex
this.readOffset += 2;
break;
-
+
case AnnotationTargetTypeConstants.THROWS :
this.info = u2At(1); // throwsTypeIndex
this.readOffset += 3;
@@ -204,7 +204,7 @@ public boolean equals(Object obj) {
if (this.targetType != other.targetType) {
return false;
}
-
+
if (this.info != other.info) {
return false;
}
@@ -212,11 +212,11 @@ public boolean equals(Object obj) {
if (this.info2 != other.info2) {
return false;
}
-
+
if (!Arrays.equals(this.typePath, other.typePath)) {
return false;
}
-
+
return this.annotation.equals(other.annotation);
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationWalker.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationWalker.java
index 28bfcd837..d5fd76993 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationWalker.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationWalker.java
@@ -46,7 +46,7 @@ public class TypeAnnotationWalker implements ITypeAnnotationWalker {
}
// ==== filter by top-level targetType: ====
-
+
@Override
public ITypeAnnotationWalker toField() {
return toTarget(AnnotationTargetTypeConstants.FIELD);
@@ -92,7 +92,7 @@ public class TypeAnnotationWalker implements ITypeAnnotationWalker {
newMatches &= ~mask;
}
}
- return restrict(newMatches, 0);
+ return restrict(newMatches, 0);
}
@Override
@@ -110,7 +110,7 @@ public class TypeAnnotationWalker implements ITypeAnnotationWalker {
newMatches &= ~mask;
}
}
- return restrict(newMatches, 0);
+ return restrict(newMatches, 0);
}
@Override
@@ -126,10 +126,10 @@ public class TypeAnnotationWalker implements ITypeAnnotationWalker {
newMatches &= ~mask;
}
}
- return restrict(newMatches, 0);
+ return restrict(newMatches, 0);
}
-
-
+
+
/**
* {@inheritDoc}
* <p>(superTypesSignature is ignored in this implementation).</p>
@@ -147,7 +147,7 @@ public class TypeAnnotationWalker implements ITypeAnnotationWalker {
newMatches &= ~mask;
}
}
- return restrict(newMatches, 0);
+ return restrict(newMatches, 0);
}
@Override
@@ -163,7 +163,7 @@ public class TypeAnnotationWalker implements ITypeAnnotationWalker {
newMatches &= ~mask;
}
}
- return restrict(newMatches, 0);
+ return restrict(newMatches, 0);
}
@Override
@@ -179,7 +179,7 @@ public class TypeAnnotationWalker implements ITypeAnnotationWalker {
newMatches &= ~mask;
}
}
- return restrict(newMatches, 0);
+ return restrict(newMatches, 0);
}
// ==== descending into details: ====
@@ -195,13 +195,13 @@ public class TypeAnnotationWalker implements ITypeAnnotationWalker {
for (int i = 0; i < length; i++, mask = mask << 1) {
IBinaryTypeAnnotation candidate = this.typeAnnotations[i];
int[] path = candidate.getTypePath();
- if (this.pathPtr >= path.length
+ if (this.pathPtr >= path.length
|| path[this.pathPtr] != AnnotationTargetTypeConstants.TYPE_ARGUMENT
|| path[this.pathPtr+1] != rank) {
newMatches &= ~mask;
}
}
- return restrict(newMatches, this.pathPtr+2);
+ return restrict(newMatches, this.pathPtr+2);
}
@Override
@@ -214,19 +214,19 @@ public class TypeAnnotationWalker implements ITypeAnnotationWalker {
for (int i = 0; i < length; i++, mask = mask << 1) {
IBinaryTypeAnnotation candidate = this.typeAnnotations[i];
int[] path = candidate.getTypePath();
- if (this.pathPtr >= path.length
+ if (this.pathPtr >= path.length
|| path[this.pathPtr] != AnnotationTargetTypeConstants.WILDCARD_BOUND) {
newMatches &= ~mask;
}
}
- return restrict(newMatches, this.pathPtr+2);
+ return restrict(newMatches, this.pathPtr+2);
}
@Override
public ITypeAnnotationWalker toNextArrayDimension() {
return toNextDetail(AnnotationTargetTypeConstants.NEXT_ARRAY_DIMENSION);
}
-
+
@Override
public ITypeAnnotationWalker toNextNestedType() {
return toNextDetail(AnnotationTargetTypeConstants.NEXT_NESTED_TYPE);
@@ -250,9 +250,9 @@ public class TypeAnnotationWalker implements ITypeAnnotationWalker {
}
return restrict(newMatches, this.pathPtr+2);
}
-
+
// ==== leaves: the actual annotations: ====
-
+
@Override
public IBinaryAnnotation[] getAnnotationsAtCursor(int currentTypeId, boolean mayApplyArrayContentsDefaultNullness) {
int length = this.typeAnnotations.length;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AttributeNamesConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AttributeNamesConstants.java
index f936f904f..b069105dc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AttributeNamesConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AttributeNamesConstants.java
@@ -11,7 +11,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Jesper S Moller - Contributions for
- * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
+ * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
* Bug 406973 - [compiler] Parse MethodParameters attribute
* Andy Clement - Contributions for
* Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
index 320ed7aa3..5be578078 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
@@ -17,7 +17,7 @@
* bug 391376 - [1.8] check interaction of default methods with bridge methods and generics
* bug 421543 - [1.8][compiler] Compiler fails to recognize default method being turned into abstract by subtytpe
* Jesper S Moller - Contributions for
- * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
+ * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
* Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
* Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
* Bug 409247 - [1.8][compiler] Verify error with code allocating multidimensional array
@@ -152,12 +152,12 @@ public class CodeStream {
protected long targetLevel;
public LocalVariableBinding[] visibleLocals = new LocalVariableBinding[LOCALS_INCREMENT];
-
+
int visibleLocalsCount;
-
+
// to handle goto_w
- public boolean wideMode = false;
-
+ public boolean wideMode = false;
+
public CodeStream(ClassFile givenClassFile) {
this.targetLevel = givenClassFile.targetJDK;
this.generateAttributes = givenClassFile.produceAttributes;
@@ -2155,7 +2155,7 @@ public void generateImplicitConversion(int implicitConversionCode) {
int runtimeType = (implicitConversionCode & TypeIds.IMPLICIT_CONVERSION_MASK) >> 4;
checkcast(runtimeType);
generateUnboxingConversion(runtimeType);
- break;
+ break;
}
if ((implicitConversionCode & TypeIds.BOXING) != 0) {
// need to unbox/box the constant
@@ -2546,10 +2546,10 @@ public void generateSyntheticBodyForFactoryMethod(SyntheticMethodBinding methodB
MethodBinding constructorBinding = methodBinding.targetMethod;
TypeBinding[] parameters = methodBinding.parameters;
int length = parameters.length;
-
+
new_(constructorBinding.declaringClass);
dup();
-
+
int resolvedPosition = 0;
for (int i = 0; i < length; i++) {
TypeBinding parameter;
@@ -2566,7 +2566,7 @@ public void generateSyntheticBodyForFactoryMethod(SyntheticMethodBinding methodB
}
for (int i = 0; i < methodBinding.fakePaddedParameters; i++)
aconst_null();
-
+
invoke(Opcodes.OPC_invokespecial, constructorBinding, null /* default declaringClass */);
areturn();
}
@@ -2594,7 +2594,7 @@ public void generateSyntheticBodyForEnumValueOf(SyntheticMethodBinding methodBin
public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding methodBinding,SyntheticMethodBinding[] syntheticMethodBindings) {
initializeMaxLocals(methodBinding);
- // Compute a map of hashcodes to a list of synthetic methods whose names share a hashcode
+ // Compute a map of hashcodes to a list of synthetic methods whose names share a hashcode
Map hashcodesTosynthetics = new LinkedHashMap();
for (int i=0,max=syntheticMethodBindings.length;i<max;i++) {
SyntheticMethodBinding syntheticMethodBinding = syntheticMethodBindings[i];
@@ -2611,7 +2611,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
}
}
ClassScope scope = ((SourceTypeBinding)methodBinding.declaringClass).scope;
-
+
// Generate the first switch, on method name hashcode
aload_0();
invoke(Opcodes.OPC_invokevirtual, 1, 1, ConstantPool.JavaLangInvokeSerializedLambdaConstantPoolName, ConstantPool.GetImplMethodName, ConstantPool.GetImplMethodNameSignature);
@@ -2626,7 +2626,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
addVariable(lvb2);
aload_1();
invokeStringHashCode();
-
+
BranchLabel label = new BranchLabel(this);
CaseLabel defaultLabel = new CaseLabel(this);
int numberOfHashcodes = hashcodesTosynthetics.size();
@@ -2648,7 +2648,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
sort(localKeysCopy, 0, numberOfHashcodes-1, sortedIndexes);
// TODO need to use a tableswitch at some size threshold?
lookupswitch(defaultLabel, keys, sortedIndexes, switchLabels);
- // TODO cope with multiple names that share the same hashcode
+ // TODO cope with multiple names that share the same hashcode
hashcodeIterator = hashcodes.iterator();
index = 0;
while (hashcodeIterator.hasNext()) {
@@ -2837,7 +2837,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
}
}
}
-
+
removeVariable(lvb1);
removeVariable(lvb2);
defaultLabel.place();
@@ -2845,7 +2845,7 @@ public void generateSyntheticBodyForDeserializeLambda(SyntheticMethodBinding met
// Code: throw new IllegalArgumentException("Invalid lambda deserialization")
new_(scope.getJavaLangIllegalArgumentException());
dup();
- ldc("Invalid lambda deserialization"); //$NON-NLS-1$ // TODO into a constant?
+ ldc("Invalid lambda deserialization"); //$NON-NLS-1$ // TODO into a constant?
// invokespecial: java.lang.IllegalArgumentException.<init>(Ljava/lang/String;)V
invoke(
Opcodes.OPC_invokespecial,
@@ -2935,8 +2935,8 @@ public void generateSyntheticBodyForFieldReadAccess(SyntheticMethodBinding acces
initializeMaxLocals(accessMethod);
FieldBinding fieldBinding = accessMethod.targetReadField;
// target method declaring class may not be accessible (247953);
- TypeBinding declaringClass = accessMethod.purpose == SyntheticMethodBinding.SuperFieldReadAccess
- ? accessMethod.declaringClass.superclass()
+ TypeBinding declaringClass = accessMethod.purpose == SyntheticMethodBinding.SuperFieldReadAccess
+ ? accessMethod.declaringClass.superclass()
: accessMethod.declaringClass;
//{ObjectTeams: role field?
if (accessMethod instanceof SyntheticRoleFieldAccess) {
@@ -2944,7 +2944,7 @@ public void generateSyntheticBodyForFieldReadAccess(SyntheticMethodBinding acces
} else
// SH}
if (fieldBinding.isStatic()) {
- fieldAccess(Opcodes.OPC_getstatic, fieldBinding, declaringClass);
+ fieldAccess(Opcodes.OPC_getstatic, fieldBinding, declaringClass);
} else {
aload_0();
fieldAccess(Opcodes.OPC_getfield, fieldBinding, declaringClass);
@@ -2978,9 +2978,9 @@ public void generateSyntheticBodyForFieldWriteAccess(SyntheticMethodBinding acce
initializeMaxLocals(accessMethod);
FieldBinding fieldBinding = accessMethod.targetWriteField;
// target method declaring class may not be accessible (247953);
- TypeBinding declaringClass = accessMethod.purpose == SyntheticMethodBinding.SuperFieldWriteAccess
- ? accessMethod.declaringClass.superclass()
- : accessMethod.declaringClass;
+ TypeBinding declaringClass = accessMethod.purpose == SyntheticMethodBinding.SuperFieldWriteAccess
+ ? accessMethod.declaringClass.superclass()
+ : accessMethod.declaringClass;
//{ObjectTeams: role field?
if (accessMethod instanceof SyntheticRoleFieldAccess) {
((SyntheticRoleFieldAccess)accessMethod).generateBodyForWrite(fieldBinding, this);
@@ -3053,7 +3053,7 @@ public void generateSyntheticBodyForMethodAccess(SyntheticMethodBinding accessMe
// qualified super "X.super.foo()" targets methods from superclass
|| accessMethod.purpose == SyntheticMethodBinding.SuperMethodAccess){
// target method declaring class may not be accessible (247953);
- TypeBinding declaringClass = accessMethod.purpose == SyntheticMethodBinding.SuperMethodAccess
+ TypeBinding declaringClass = accessMethod.purpose == SyntheticMethodBinding.SuperMethodAccess
? findDirectSuperTypeTowards(accessMethod, targetMethod)
: accessMethod.declaringClass;
//{ObjectTeams: private methods also occur in role interfaces:
@@ -3108,7 +3108,7 @@ ReferenceBinding findDirectSuperTypeTowards(SyntheticMethodBinding accessMethod,
ReferenceBinding currentType = accessMethod.declaringClass;
ReferenceBinding superclass = currentType.superclass();
if (targetMethod.isDefaultMethod()) {
- // could be inherited via superclass *or* a super interface
+ // could be inherited via superclass *or* a super interface
ReferenceBinding targetType = targetMethod.declaringClass;
if (superclass.isCompatibleWith(targetType))
return superclass;
@@ -3218,11 +3218,11 @@ public void generateSyntheticEnclosingInstanceValues(BlockScope currentScope, Re
//compliance >= JDK1_7
if (invocationSite instanceof AllocationExpression) {
denyEnclosingArgInConstructorCall = !targetType.isLocalType();
- } else if (invocationSite instanceof ExplicitConstructorCall &&
+ } else if (invocationSite instanceof ExplicitConstructorCall &&
((ExplicitConstructorCall)invocationSite).isSuperAccess()) {
MethodScope enclosingMethodScope = currentScope.enclosingMethodScope();
denyEnclosingArgInConstructorCall = !targetType.isLocalType() && enclosingMethodScope != null
- && enclosingMethodScope.isConstructorCall;
+ && enclosingMethodScope.isConstructorCall;
} else {
denyEnclosingArgInConstructorCall = false;
}
@@ -3535,7 +3535,7 @@ public static TypeBinding getConstantPoolDeclaringClass(Scope currentScope, Fiel
return actualReceiverType.erasure();
}
- }
+ }
return constantPoolDeclaringClass;
}
@@ -3563,7 +3563,7 @@ public static TypeBinding getConstantPoolDeclaringClass(Scope currentScope, Meth
// and not from Object or implicit static method call.
if (TypeBinding.notEquals(constantPoolDeclaringClass, actualReceiverType.erasure()) && !actualReceiverType.isArrayType()) {
CompilerOptions options = currentScope.compilerOptions();
-
+
if ((options.targetJDK >= ClassFileConstants.JDK1_2
&& (options.complianceLevel >= ClassFileConstants.JDK1_4 || !(isImplicitThisReceiver && codegenBinding.isStatic()))
&& codegenBinding.declaringClass.id != TypeIds.T_JavaLangObject) // no change for Object methods
@@ -3584,7 +3584,7 @@ public static TypeBinding getConstantPoolDeclaringClass(Scope currentScope, Meth
constantPoolDeclaringClass = erasedReceiverType;
}
}
- }
+ }
}
return constantPoolDeclaringClass;
}
@@ -4357,7 +4357,7 @@ public void initializeMaxLocals(MethodBinding methodBinding) {
case TypeIds.T_double :
this.maxLocals += 2;
break;
- default:
+ default:
this.maxLocals++;
}
}
@@ -4424,7 +4424,7 @@ protected void invoke(byte opcode, int receiverAndArgsSize, int returnTypeSize,
// Hence adding explicit parameter 'isInterface', which is needed only for non-ctor invokespecial invocations
// (i.e., other clients may still call the shorter overload).
private void invoke18(byte opcode, int receiverAndArgsSize, int returnTypeSize, char[] declaringClass,
- boolean isInterface, char[] selector, char[] signature) {
+ boolean isInterface, char[] selector, char[] signature) {
this.countLabels = 0;
if (opcode == Opcodes.OPC_invokeinterface) {
// invokeinterface
@@ -4521,10 +4521,10 @@ public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declari
case TypeIds.T_long :
receiverAndArgsSize += 2;
break;
- default:
+ default:
receiverAndArgsSize++;
break;
- }
+ }
}
}
}
@@ -4532,7 +4532,7 @@ public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declari
// adding String (name) and int (ordinal)
receiverAndArgsSize += 2;
}
- }
+ }
break;
default :
return; // should not occur
@@ -4564,12 +4564,12 @@ public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declari
break;
}
invoke18(
- opcode,
- receiverAndArgsSize,
- returnTypeSize,
- declaringClass.constantPoolName(),
+ opcode,
+ receiverAndArgsSize,
+ returnTypeSize,
+ declaringClass.constantPoolName(),
declaringClass.isInterface(),
- methodBinding.selector,
+ methodBinding.selector,
methodBinding.signature(this.classFile));
//{ObjectTeams: if signature is weakened to conform to tsuper erasure, we need a cast to make the result compatible to the expected type
if ((methodBinding.otBits & IOTConstants.IsCopyOfParameterized) != 0 &&
@@ -4577,7 +4577,7 @@ public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declari
checkcast(methodBinding.returnType.erasure());
// SH}
}
-//{ObjectTeams: misguided callout-to-field accessor??
+//{ObjectTeams: misguided callout-to-field accessor??
private byte checkInvokeCalloutToField(byte opcode, SyntheticMethodBinding accessor) {
if ( ( accessor.purpose == SyntheticMethodBinding.FieldReadAccess
|| accessor.purpose == SyntheticMethodBinding.FieldWriteAccess)
@@ -4705,8 +4705,8 @@ public void invokeIterableIterator(TypeBinding iterableReceiverType) {
iterableReceiverType.isInterface() ? Opcodes.OPC_invokeinterface : Opcodes.OPC_invokevirtual,
1, // receiverAndArgsSize
1, // returnTypeSize
- iterableReceiverType.constantPoolName(),
- ConstantPool.ITERATOR_NAME,
+ iterableReceiverType.constantPoolName(),
+ ConstantPool.ITERATOR_NAME,
ConstantPool.ITERATOR_SIGNATURE);
}
@@ -4719,8 +4719,8 @@ public void invokeAutoCloseableClose(TypeBinding resourceType) {
resourceType.erasure().isInterface() ? Opcodes.OPC_invokeinterface : Opcodes.OPC_invokevirtual,
1, // receiverAndArgsSize
0, // returnTypeSize
- resourceType.constantPoolName(),
- ConstantPool.Close,
+ resourceType.constantPoolName(),
+ ConstantPool.Close,
ConstantPool.CloseSignature);
}
@@ -4729,7 +4729,7 @@ public void invokeThrowableAddSuppressed() {
2, // receiverAndArgsSize
0, // returnTypeSize
ConstantPool.JavaLangThrowableConstantPoolName,
- ConstantPool.AddSuppressed,
+ ConstantPool.AddSuppressed,
ConstantPool.AddSuppressedSignature);
}
@@ -4828,11 +4828,11 @@ public void invokeJavaLangEnumValues(TypeBinding enumBinding, ArrayBinding array
char[] signature = "()".toCharArray(); //$NON-NLS-1$
signature = CharOperation.concat(signature, arrayBinding.constantPoolName());
invoke(
- Opcodes.OPC_invokestatic,
+ Opcodes.OPC_invokestatic,
0, // receiverAndArgsSize
1, // return type size
- enumBinding.constantPoolName(),
- TypeConstants.VALUES,
+ enumBinding.constantPoolName(),
+ TypeConstants.VALUES,
signature);
}
@@ -5183,7 +5183,7 @@ public void invokeStringConcatenationToString() {
} else {
// invokespecial: java.lang.StringStringBuilder.<init>(java.langString)V
declaringClass = ConstantPool.JavaLangStringBuilderConstantPoolName;
- }
+ }
invoke(
Opcodes.OPC_invokevirtual,
1, // receiverAndArgsSize
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java
index d9e13de80..31414517b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java
@@ -11,7 +11,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Jesper S Moller - Contributions for
- * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
+ * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
* Bug 406982 - [1.8][compiler] Generation of MethodParameters Attribute in classfile
* Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit)
* Bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
@@ -275,7 +275,7 @@ public class ConstantPool implements ClassFileConstants, TypeIds {
public static final char[] METAFACTORY = "metafactory".toCharArray(); //$NON-NLS-1$
public static final char[] JAVA_LANG_INVOKE_LAMBDAMETAFACTORY_METAFACTORY_SIGNATURE = "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;".toCharArray(); //$NON-NLS-1$
public static final char[] ALTMETAFACTORY = "altMetafactory".toCharArray(); //$NON-NLS-1$
- public static final char[] JAVA_LANG_INVOKE_LAMBDAMETAFACTORY_ALTMETAFACTORY_SIGNATURE =
+ public static final char[] JAVA_LANG_INVOKE_LAMBDAMETAFACTORY_ALTMETAFACTORY_SIGNATURE =
"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;".toCharArray(); //$NON-NLS-1$
public static final char[] JavaLangInvokeSerializedLambda = "Ljava/lang/invoke/SerializedLambda;".toCharArray(); //$NON-NLS-1$
public static final char[] JavaLangInvokeSerializedLambdaConstantPoolName = "java/lang/invoke/SerializedLambda".toCharArray(); //$NON-NLS-1$
@@ -299,16 +299,16 @@ public class ConstantPool implements ClassFileConstants, TypeIds {
public static final char[] JAVA_LANG_ANNOTATION_REPEATABLE = "Ljava/lang/annotation/Repeatable;".toCharArray(); //$NON-NLS-1$
public static final char[] HashCode = "hashCode".toCharArray(); //$NON-NLS-1$
- public static final char[] HashCodeSignature = "()I".toCharArray(); //$NON-NLS-1$;
+ public static final char[] HashCodeSignature = "()I".toCharArray(); //$NON-NLS-1$;
public static final char[] Equals = "equals".toCharArray(); //$NON-NLS-1$
- public static final char[] EqualsSignature = "(Ljava/lang/Object;)Z".toCharArray(); //$NON-NLS-1$;
+ public static final char[] EqualsSignature = "(Ljava/lang/Object;)Z".toCharArray(); //$NON-NLS-1$;
public static final char[] AddSuppressed = "addSuppressed".toCharArray(); //$NON-NLS-1$;
public static final char[] AddSuppressedSignature = "(Ljava/lang/Throwable;)V".toCharArray(); //$NON-NLS-1$
public static final char[] Clone = "clone".toCharArray(); //$NON-NLS-1$
public static final char[] CloneSignature = "()Ljava/lang/Object;".toCharArray(); //$NON-NLS-1$
public static final char[] BOOTSTRAP = "bootstrap".toCharArray(); //$NON-NLS-1$
public static final char[] JAVA_LANG_RUNTIME_OBJECTMETHOD_BOOTSTRAP_SIGNATURE = "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;".toCharArray(); //$NON-NLS-1$
-
+
/**
* ConstantPool constructor comment.
*/
@@ -861,10 +861,10 @@ public class ConstantPool implements ClassFileConstants, TypeIds {
: binding.isStatic() ? MethodHandleRefKindInvokeStatic
: binding.isPrivate() ? MethodHandleRefKindInvokeSpecial
: MethodHandleRefKindInvokeVirtual;
-
+
return literalIndexForMethodHandle(referenceKind, binding.declaringClass, binding.selector, binding.signature(), isInterface);
}
-
+
public int literalIndexForMethodHandle(int referenceKind, TypeBinding declaringClass, char[] selector, char[] signature, boolean isInterface) {
int indexForMethod = literalIndexForMethod(declaringClass, selector, signature, isInterface);
@@ -874,7 +874,7 @@ public class ConstantPool implements ClassFileConstants, TypeIds {
// resize
System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length);
}
-
+
this.offsets[index] = this.currentOffset;
writeU1(MethodHandleTag);
writeU1(referenceKind);
@@ -892,7 +892,7 @@ public class ConstantPool implements ClassFileConstants, TypeIds {
// resize
System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length);
}
-
+
this.offsets[index] = this.currentOffset;
writeU1(MethodHandleTag);
writeU1(referenceKind);
@@ -904,7 +904,7 @@ public class ConstantPool implements ClassFileConstants, TypeIds {
int signatureIndex = literalIndex(descriptor);
int index = this.currentIndex++;
-
+
int length = this.offsets.length;
if (length <= index) {
// resize
@@ -1123,7 +1123,7 @@ public class ConstantPool implements ClassFileConstants, TypeIds {
}
return index;
}
-
+
/**
* @param bootstrapIndex the given bootstrap index
* @param selector the given method selector
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/MultiCatchExceptionLabel.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/MultiCatchExceptionLabel.java
index 8911f8794..b70c44d65 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/MultiCatchExceptionLabel.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/MultiCatchExceptionLabel.java
@@ -29,7 +29,7 @@ public class MultiCatchExceptionLabel extends ExceptionLabel {
public MultiCatchExceptionLabel(CodeStream codeStream, TypeBinding exceptionType) {
super(codeStream, exceptionType);
}
-
+
public void initialize(UnionTypeReference typeReference, Annotation [] annotations) {
TypeReference[] typeReferences = typeReference.typeReferences;
int length = typeReferences.length;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/Opcodes.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/Opcodes.java
index dfe0f0834..e509d670a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/Opcodes.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/Opcodes.java
@@ -10,9 +10,9 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- *
+ *
* Jesper S Moller - Contributions for
- * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
+ * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.codegen;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java
index 3e44c49bf..0a4337b7f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java
@@ -213,7 +213,7 @@ public class StackMapFrameCodeStream extends CodeStream {
/*
* Macro for building a class descriptor object... using or not a field cache to store it into... this
* sequence is responsible for building the actual class descriptor.
- *
+ *
* If the fieldCache is set, then it is supposed to be the body of a synthetic access method factoring the
* actual descriptor creation out of the invocation site (saving space). If the fieldCache is nil, then we
* are dumping the bytecode on the invocation site, since we have no way to get a hand on the field cache to
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/TypeAnnotationCodeStream.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/TypeAnnotationCodeStream.java
index 8f6085ada..32aad53c1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/TypeAnnotationCodeStream.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/TypeAnnotationCodeStream.java
@@ -38,11 +38,11 @@ public class TypeAnnotationCodeStream extends StackMapFrameCodeStream {
this.generateAttributes |= ClassFileConstants.ATTR_TYPE_ANNOTATION;
this.allTypeAnnotationContexts = new ArrayList();
}
-
+
private void addAnnotationContext(TypeReference typeReference, int info, int targetType, ArrayAllocationExpression allocationExpression) {
allocationExpression.getAllAnnotationContexts(targetType, info, this.allTypeAnnotationContexts);
}
-
+
private void addAnnotationContext(TypeReference typeReference, int info, int targetType) {
typeReference.getAllAnnotationContexts(targetType, info, this.allTypeAnnotationContexts);
}
@@ -50,7 +50,7 @@ public class TypeAnnotationCodeStream extends StackMapFrameCodeStream {
private void addAnnotationContext(TypeReference typeReference, int info, int typeIndex, int targetType) {
typeReference.getAllAnnotationContexts(targetType, info, typeIndex, this.allTypeAnnotationContexts);
}
-
+
@Override
public void instance_of(TypeReference typeReference, TypeBinding typeBinding) {
if (typeReference != null && (typeReference.bits & ASTNode.HasTypeAnnotations) != 0) {
@@ -58,7 +58,7 @@ public class TypeAnnotationCodeStream extends StackMapFrameCodeStream {
}
super.instance_of(typeReference, typeBinding);
}
-
+
@Override
public void multianewarray(
TypeReference typeReference,
@@ -78,7 +78,7 @@ public class TypeAnnotationCodeStream extends StackMapFrameCodeStream {
}
super.new_(typeReference, typeBinding);
}
-
+
@Override
public void newArray(TypeReference typeReference, ArrayAllocationExpression allocationExpression, ArrayBinding arrayBinding) {
if (typeReference != null && (typeReference.bits & ASTNode.HasTypeAnnotations) != 0) {
@@ -86,7 +86,7 @@ public class TypeAnnotationCodeStream extends StackMapFrameCodeStream {
}
super.newArray(typeReference, allocationExpression, arrayBinding);
}
-
+
@Override
public void checkcast(TypeReference typeReference, TypeBinding typeBinding, int currentPosition) {
/* We use a slightly sub-optimal generation for intersection casts by resorting to a runtime cast for every intersecting type, but in
@@ -115,7 +115,7 @@ public class TypeAnnotationCodeStream extends StackMapFrameCodeStream {
super.checkcast(null, typeBinding, currentPosition);
}
}
-
+
@Override
public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declaringClass, TypeReference[] typeArguments) {
if (typeArguments != null) {
@@ -131,9 +131,9 @@ public class TypeAnnotationCodeStream extends StackMapFrameCodeStream {
}
super.invoke(opcode, methodBinding, declaringClass, typeArguments);
}
-
+
@Override
- public void invokeDynamic(int bootStrapIndex, int argsSize, int returnTypeSize, char[] selector, char[] signature,
+ public void invokeDynamic(int bootStrapIndex, int argsSize, int returnTypeSize, char[] selector, char[] signature,
boolean isConstructorReference, TypeReference lhsTypeReference, TypeReference [] typeArguments) {
if (lhsTypeReference != null && (lhsTypeReference.bits & ASTNode.HasTypeAnnotations) != 0) {
if (isConstructorReference) {
@@ -143,7 +143,7 @@ public class TypeAnnotationCodeStream extends StackMapFrameCodeStream {
}
}
if (typeArguments != null) {
- int targetType =
+ int targetType =
isConstructorReference
? AnnotationTargetTypeConstants.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
: AnnotationTargetTypeConstants.METHOD_REFERENCE_TYPE_ARGUMENT;
@@ -162,7 +162,7 @@ public class TypeAnnotationCodeStream extends StackMapFrameCodeStream {
super.reset(givenClassFile);
this.allTypeAnnotationContexts = new ArrayList();
}
-
+
@Override
public void init(ClassFile targetClassFile) {
super.init(targetClassFile);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/VerificationTypeInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/VerificationTypeInfo.java
index 7f3be5a78..c2e2244d2 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/VerificationTypeInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/VerificationTypeInfo.java
@@ -25,55 +25,55 @@ import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
public class VerificationTypeInfo {
/**
* The tag value representing top variable info
- *
+ *
* @since 3.2
*/
public static final int ITEM_TOP = 0;
/**
* The tag value representing integer variable info
- *
+ *
* @since 3.2
*/
public static final int ITEM_INTEGER = 1;
/**
* The tag value representing float variable info
- *
+ *
* @since 3.2
*/
public static final int ITEM_FLOAT = 2;
/**
* The tag value representing double variable info
- *
+ *
* @since 3.2
*/
public static final int ITEM_DOUBLE = 3;
/**
* The tag value representing long variable info
- *
+ *
* @since 3.2
*/
public static final int ITEM_LONG = 4;
/**
* The tag value representing null variable info
- *
+ *
* @since 3.2
*/
public static final int ITEM_NULL = 5;
/**
* The tag value representing uninitialized this variable info
- *
+ *
* @since 3.2
*/
public static final int ITEM_UNINITIALIZED_THIS = 6;
/**
* The tag value representing object variable info
- *
+ *
* @since 3.2
*/
public static final int ITEM_OBJECT = 7;
/**
* The tag value representing uninitialized variable info
- *
+ *
* @since 3.2
*/
public static final int ITEM_UNINITIALIZED = 8;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/AutomaticModuleNaming.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/AutomaticModuleNaming.java
index 815bc96c2..3a624edcb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/AutomaticModuleNaming.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/AutomaticModuleNaming.java
@@ -84,7 +84,7 @@ public class AutomaticModuleNaming {
* Determine the automatic module name if no "Automatic-Module-Name" was found in the Manifest, as specified in
* {@link <a href=
* "http://download.java.net/java/jdk9/docs/api/java/lang/module/ModuleFinder.html#of-java.nio.file.Path...-">ModuleFinder.of</a>}
- *
+ *
* @param name
* the filename (or directory name)
* @param skipDirectory
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryType.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryType.java
index 9c2dd6707..0fb5989e3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryType.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryType.java
@@ -182,7 +182,7 @@ ExternalAnnotationStatus getExternalAnnotationStatus();
* Answers the "real" binary type for the given binary type.
* By default this is an identity transformation.
* Only IndexBinaryType will retrieve the bytes from disk to answer a fresh ClassFileReader.
- * @throws Exception
+ * @throws Exception
*/
default IBinaryType withClassBytes() throws Exception {
return this;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryTypeAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryTypeAnnotation.java
index 2038cbc8e..1910b7555 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryTypeAnnotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryTypeAnnotation.java
@@ -20,7 +20,7 @@ import org.eclipse.jdt.internal.compiler.codegen.AnnotationTargetTypeConstants;
* This represents class file information about an annotation instance.
*/
public interface IBinaryTypeAnnotation {
-
+
static int[] NO_TYPE_PATH = new int[0];
/**
@@ -34,42 +34,42 @@ IBinaryAnnotation getAnnotation();
int getTargetType();
/**
- *
+ *
* @return the raw type path data, each pair of ints is a type path entry
*/
int[] getTypePath();
/**
* Applicable for target type 0x10(CLASS_EXTENDS)
- *
+ *
* @return the supertype index. -1 (65535) for superclass, 0..n for superinterfaces
*/
int getSupertypeIndex();
/**
* Applicable for target type 0x00(CLASS_TYPE_PARAMETER), 0x01(METHOD_TYPE_PARAMETER)
- *
+ *
* @return the type parameter index (0 based)
*/
int getTypeParameterIndex();
/**
* Applicable for target type 0x11(CLASS_TYPE_PARAMETER_BOUND), 0x12(METHOD_TYPE_PARAMETER_BOUND)
- *
+ *
* @return the bound index
*/
int getBoundIndex();
/**
* Applicable for target type 0x16(METHOD_FORMAL_PARAMETER)
- *
+ *
* @return the method formal parameter index
*/
int getMethodFormalParameterIndex();
/**
* Applicable for target type 0x17(THROWS)
- *
+ *
* @return the throws type index
*/
int getThrowsTypeIndex();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ICompilationUnit.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ICompilationUnit.java
index a27574e55..24bd52d73 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ICompilationUnit.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ICompilationUnit.java
@@ -18,7 +18,7 @@ import org.eclipse.jdt.internal.compiler.lookup.ModuleBinding;
/**
* This interface denotes a compilation unit, providing its name and content.
- *
+ *
* <p>
* Note: This internal interface has been implemented illegally by the
* org.apache.jasper.glassfish bundle from Orbit, see
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModule.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModule.java
index bd417f0f5..11998aa7c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModule.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModule.java
@@ -70,7 +70,7 @@ public interface IModule {
public char[] name();
char[][] with();
}
-
+
public default boolean isAutomatic() {
return false;
}
@@ -92,32 +92,32 @@ public interface IModule {
public char[] name() {
return this.name;
}
-
+
@Override
public IModuleReference[] requires() {
return IModule.NO_MODULE_REFS;
}
-
+
@Override
public IPackageExport[] exports() {
return IModule.NO_EXPORTS;
}
-
+
@Override
public char[][] uses() {
return IModule.NO_USES;
}
-
+
@Override
public IService[] provides() {
return IModule.NO_PROVIDES;
}
-
+
@Override
public IPackageExport[] opens() {
return NO_OPENS;
}
-
+
@Override
public boolean isAutomatic() {
return true;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModuleAwareNameEnvironment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModuleAwareNameEnvironment.java
index 539caaba7..cbc554ee0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModuleAwareNameEnvironment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModuleAwareNameEnvironment.java
@@ -72,7 +72,7 @@ public interface IModuleAwareNameEnvironment extends INameEnvironment {
public <T> boolean matches(T elem, Predicate<T> isNamed) {
return matchesWithName(elem, isNamed, t -> true);
}
-
+
/** Get the lookup strategy corresponding to the given module name. */
public static LookupStrategy get(char[] moduleName) {
if (moduleName == ModuleBinding.ANY)
@@ -91,7 +91,7 @@ public interface IModuleAwareNameEnvironment extends INameEnvironment {
}
}
}
-
+
@Override
default NameEnvironmentAnswer findType(char[][] compoundTypeName) {
return findType(compoundTypeName, ModuleBinding.ANY);
@@ -121,7 +121,7 @@ public interface IModuleAwareNameEnvironment extends INameEnvironment {
return allNames;
}
-
+
/**
* Answer whether the given package (within the given module) contains any compilation unit.
* @param qualifiedPackageName
@@ -129,7 +129,7 @@ public interface IModuleAwareNameEnvironment extends INameEnvironment {
* @return true iff the package contains at least one compilation unit.
*/
boolean hasCompilationUnit(char[][] qualifiedPackageName, char[] moduleName, boolean checkCUs);
-
+
/** Get the module with the given name, which must denote a named module. */
IModule getModule(char[] moduleName);
char[][] getAllAutomaticModules();
@@ -142,7 +142,7 @@ public interface IModuleAwareNameEnvironment extends INameEnvironment {
default void applyModuleUpdates(IUpdatableModule module, IUpdatableModule.UpdateKind kind) { /* default: do nothing */ }
/**
- * Lists all packages in the module identified by the given, real module name
+ * Lists all packages in the module identified by the given, real module name
* (i.e., this method is implemented only for {@link LookupStrategy#Named}).
* @param moduleName
* @return array of flat, dot-separated package names
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModulePathEntry.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModulePathEntry.java
index 86f24f73a..e5eb40c0d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModulePathEntry.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IModulePathEntry.java
@@ -25,18 +25,18 @@ public interface IModulePathEntry {
/**
* Get the module that this entry contributes. May be null, for instance when this entry does not
* represent a single module
- *
+ *
* @return The module that this entry contributes or null
*/
default IModule getModule() {
return null;
}
-
+
/**
* Get the module named name from this entry. May be null
- *
+ *
* @param name - The name of the module to look up
- *
+ *
* @return The module named name or null
*/
default IModule getModule(char[] name) {
@@ -48,9 +48,9 @@ public interface IModulePathEntry {
/**
* Indicates whether this entry knows the module named name and can answer queries regarding the module
- *
+ *
* @param name The name of the module
- *
+ *
* @return True if this entry knows the module, false otherwise
*/
default boolean servesModule(char[] name) {
@@ -84,7 +84,7 @@ public interface IModulePathEntry {
/**
* Specifies whether this entry represents an automatic module.
- *
+ *
* @return true if this is an automatic module, false otherwise
*/
public default boolean isAutomaticModule() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IMultiModuleEntry.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IMultiModuleEntry.java
index 1d48ff940..ca0b105f6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IMultiModuleEntry.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IMultiModuleEntry.java
@@ -23,7 +23,7 @@ import java.util.Collection;
public interface IMultiModuleEntry extends IModulePathEntry {
/**
- * Get the module named name that this entry contributes to the module path
+ * Get the module named name that this entry contributes to the module path
*/
@Override
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/INameEnvironmentExtension.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/INameEnvironmentExtension.java
index 5fd197078..986fc82d8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/INameEnvironmentExtension.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/INameEnvironmentExtension.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,10 +18,10 @@ package org.eclipse.jdt.internal.compiler.env;
* can use to look up types, compilation units, and packages in the
* current environment. The name environment is passed to the compiler
* on creation.
- *
+ *
* This name environment adds a method to switch on/off the search for secondary types.
* Refer {@link #findType(char[], char[][], boolean)}.
- *
+ *
*/
public interface INameEnvironmentExtension extends INameEnvironment {
/**
@@ -48,7 +48,7 @@ public interface INameEnvironmentExtension extends INameEnvironment {
* @return {@link NameEnvironmentAnswer}
*/
NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, boolean searchWithSecondaryTypes, char[] moduleName);
-
+
default NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, boolean searchWithSecondaryTypes) {
return findType(typeName, packageName, searchWithSecondaryTypes, null);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ITypeAnnotationWalker.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ITypeAnnotationWalker.java
index cc846adcc..7c3a7835b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ITypeAnnotationWalker.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ITypeAnnotationWalker.java
@@ -18,7 +18,7 @@ package org.eclipse.jdt.internal.compiler.env;
* A TypeAnnotationWalker is initialized with all type annotations found at a given element.
* It can be used to walk into the types at the given element and finally answer the
* actual annotations at any node of the walk.
- *
+ *
* The walker is implemented as immutable objects. During the walk either new instances
* are created, or the current instance is shared if no difference is encountered.
*/
@@ -90,13 +90,13 @@ public interface ITypeAnnotationWalker {
/**
* Detail of {@link #toTypeParameterBounds(boolean, int)}: walk to the bounds
- * of the previously selected type parameter.
+ * of the previously selected type parameter.
* @param boundIndex
*/
public abstract ITypeAnnotationWalker toTypeBound(short boundIndex);
/** Walk to the specified supertype either index based or name based:
- * @param index -1 is superclass, else index into the list of superinterfaces
+ * @param index -1 is superclass, else index into the list of superinterfaces
* @param superTypeSignature name and type arguments of the super type to visit
*/
public abstract ITypeAnnotationWalker toSupertype(short index, char[] superTypeSignature);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IUpdatableModule.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IUpdatableModule.java
index 0704eefe9..82e3bd10c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IUpdatableModule.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IUpdatableModule.java
@@ -45,15 +45,15 @@ public interface IUpdatableModule {
public void accept(IUpdatableModule t) {
t.addExports(this.name, this.targets);
}
-
+
public char[] getName() {
return this.name;
}
-
+
public char[][] getTargetModules() {
return this.targets;
}
-
+
public UpdateKind getKind() {
return UpdateKind.PACKAGE;
}
@@ -62,7 +62,7 @@ public interface IUpdatableModule {
if (this == other) return true;
if (!(other instanceof AddExports)) return false;
AddExports pu = (AddExports) other;
-
+
if (!CharOperation.equals(this.name, pu.name))
return false;
if (!CharOperation.equals(this.targets, pu.targets))
@@ -80,11 +80,11 @@ public interface IUpdatableModule {
return hash;
}
}
-
+
class AddReads implements Consumer<IUpdatableModule> {
char[] targetModule;
-
+
public AddReads(char[] target) {
this.targetModule = target;
}
@@ -93,11 +93,11 @@ public interface IUpdatableModule {
// TODO Auto-generated method stub
t.addReads(this.targetModule);
}
-
+
public char[] getTarget() {
return this.targetModule;
}
-
+
public UpdateKind getKind() {
return UpdateKind.MODULE;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ModuleReferenceImpl.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ModuleReferenceImpl.java
index 6af1a826e..cdc69584c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ModuleReferenceImpl.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ModuleReferenceImpl.java
@@ -24,7 +24,7 @@ public class ModuleReferenceImpl implements IModule.IModuleReference {
}
@Override
public boolean equals(Object o) {
- if (this == o)
+ if (this == o)
return true;
if (!(o instanceof IModule.IModuleReference))
return false;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/NameEnvironmentAnswer.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/NameEnvironmentAnswer.java
index b11078dfe..6f6496c40 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/NameEnvironmentAnswer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/NameEnvironmentAnswer.java
@@ -55,7 +55,7 @@ public class NameEnvironmentAnswer {
this.externalAnnotationPath = externalAnnotationPath;
this.moduleName = module;
}
-
+
public NameEnvironmentAnswer(ReferenceBinding binding, ModuleBinding module) {
this.binding = binding;
this.moduleBinding = module;
@@ -86,7 +86,7 @@ public class NameEnvironmentAnswer {
}
return baseString;
}
-
+
/**
* Returns the associated access restriction, or null if none.
*/
@@ -167,10 +167,10 @@ public class NameEnvironmentAnswer {
public boolean ignoreIfBetter() {
return this.accessRestriction != null && this.accessRestriction.ignoreIfBetter();
}
-
- /**
+
+ /**
* Name of the module to which the CU in this answer is associated.
- * {@code null} when associated to the unnamed module.
+ * {@code null} when associated to the unnamed module.
* @return module name or {@code null}
*/
public char[] moduleName() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ConditionalFlowInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ConditionalFlowInfo.java
index 256bb09b7..51fcfcb46 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ConditionalFlowInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ConditionalFlowInfo.java
@@ -121,7 +121,7 @@ public boolean isDefinitelyUnknown(LocalVariableBinding local) {
@Override
public boolean hasNullInfoFor(LocalVariableBinding local) {
- return this.initsWhenTrue.hasNullInfoFor(local)
+ return this.initsWhenTrue.hasNullInfoFor(local)
|| this.initsWhenFalse.hasNullInfoFor(local);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java
index f29648064..0c958db28 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java
@@ -50,7 +50,7 @@ public class ExceptionHandlingFlowContext extends FlowContext {
int[] isReached;
int[] isNeeded;
// WARNING: This is an array that maps to catch blocks, not caught exceptions (which could be more than catch blocks in a multi-catch block)
- UnconditionalFlowInfo[] initsOnExceptions;
+ UnconditionalFlowInfo[] initsOnExceptions;
ObjectCache indexes = new ObjectCache();
boolean isMethodContext;
@@ -82,7 +82,7 @@ public ExceptionHandlingFlowContext(
FlowContext initializationParent,
BlockScope scope,
FlowInfo flowInfo) {
- this(parent, tryStatement, handledExceptions, exceptionToCatchBlockMap,
+ this(parent, tryStatement, handledExceptions, exceptionToCatchBlockMap,
tryStatement.catchArguments, initializationParent, scope, flowInfo.unconditionalInits());
UnconditionalFlowInfo unconditionalCopy = flowInfo.unconditionalCopy();
unconditionalCopy.iNBit = -1L;
@@ -193,7 +193,7 @@ public void complainIfUnusedExceptionHandlers(BlockScope scope,TryStatement tryS
}
}
-private ASTNode getExceptionType(int index) {
+private ASTNode getExceptionType(int index) {
if (this.exceptionToCatchBlockMap == null) {
return this.catchArguments[index].type;
}
@@ -204,8 +204,8 @@ private ASTNode getExceptionType(int index) {
for (int i = 0, len = typeRefs.length; i < len; i++) {
TypeReference typeRef = typeRefs[i];
if (TypeBinding.equalsEquals(typeRef.resolvedType, this.handledExceptions[index])) return typeRef;
- }
- }
+ }
+ }
return node;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java
index 5cd681981..cd075750e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java
@@ -224,7 +224,7 @@ public void complainOnDeferredChecks(FlowInfo flowInfo, BlockScope scope) {
}
break;
case IN_UNBOXING:
- checkUnboxing(scope, (Expression) location, flowInfo);
+ checkUnboxing(scope, (Expression) location, flowInfo);
break;
default:
// should not happen
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java
index 8fb978d36..f74ee32a4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java
@@ -70,7 +70,7 @@ public class FlowContext implements TypeConstants {
public FlowInfo initsOnFinally;
// only used within try blocks; remembers upstream flow info mergedWith
// any null related operation happening within the try block
- /**
+ /**
* Used to record whether effects in a try block affect the finally-block
* conditionally or unconditionally.
* -1 means: no effect,
@@ -95,7 +95,7 @@ public class FlowContext implements TypeConstants {
// inside an assertFalse or a not-expression checks for equality / inequality have reversed meaning for syntactic analysis for fields:
public static final int INSIDE_NEGATION = 0x4;
/**
- * used to hide null comparison related warnings inside assert statements
+ * used to hide null comparison related warnings inside assert statements
*/
public static final int HIDE_NULL_COMPARISON_WARNING = 0x1000;
public static final int HIDE_NULL_COMPARISON_WARNING_MASK = 0xF000;
@@ -107,7 +107,7 @@ public static final int CAN_ONLY_NULL = 0x0001;
public static final int CAN_ONLY_NON_NULL = 0x0002;
//check against non null, with definite values -- comparisons
public static final int MAY_NULL = 0x0003;
-//check binding a value to a @NonNull variable
+//check binding a value to a @NonNull variable
public final static int ASSIGN_TO_NONNULL = 0x0080;
//check against an unboxing conversion
public static final int IN_UNBOXING = 0x0010;
@@ -186,10 +186,10 @@ public void extendTimeToLiveForNullCheckedField(int t) {
/**
* Forget any information about fields that were previously known to be non-null.
- *
+ *
* Will only cause any effect if CompilerOptions.enableSyntacticNullAnalysisForFields
* (implicitly by guards before calls to {@link #recordNullCheckedFieldReference(Reference, int)}).
- */
+ */
public void expireNullCheckedFieldInfo() {
if (this.nullCheckedFieldReferences != null) {
for (int i = 0; i < this.nullCheckedFieldReferences.length; i++) {
@@ -199,7 +199,7 @@ public void expireNullCheckedFieldInfo() {
}
}
-/**
+/**
* Is the given field reference equivalent to a reference that is freshly known to be non-null?
* Can only return true if CompilerOptions.enableSyntacticNullAnalysisForFields
* (implicitly by guards before calls to {@link #recordNullCheckedFieldReference(Reference, int)}).
@@ -243,7 +243,7 @@ public void checkExceptionHandlers(TypeBinding raisedException, ASTNode location
if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_7 && location instanceof ThrowStatement) {
Expression throwExpression = ((ThrowStatement)location).exception;
LocalVariableBinding throwArgBinding = throwExpression.localVariableBinding();
- if (throwExpression instanceof SingleNameReference // https://bugs.eclipse.org/bugs/show_bug.cgi?id=350361
+ if (throwExpression instanceof SingleNameReference // https://bugs.eclipse.org/bugs/show_bug.cgi?id=350361
&& throwArgBinding instanceof CatchParameterBinding && throwArgBinding.isEffectivelyFinal()) {
CatchParameterBinding parameter = (CatchParameterBinding) throwArgBinding;
checkExceptionHandlers(parameter.getPreciseTypes(), location, flowInfo, scope);
@@ -431,7 +431,7 @@ public void checkExceptionHandlers(TypeBinding[] raisedExceptions, ASTNode locat
caughtException,
exceptionFlow.unconditionalInits(),
raisedException,
- caughtException,
+ caughtException,
location,
false);
// was not caught already per construction
@@ -655,16 +655,16 @@ public FlowContext getTargetContextForDefaultContinue() {
return null;
}
-/**
+/**
* Answer flow context that corresponds to initialization. Suitably override in subtypes.
*/
public FlowContext getInitializationContext() {
return null;
}
-/**
+/**
* Answer the parent flow context but be careful not to cross the boundary of a nested type,
- * or null if no such parent exists.
+ * or null if no such parent exists.
*/
public FlowContext getLocalParent() {
if (this.associatedNode instanceof AbstractMethodDeclaration || this.associatedNode instanceof TypeDeclaration || this.associatedNode instanceof LambdaExpression)
@@ -770,7 +770,7 @@ public void recordContinueFrom(FlowContext innerFlowContext, FlowInfo flowInfo)
// default implementation: do nothing
}
-/**
+/**
* Record that we found an early exit from a method while a resource is in scope.
* @param scope enclosing scope
* @param flowInfo flowInfo at the point of the early exit
@@ -912,7 +912,7 @@ public void recordSettingFinal(VariableBinding variable, Reference finalReferenc
* CAN_ONLY_NULL_NON_NULL}, {@link #MAY_NULL MAY_NULL}, potentially
* combined with a context indicator (one of {@link #IN_COMPARISON_NULL},
* {@link #IN_COMPARISON_NON_NULL}, {@link #IN_ASSIGNMENT} or {@link #IN_INSTANCEOF})
- * and a bit to indicate whether the reference is being recorded inside an assert,
+ * and a bit to indicate whether the reference is being recorded inside an assert,
* {@link #HIDE_NULL_COMPARISON_WARNING}
* @param flowInfo the flow info at the check point; deferring contexts will
* perform supplementary checks against flow info instances that cannot
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java
index 6c1e05594..fd144cd4d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java
@@ -12,7 +12,7 @@
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
* Technical University Berlin - extended API and implementation
- * Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for
+ * Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for
* bug 292478 - Report potentially null across variable assignment
* bug 332637 - Dead Code detection removing code that isn't dead
* bug 394768 - [compiler][resource] Incorrect resource leak warning when creating stream in conditional
@@ -40,9 +40,9 @@ public abstract class FlowInfo {
public int tagBits; // REACHABLE by default
public final static int REACHABLE = 0;
- /* unreachable code
+ /* unreachable code
* eg. while (true);
- * i++; --> unreachable code
+ * i++; --> unreachable code
*/
public final static int UNREACHABLE_OR_DEAD = 1;
/* unreachable code as inferred by null analysis
@@ -57,7 +57,7 @@ public abstract class FlowInfo {
*/
public final static int UNREACHABLE = UNREACHABLE_OR_DEAD | UNREACHABLE_BY_NULLANALYSIS;
public final static int NULL_FLAG_MASK = 4;
-
+
public final static int UNKNOWN = 1;
public final static int NULL = 2;
public final static int NON_NULL = 4;
@@ -66,7 +66,7 @@ public abstract class FlowInfo {
public final static int POTENTIALLY_NON_NULL = 32;
public final static int UNROOTED = 64; // marks a flowInfo that may be appended to another flowInfo (accepting incoming nulls/nonnulls, see UFI.iNBit/iNNBit).
-
+
public static final int FREE_TYPEVARIABLE = FlowInfo.POTENTIALLY_NULL | FlowInfo.POTENTIALLY_NON_NULL;
public static final UnconditionalFlowInfo DEAD_END; // Represents a dead branch status of initialization
@@ -553,7 +553,7 @@ public static UnconditionalFlowInfo mergedOptimizedBranchesIfElse(
// if a variable is only initialized in one branch and not initialized in the other,
// then we need to cast a doubt on its initialization in the merged info
mergedInfo.mergeDefiniteInitsWith(initsWhenFalse.unconditionalCopy());
-
+
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=415997, classify unreachability precisely, IsElseStatementUnreachable could be due to null analysis
if ((mergedInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0 && (initsWhenFalse.tagBits & FlowInfo.UNREACHABLE) == FlowInfo.UNREACHABLE_BY_NULLANALYSIS) {
mergedInfo.tagBits &= ~UNREACHABLE_OR_DEAD;
@@ -567,7 +567,7 @@ public static UnconditionalFlowInfo mergedOptimizedBranchesIfElse(
// true or false (i.e if(true), etc) for sure
// We don't do this if both if and else branches themselves are in an unreachable code
// or if any of them is a DEAD_END (e.g. contains 'return' or 'throws')
- mergedInfo =
+ mergedInfo =
initsWhenFalse.addPotentialInitializationsFrom(initsWhenTrue.
nullInfoLessUnconditionalCopy()).
unconditionalInits();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/InitializationFlowContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/InitializationFlowContext.java
index 2f516b0bd..5d2f44002 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/InitializationFlowContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/InitializationFlowContext.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -58,7 +58,7 @@ public class InitializationFlowContext extends ExceptionHandlingFlowContext {
public FlowContext getInitializationContext() {
return this;
}
-
+
@Override
public String individualToString() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java
index 203f56866..f8af4898f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Stephan Herrmann - contributions for
@@ -276,7 +276,7 @@ public void complainOnDeferredNullChecks(BlockScope scope, FlowInfo callerFlowIn
}
break;
}
- }
+ }
break;
case MAY_NULL:
if (flowInfo.isDefinitelyNull(local)) {
@@ -507,7 +507,7 @@ public void recordContinueFrom(FlowContext innerFlowContext, FlowInfo flowInfo)
FlowContext inner = innerFlowContext;
while (inner != this && !(inner instanceof LoopingFlowContext)) {
inner = inner.parent;
- // we know that inner is reachable from this without crossing a type boundary
+ // we know that inner is reachable from this without crossing a type boundary
}
if (inner == this) {
this.upstreamNullFlowInfo.
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/TryFlowContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/TryFlowContext.java
index 32d9cee33..4df6bbf86 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/TryFlowContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/TryFlowContext.java
@@ -30,7 +30,7 @@ public abstract class TryFlowContext extends FlowContext {
public TryFlowContext(FlowContext parent, ASTNode associatedNode) {
super(parent, associatedNode, true);
}
-
+
@Override
public void markFinallyNullStatus(LocalVariableBinding local, int nullStatus) {
if (this.outerTryContext != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java
index a78dbb797..4b99fb741 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java
@@ -98,7 +98,7 @@ public class UnconditionalFlowInfo extends FlowInfo {
1110 prot. null
1111 prot. non null
*/
- public long
+ public long
iNBit, // can an incoming null value reach the current point?
iNNBit; // can an incoming nonnull value reach the current point?
@@ -120,12 +120,12 @@ public class UnconditionalFlowInfo extends FlowInfo {
public static final int IN = 6;
public static final int INN = 7;
-/* fakeInitializedFlowInfo: For Lambda expressions tentative analysis during overload resolution.
- We presume that any and all outer locals touched by the lambda are definitely assigned and
+/* fakeInitializedFlowInfo: For Lambda expressions tentative analysis during overload resolution.
+ We presume that any and all outer locals touched by the lambda are definitely assigned and
effectively final. Whether they are or not is immaterial for overload analysis (errors encountered
- in the body are not supposed to influence the resolution. It is pertinent only for the eventual
+ in the body are not supposed to influence the resolution. It is pertinent only for the eventual
resolution/analysis post overload resolution. For lambda's the problem is that we start the control/data
- flow analysis abruptly at the start of the lambda, so we need to present a cogent world view and hence
+ flow analysis abruptly at the start of the lambda, so we need to present a cogent world view and hence
all this charade.
*/
public static UnconditionalFlowInfo fakeInitializedFlowInfo(int localsCount, int maxFieldCount) {
@@ -157,7 +157,7 @@ private FlowInfo addInfoFrom(FlowInfo inits, boolean handleInits) {
// union of potentially set ones
this.potentialInits |= otherInits.potentialInits;
}
-
+
// combine null information
boolean thisHadNulls = (this.tagBits & NULL_FLAG_MASK) != 0,
otherHasNulls = (otherInits.tagBits & NULL_FLAG_MASK) != 0;
@@ -192,7 +192,7 @@ private FlowInfo addInfoFrom(FlowInfo inits, boolean handleInits) {
long protNN1111 = a1&a2&a3&a4;
// filter 'a' using iNBit,iNNBit from otherInits:
- // this implements that otherInit does not accept certain bits which are known to be superseded by info in otherInits.
+ // this implements that otherInit does not accept certain bits which are known to be superseded by info in otherInits.
long acceptNonNull = otherInits.iNNBit;
long acceptNull = otherInits.iNBit
| protNN1111; // for 1111 don't bother suppressing incoming null, logic operation would produce wrong result
@@ -203,7 +203,7 @@ private FlowInfo addInfoFrom(FlowInfo inits, boolean handleInits) {
a3 = dontResetToStart & acceptNonNull & a3;
a4 &= dontResetToStart;
a1 &= (a2 | a3 | a4); // translate 1000 (undefined state) to 0000
-
+
this.nullBit1 = (b1 = otherInits.nullBit1)
| a1 & (a3
& a4 & (nb2 = ~(b2 = otherInits.nullBit2))
@@ -319,7 +319,7 @@ private FlowInfo addInfoFrom(FlowInfo inits, boolean handleInits) {
for (; i < copyLimit; i++) {
this.extra[0][i] = otherInits.extra[0][i];
this.extra[1][i] = otherInits.extra[1][i];
-
+
}
}
// tweak limits for nulls
@@ -342,7 +342,7 @@ private FlowInfo addInfoFrom(FlowInfo inits, boolean handleInits) {
long protNN1111 = a1&a2&a3&a4;
// filter 'a' using iNBit,iNNBit from otherInits:
- // this implements that otherInit does not accept certain bits which are known to be superseded by info in otherInits.
+ // this implements that otherInit does not accept certain bits which are known to be superseded by info in otherInits.
long acceptNonNull = otherInits.extra[INN][i];
long acceptNull = otherInits.extra[IN][i]
| protNN1111; // for 1111 don't bother suppressing incoming null, logic operation would produce wrong result
@@ -355,7 +355,7 @@ private FlowInfo addInfoFrom(FlowInfo inits, boolean handleInits) {
a1 &= (a2 | a3 | a4); // translate 1000 (undefined state) to 0000
this.extra[1 + 1][i] = (b1 = otherInits.extra[1 + 1][i])
- | a1 & (a3
+ | a1 & (a3
& a4 & (nb2 = ~(b2 = otherInits.extra[2 + 1][i]))
& (nb4 = ~(b4 = otherInits.extra[4 + 1][i]))
| ((na4 = ~a4) | (na3 = ~a3))
@@ -1818,7 +1818,7 @@ public UnconditionalFlowInfo mergedWith(UnconditionalFlowInfo otherInits) {
} else if (thisHadNulls) {
if (otherHasNulls) {
this.nullBit1 = (a1 = this.nullBit1) & (b1 = otherInits.nullBit1) & (
- ((a2 = this.nullBit2) & (((b2 = otherInits.nullBit2) &
+ ((a2 = this.nullBit2) & (((b2 = otherInits.nullBit2) &
~(((a3=this.nullBit3) & (a4=this.nullBit4)) ^ ((b3=otherInits.nullBit3) & (b4=otherInits.nullBit4))))
|(a3 & a4 & (nb2 = ~b2))))
|((na2 = ~a2) & ((b2 & b3 & b4)
@@ -1962,7 +1962,7 @@ public UnconditionalFlowInfo mergedWith(UnconditionalFlowInfo otherInits) {
// compose nulls
for (i = 0; i < mergeLimit; i++) {
this.extra[1 + 1][i] = (a1=this.extra[1+1][i]) & (b1=otherInits.extra[1+1][i]) & (
- ((a2=this.extra[2+1][i]) & (((b2=otherInits.extra[2+1][i]) &
+ ((a2=this.extra[2+1][i]) & (((b2=otherInits.extra[2+1][i]) &
~(((a3=this.extra[3+1][i]) & (a4=this.extra[4+1][i])) ^ ((b3=otherInits.extra[3+1][i]) & (b4=otherInits.extra[4+1][i]))))
|(a3 & a4 & (nb2=~b2))))
|((na2=~a2) & ((b2 & b3 & b4)
@@ -2091,7 +2091,7 @@ public FlowInfo safeInitsWhenTrue() {
public FlowInfo setReachMode(int reachMode) {
if (this == DEAD_END) {// cannot modify DEAD_END
return this;
- }
+ }
if (reachMode == REACHABLE ) {
this.tagBits &= ~UNREACHABLE;
} else if (reachMode == UNREACHABLE_BY_NULLANALYSIS ) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
index a78a0f148..94e08cf4f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
@@ -186,13 +186,13 @@ public class CompilerOptions {
public static final String OPTION_ReportUnsafeRoleInstantiation =
"org.eclipse.objectteams.otdt.compiler.problem.unsafe_role_instantiation"; //$NON-NLS-1$
- public static final String OPTION_ReportEffectlessFieldaccess =
- "org.eclipse.objectteams.otdt.compiler.problem.effectless_fieldaccess"; //$NON-NLS-1$
+ public static final String OPTION_ReportEffectlessFieldaccess =
+ "org.eclipse.objectteams.otdt.compiler.problem.effectless_fieldaccess"; //$NON-NLS-1$
public static final String OPTION_ReportFragileCallin =
"org.eclipse.objectteams.otdt.compiler.problem.fragile_callin"; //$NON-NLS-1$
- public static final String OPTION_ReportUnusedParammap =
- "org.eclipse.objectteams.otdt.compiler.problem.unused_parammap"; //$NON-NLS-1$
-
+ public static final String OPTION_ReportUnusedParammap =
+ "org.eclipse.objectteams.otdt.compiler.problem.unused_parammap"; //$NON-NLS-1$
+
public static final String OPTION_ReportPotentialAmbiguousPlayedby =
"org.eclipse.objectteams.otdt.compiler.problem.potential_ambiguous_playedby"; //$NON-NLS-1$
public static final String OPTION_ReportAbstractPotentialRelevantRole =
@@ -222,38 +222,38 @@ public class CompilerOptions {
public static final String OPTION_ReportExceptionInGuard=
"org.eclipse.objectteams.otdt.compiler.problem.exception_in_guard"; //$NON-NLS-1$
-
+
public static final String OPTION_ReportAmbiguousLowering=
"org.eclipse.objectteams.otdt.compiler.problem.ambiguous_lowering"; //$NON-NLS-1$
-
+
public static final String OPTION_ReportAdaptingDeprecated=
"org.eclipse.objectteams.otdt.compiler.problem.adapting_deprecated"; //$NON-NLS-1$
-
+
public static final String OPTION_ReportIgnoringRoleMethodReturn=
"org.eclipse.objectteams.otdt.compiler.problem.ignoring_role_return"; //$NON-NLS-1$
public static final String OPTION_ReportOtreWeavingIntoJava8=
"org.eclipse.objectteams.otdt.compiler.problem.otre_into_java8"; //$NON-NLS-1$
-
+
public static final String OPTION_AllowScopedKeywords =
"org.eclipse.objectteams.otdt.compiler.option.scoped_keywords"; //$NON-NLS-1$
-
+
public static final String OPTION_PureJavaOnly =
"org.eclipse.objectteams.otdt.compiler.option.pure_java"; //$NON-NLS-1$ // not for explicit configuration, set from project nature
-
+
// === multi value options ===:
-
+
public static final String OPTION_WeavingScheme =
"org.eclipse.objectteams.otdt.compiler.option.weaving_scheme"; //$NON-NLS-1$
/** Supported weaving schemes. */
- public static enum WeavingScheme {
+ public static enum WeavingScheme {
/** Code generation for the traditional "Object Teams Runtime Environment" implementation based on BCEL. */
OTRE,
/** Code generation for the newer "Object Teams Dynamic Runtime Environment" implementation based on ASM. */
OTDRE
}
-
-
+
+
public static final String OPTION_Decapsulation = "org.eclipse.objectteams.otdt.core.compiler.problem.decapsulation"; //$NON-NLS-1$
// values for the above:
public static final String REPORT_CLASS = "report class"; //$NON-NLS-1$
@@ -284,7 +284,7 @@ public class CompilerOptions {
public static final String OPTION_PessimisticNullAnalysisForFreeTypeVariables = "org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables"; //$NON-NLS-1$
public static final String OPTION_ReportNonNullTypeVariableFromLegacyInvocation = "org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation"; //$NON-NLS-1$
public static final String OPTION_ReportAnnotatedTypeArgumentToUnannotated = "org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated"; //$NON-NLS-1$
-
+
public static final String OPTION_ReportUnlikelyCollectionMethodArgumentType = "org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType"; //$NON-NLS-1$
public static final String OPTION_ReportUnlikelyCollectionMethodArgumentTypeStrict = "org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict"; //$NON-NLS-1$
public static final String OPTION_ReportUnlikelyEqualsArgumentType = "org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType"; //$NON-NLS-1$
@@ -377,7 +377,7 @@ public class CompilerOptions {
public static final int UnnecessaryTypeCheck = IrritantSet.GROUP0 | ASTNode.Bit27;
public static final int UndocumentedEmptyBlock = IrritantSet.GROUP0 | ASTNode.Bit28;
public static final int IndirectStaticAccess = IrritantSet.GROUP0 | ASTNode.Bit29;
-
+
// group 1
public static final int UnnecessaryElse = IrritantSet.GROUP1 | ASTNode.Bit1;
public static final int UncheckedTypeOperation = IrritantSet.GROUP1 | ASTNode.Bit2;
@@ -461,7 +461,7 @@ public class CompilerOptions {
public static final int AdaptingDeprecated= OTJFlag | ASTNode.Bit16;
public static final int IgnoringRoleReturn= OTJFlag | ASTNode.Bit17;
public static final int BaseclassCycle= OTJFlag | ASTNode.Bit18;
- public static final int EffectlessFieldaccess= OTJFlag | ASTNode.Bit19;
+ public static final int EffectlessFieldaccess= OTJFlag | ASTNode.Bit19;
public static final int UnusedParammap= OTJFlag | ASTNode.Bit20;
public static final int HiddenLiftingProblem= OTJFlag | ASTNode.Bit21;
public static final int OTREintoJava8= OTJFlag | ASTNode.Bit22;
@@ -469,28 +469,28 @@ public class CompilerOptions {
// SH}
// Severity level for handlers
- /**
- * Defaults defined at {@link IrritantSet#COMPILER_DEFAULT_ERRORS}
+ /**
+ * Defaults defined at {@link IrritantSet#COMPILER_DEFAULT_ERRORS}
* @see #resetDefaults()
*/
protected IrritantSet errorThreshold;
- /**
+ /**
* Defaults defined at {@link IrritantSet#COMPILER_DEFAULT_WARNINGS}
* @see #resetDefaults()
*/
protected IrritantSet warningThreshold;
- /**
+ /**
* Defaults defined at {@link IrritantSet#COMPILER_DEFAULT_INFOS}
* @see #resetDefaults()
*/
protected IrritantSet infoThreshold;
-
+
/**
* Default settings are to be defined in {@link CompilerOptions#resetDefaults()}
*/
-
+
/** Classfile debug information, may contain source file name, line numbers, local variable tables, etc... */
- public int produceDebugAttributes;
+ public int produceDebugAttributes;
/** Classfile method parameters information as per JEP 118... */
public boolean produceMethodParameters;
/** Indicates whether generic signature should be generated for lambda expressions */
@@ -504,7 +504,7 @@ public class CompilerOptions {
public long originalComplianceLevel;
/** Java source level, refers to a JDK version, e.g. {@link ClassFileConstants#JDK1_4} */
public long sourceLevel;
- /** Original Java source level, refers to a JDK version, e.g. {@link ClassFileConstants#JDK1_4}
+ /** Original Java source level, refers to a JDK version, e.g. {@link ClassFileConstants#JDK1_4}
* Usually same as the field sourceLevel, though the latter could deviate to create temporary sandbox
* modes during reconcile operations. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=323633
* */
@@ -516,7 +516,7 @@ public class CompilerOptions {
/** Compiler trace verbosity */
public boolean verbose;
/** Indicates whether reference info is desired */
- public boolean produceReferenceInfo;
+ public boolean produceReferenceInfo;
/** Indicates if unused/optimizable local variables need to be preserved (debugging purpose) */
public boolean preserveAllLocalVariables;
/** Indicates whether literal expressions are inlined at parse-time or not */
@@ -636,11 +636,11 @@ public class CompilerOptions {
public boolean analyseResourceLeaks;
/** Should missing enum cases be reported even if a default case exists in the same switch? */
public boolean reportMissingEnumCaseDespiteDefault;
-
+
/** When checking for unlikely argument types of of Map.get() et al, perform strict analysis against the expected type */
public boolean reportUnlikelyCollectionMethodArgumentTypeStrict;
- /** Should the compiler tolerate illegal ambiguous varargs invocation in compliance < 1.7
+ /** Should the compiler tolerate illegal ambiguous varargs invocation in compliance < 1.7
* to be bug compatible with javac? (bug 383780) */
public static boolean tolerateIllegalAmbiguousVarargsInvocation;
{
@@ -687,7 +687,7 @@ public class CompilerOptions {
"rawtypes", //$NON-NLS-1$
"removal", //$NON-NLS-1$
"resource", //$NON-NLS-1$
- "restriction", //$NON-NLS-1$
+ "restriction", //$NON-NLS-1$
"serial", //$NON-NLS-1$
"static-access", //$NON-NLS-1$
"static-method", //$NON-NLS-1$
@@ -1033,9 +1033,9 @@ public class CompilerOptions {
default:
if(major > ClassFileConstants.MAJOR_VERSION_10) {
return "" + (major - ClassFileConstants.MAJOR_VERSION_0); //$NON-NLS-1$
- }
+ }
return Util.EMPTY_STRING; // unknown version
-
+
}
return Util.EMPTY_STRING; // unknown version
}
@@ -1557,7 +1557,7 @@ public class CompilerOptions {
return null;
}
-
+
public Map<String, String> getMap() {
Map<String, String> optionsMap = new HashMap<>(30);
optionsMap.put(OPTION_LocalVariableAttribute, (this.produceDebugAttributes & ClassFileConstants.ATTR_VARS) != 0 ? GENERATE : DO_NOT_GENERATE);
@@ -1817,7 +1817,7 @@ public class CompilerOptions {
this.errorThreshold = new IrritantSet(IrritantSet.COMPILER_DEFAULT_ERRORS);
this.warningThreshold = new IrritantSet(IrritantSet.COMPILER_DEFAULT_WARNINGS);
this.infoThreshold = new IrritantSet(IrritantSet.COMPILER_DEFAULT_INFOS);
-
+
// by default only lines and source attributes are generated.
this.produceDebugAttributes = ClassFileConstants.ATTR_SOURCE | ClassFileConstants.ATTR_LINES;
this.complianceLevel = this.originalComplianceLevel = ClassFileConstants.JDK1_4; // by default be compliant with 1.4
@@ -1833,7 +1833,7 @@ public class CompilerOptions {
// indicates if unused/optimizable local variables need to be preserved (debugging purpose)
this.preserveAllLocalVariables = false;
-
+
this.produceMethodParameters = false;
// indicates whether literal expressions are inlined at parse-time or not
@@ -1850,17 +1850,17 @@ public class CompilerOptions {
// deprecation report
this.reportDeprecationInsideDeprecatedCode = false;
this.reportDeprecationWhenOverridingDeprecatedMethod = false;
-
+
// unused parameters report
this.reportUnusedParameterWhenImplementingAbstract = false;
this.reportUnusedParameterWhenOverridingConcrete = false;
this.reportUnusedParameterIncludeDocCommentReference = true;
-
+
// unused declaration of thrown exception
this.reportUnusedDeclaredThrownExceptionWhenOverriding = false;
this.reportUnusedDeclaredThrownExceptionIncludeDocCommentReference = true;
this.reportUnusedDeclaredThrownExceptionExemptExceptionAndThrowable = true;
-
+
// constructor/setter parameter hiding
this.reportSpecialParameterHidingField = false;
@@ -1872,7 +1872,7 @@ public class CompilerOptions {
this.reportInvalidJavadocTagsDeprecatedRef = false;
this.reportInvalidJavadocTagsNotVisibleRef = false;
this.reportMissingJavadocTagDescription = RETURN_TAG;
-
+
// check missing javadoc tags
this.reportMissingJavadocTagsVisibility = ClassFileConstants.AccPublic;
this.reportMissingJavadocTagsOverriding = false;
@@ -1881,7 +1881,7 @@ public class CompilerOptions {
// check missing javadoc comments
this.reportMissingJavadocCommentsVisibility = ClassFileConstants.AccPublic;
this.reportMissingJavadocCommentsOverriding = false;
-
+
// JSR bytecode inlining and sharing
this.inlineJsrBytecode = false;
this.shareCommonFinallyBlocks = false;
@@ -1912,21 +1912,21 @@ public class CompilerOptions {
// enable annotation processing by default only in batch mode
this.processAnnotations = false;
-
+
// disable missing override annotation reporting for interface method implementation
this.reportMissingOverrideAnnotationForInterfaceMethodImplementation = true;
-
+
// dead code detection
this.reportDeadCodeInTrivialIfStatement = false;
-
+
// ignore method bodies
this.ignoreMethodBodies = false;
-
+
this.ignoreSourceFolderWarningOption = false;
-
+
// allow null info from asserts to be considered downstream by default
this.includeNullInfoFromAsserts = false;
-
+
this.isAnnotationBasedNullAnalysisEnabled = false;
this.nullableAnnotationName = DEFAULT_NULLABLE_ANNOTATION_NAME;
this.nonNullAnnotationName = DEFAULT_NONNULL_ANNOTATION_NAME;
@@ -1934,7 +1934,7 @@ public class CompilerOptions {
this.intendedDefaultNonNullness = 0;
this.enableSyntacticNullAnalysisForFields = false;
this.inheritNullAnnotations = false;
-
+
this.analyseResourceLeaks = true;
this.reportMissingEnumCaseDespiteDefault = false;
@@ -2081,7 +2081,7 @@ public class CompilerOptions {
} else if (DISABLED.equals(optionValue)) {
this.reportDeadCodeInTrivialIfStatement = false;
}
- }
+ }
if ((optionValue = optionsMap.get(OPTION_MaxProblemPerUnit)) != null) {
String stringValue = optionValue;
try {
@@ -2519,9 +2519,9 @@ public class CompilerOptions {
this.enablePreviewFeatures = false;
}
}
- if ((optionValue = optionsMap.get(OPTION_ReportPreviewFeatures)) != null)
+ if ((optionValue = optionsMap.get(OPTION_ReportPreviewFeatures)) != null)
updateSeverity(PreviewFeatureUsed, optionValue);
- if ((optionValue = optionsMap.get(OPTION_ReportSuppressWarningNotFullyAnalysed)) != null)
+ if ((optionValue = optionsMap.get(OPTION_ReportSuppressWarningNotFullyAnalysed)) != null)
updateSeverity(SuppressWarningsNotAnalysed, optionValue);
if ((optionValue = optionsMap.get(OPTION_JdtDebugCompileMode)) != null) {
@@ -2704,7 +2704,7 @@ public class CompilerOptions {
buf.append("\n\t- report when overriding a final role: ").append(getSeverityString(OverridingFinalRole)); //$NON-NLS-1$
buf.append("\n\t- report if a guard throws a checked exception: ").append(getSeverityString(ExceptionInGuard)); //$NON-NLS-1$
-
+
buf.append("\n\t- report if insertion of lowering is ambiguous : ").append(getSeverityString(AmbiguousLowering)); //$NON-NLS-1$
buf.append("\n\t- allow scoped keywords : ").append(this.allowScopedKeywords ? ENABLED : DISABLED); //$NON-NLS-1$
@@ -2712,7 +2712,7 @@ public class CompilerOptions {
// SH}
return buf.toString();
}
-
+
protected void updateSeverity(int irritant, Object severityString) {
if (ERROR.equals(severityString)) {
this.errorThreshold.set(irritant);
@@ -2733,7 +2733,7 @@ public class CompilerOptions {
}
}
- /**
+ /**
* Note, if you have a LookupEnvironment you should instead ask
* {@link org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment#usesNullTypeAnnotations()}. */
public boolean usesNullTypeAnnotations() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/Constant.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/Constant.java
index 24be987cf..889ff94be 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/Constant.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/Constant.java
@@ -22,7 +22,7 @@ public abstract class Constant implements TypeIds, OperatorIds {
public static final Constant NotAConstant = DoubleConstant.fromValue(Double.NaN);
public static final Constant[] NotAConstantList = new Constant[] {DoubleConstant.fromValue(Double.NaN)};
-
+
public boolean booleanValue() {
throw new ShouldNotImplement(Messages.bind(Messages.constant_cannotCastedInto, new String[] { typeName(), "boolean" })); //$NON-NLS-1$
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java
index 2bf1799b4..9285e0102 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java
@@ -89,7 +89,7 @@ public class IrritantSet {
public static final IrritantSet JAVADOC = new IrritantSet(CompilerOptions.InvalidJavadoc);
public static final IrritantSet PREVIEW = new IrritantSet(CompilerOptions.PreviewFeatureUsed);
- public static final IrritantSet COMPILER_DEFAULT_ERRORS = new IrritantSet(0); // no optional error by default
+ public static final IrritantSet COMPILER_DEFAULT_ERRORS = new IrritantSet(0); // no optional error by default
public static final IrritantSet COMPILER_DEFAULT_WARNINGS = new IrritantSet(0); // see static initializer below
public static final IrritantSet COMPILER_DEFAULT_INFOS = new IrritantSet(0); // see static initializer below
//{ObjectTeams: new irritants:
@@ -145,7 +145,7 @@ public class IrritantSet {
CompilerOptions.UnlikelyEqualsArgumentType
| CompilerOptions.SuppressWarningsNotAnalysed
| CompilerOptions.AnnotatedTypeArgumentToUnannotated);
-
+
COMPILER_DEFAULT_WARNINGS
//{ObjectTeams: default to warning (group 3):
.set(CompilerOptions.BindingConventions
@@ -264,7 +264,7 @@ public class IrritantSet {
if (suppressRawWhenUnchecked != null && "true".equalsIgnoreCase(suppressRawWhenUnchecked)) { //$NON-NLS-1$
UNCHECKED.set(CompilerOptions.RawTypeReference);
}
-
+
JAVADOC
.set(CompilerOptions.MissingJavadocComments)
.set(CompilerOptions.MissingJavadocTags);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ReferenceContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ReferenceContext.java
index 0f14dc579..e1a03f22f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ReferenceContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ReferenceContext.java
@@ -36,7 +36,7 @@ public interface ReferenceContext {
boolean hasErrors();
void tagAsHavingErrors();
-
+
void tagAsHavingIgnoredMandatoryErrors(int problemId);
//{ObjectTeams: some errors will have to be removed
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotatableTypeSystem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotatableTypeSystem.java
index 7f0e99db5..2c5226f99 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotatableTypeSystem.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotatableTypeSystem.java
@@ -11,7 +11,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Stephan Herrmann - Contribution for
- * Bug 432977 - [1.8][null] Incorrect 'type is not visible' compiler error
+ * Bug 432977 - [1.8][null] Incorrect 'type is not visible' compiler error
* Bug 446434 - [1.8][null] Enable interned captures also when analysing null type annotations
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.lookup;
@@ -23,29 +23,29 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.ITeamAnchor;
import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBinding;
/* AnnotatableTypeSystem: Keep track of annotated types so as to provide unique bindings for identically annotated versions identical underlying "naked" types.
- As of now, we ensure uniqueness only for marker annotated types and for others that default to all default attribute values, i.e two instances of @NonNull String
- would have the same binding, while @T(1) X and @T(2) X will not. Binding uniqueness is only a memory optimization and is not essential for correctness of compilation.
+ As of now, we ensure uniqueness only for marker annotated types and for others that default to all default attribute values, i.e two instances of @NonNull String
+ would have the same binding, while @T(1) X and @T(2) X will not. Binding uniqueness is only a memory optimization and is not essential for correctness of compilation.
Various subsystems should expect to determine binding identity/equality by calling TypeBinding.equalsEquals and not by using == operator.
-
- ATS is AnnotatableTypeSystem and not AnnotatedTypeSystem, various methods may actually return unannotated types if the input arguments do not specify any annotations
- and component types of the composite type being constructed are themselves also unannotated. We rely on the master type table maintained by TypeSystem and use
+
+ ATS is AnnotatableTypeSystem and not AnnotatedTypeSystem, various methods may actually return unannotated types if the input arguments do not specify any annotations
+ and component types of the composite type being constructed are themselves also unannotated. We rely on the master type table maintained by TypeSystem and use
getDerivedTypes() and cacheDerivedType() to get/put.
*/
public class AnnotatableTypeSystem extends TypeSystem {
private boolean isAnnotationBasedNullAnalysisEnabled;
-
+
public AnnotatableTypeSystem(LookupEnvironment environment) {
super(environment);
this.environment = environment;
this.isAnnotationBasedNullAnalysisEnabled = environment.globalOptions.isAnnotationBasedNullAnalysisEnabled;
}
-
+
// Given a type, return all its annotated variants: parameter may be annotated.
@Override
public TypeBinding[] getAnnotatedTypes(TypeBinding type) {
-
+
TypeBinding[] derivedTypes = getDerivedTypes(type);
final int length = derivedTypes.length;
TypeBinding [] annotatedVersions = new TypeBinding[length];
@@ -59,16 +59,16 @@ public class AnnotatableTypeSystem extends TypeSystem {
if (derivedType.id == type.id)
annotatedVersions[versions++] = derivedType;
}
-
+
if (versions != length)
System.arraycopy(annotatedVersions, 0, annotatedVersions = new TypeBinding[versions], 0, versions);
return annotatedVersions;
}
-
- /* This method replaces the version that used to sit in LE. The parameter `annotations' is a flattened sequence of annotations,
+
+ /* This method replaces the version that used to sit in LE. The parameter `annotations' is a flattened sequence of annotations,
where each dimension's annotations end with a sentinel null. Leaf type can be an already annotated type.
-
- See ArrayBinding.swapUnresolved for further special case handling if incoming leafType is a URB that would resolve to a raw
+
+ See ArrayBinding.swapUnresolved for further special case handling if incoming leafType is a URB that would resolve to a raw
type later.
*/
@Override
@@ -89,14 +89,14 @@ public class AnnotatableTypeSystem extends TypeSystem {
if (derivedType == null) break;
if (!derivedType.isArrayType() || derivedType.dimensions() != dimensions || derivedType.leafComponentType() != leafType) //$IDENTITY-COMPARISON$
continue;
- if (Util.effectivelyEqual(derivedType.getTypeAnnotations(), annotations))
+ if (Util.effectivelyEqual(derivedType.getTypeAnnotations(), annotations))
return (ArrayBinding) derivedType;
if (!derivedType.hasTypeAnnotations())
nakedType = (ArrayBinding) derivedType;
}
if (nakedType == null)
nakedType = super.getArrayType(leafType, dimensions);
-
+
if (!haveTypeAnnotations(leafType, annotations))
return nakedType;
@@ -117,18 +117,18 @@ public class AnnotatableTypeSystem extends TypeSystem {
return super.getMemberType(memberType, enclosingType);
return (ReferenceBinding) getAnnotatedType(memberType, enclosingType, memberType.getTypeAnnotations());
}
-
+
//{ObjectTeams: more arguments for role types:
/* orig:
public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType, AnnotationBinding [] annotations) {
-
+
if (genericType.hasTypeAnnotations()) // @NonNull (List<String>) and not (@NonNull List)<String>
throw new IllegalStateException();
-
+
ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(genericType, typeArguments, enclosingType, annotations);
if (parameterizedType != null)
return parameterizedType;
-
+
ParameterizedTypeBinding nakedType = super.getParameterizedType(genericType, typeArguments, enclosingType);
:giro */
@Override
@@ -139,18 +139,18 @@ public class AnnotatableTypeSystem extends TypeSystem {
if (genericType.hasTypeAnnotations()) // @NonNull (List<String>) and not (@NonNull List)<String>
throw new IllegalStateException();
- ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(genericType, typeArguments,
+ ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(genericType, typeArguments,
teamAnchor, valueParamPosition, enclosingType, annotations);
if (parameterizedType != null)
return parameterizedType;
ParameterizedTypeBinding nakedType = super.getParameterizedType(genericType, typeArguments, teamAnchor, valueParamPosition, enclosingType);
// SH}
-
+
if (!haveTypeAnnotations(genericType, enclosingType, typeArguments, annotations))
return nakedType;
-
+
//{ObjectTeams: dependent type?
-/* orig:
+/* orig:
parameterizedType = new ParameterizedTypeBinding(genericType, typeArguments, enclosingType, this.environment);
parameterizedType.id = nakedType.id;
parameterizedType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled);
@@ -173,7 +173,7 @@ public class AnnotatableTypeSystem extends TypeSystem {
// SH}
return (ParameterizedTypeBinding) cacheDerivedType(genericType, nakedType, parameterizedType);
}
-
+
@Override
public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) {
//{ObjectTeams: more args (default values):
@@ -199,7 +199,7 @@ public class AnnotatableTypeSystem extends TypeSystem {
if (!genericType.hasEnclosingInstanceContext() && enclosingType != null) {
enclosingType = (ReferenceBinding) enclosingType.original();
}
-
+
RawTypeBinding nakedType = null;
TypeBinding[] derivedTypes = getDerivedTypes(genericType);
for (int i = 0, length = derivedTypes.length; i < length; i++) {
@@ -216,36 +216,36 @@ public class AnnotatableTypeSystem extends TypeSystem {
}
if (nakedType == null)
nakedType = super.getRawType(genericType, enclosingType);
-
+
if (!haveTypeAnnotations(genericType, enclosingType, null, annotations))
return nakedType;
-
+
RawTypeBinding rawType = new RawTypeBinding(genericType, enclosingType, this.environment);
rawType.id = nakedType.id;
rawType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled);
return (RawTypeBinding) cacheDerivedType(genericType, nakedType, rawType);
}
-
+
@Override
public RawTypeBinding getRawType(ReferenceBinding genericType, ReferenceBinding enclosingType) {
return getRawType(genericType, enclosingType, Binding.NO_ANNOTATIONS);
}
-
+
@Override
public WildcardBinding getWildcard(ReferenceBinding genericType, int rank, TypeBinding bound, TypeBinding[] otherBounds, int boundKind, AnnotationBinding [] annotations) {
-
+
if (genericType == null) // pseudo wildcard denoting composite bounds for lub computation
genericType = ReferenceBinding.LUB_GENERIC;
if (genericType.hasTypeAnnotations())
throw new IllegalStateException();
-
+
WildcardBinding nakedType = null;
boolean useDerivedTypesOfBound = bound instanceof TypeVariableBinding || (bound instanceof ParameterizedTypeBinding && !(bound instanceof RawTypeBinding)) ;
TypeBinding[] derivedTypes = getDerivedTypes(useDerivedTypesOfBound ? bound : genericType);
for (int i = 0, length = derivedTypes.length; i < length; i++) {
TypeBinding derivedType = derivedTypes[i];
- if (derivedType == null)
+ if (derivedType == null)
break;
if (!derivedType.isWildcard() || derivedType.actualType() != genericType || derivedType.rank() != rank) //$IDENTITY-COMPARISON$
continue;
@@ -256,13 +256,13 @@ public class AnnotatableTypeSystem extends TypeSystem {
if (!derivedType.hasTypeAnnotations())
nakedType = (WildcardBinding) derivedType;
}
-
+
if (nakedType == null)
nakedType = super.getWildcard(genericType, rank, bound, otherBounds, boundKind);
-
+
if (!haveTypeAnnotations(genericType, bound, otherBounds, annotations))
return nakedType;
-
+
WildcardBinding wildcard = new WildcardBinding(genericType, rank, bound, otherBounds, boundKind, this.environment);
wildcard.id = nakedType.id;
wildcard.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled);
@@ -279,10 +279,10 @@ public class AnnotatableTypeSystem extends TypeSystem {
*/
@Override
public TypeBinding getAnnotatedType(TypeBinding type, AnnotationBinding[][] annotations) {
-
+
if (type == null || !type.isValidBinding() || annotations == null || annotations.length == 0)
return type;
-
+
TypeBinding annotatedType = null;
switch (type.kind()) {
case Binding.ARRAY_TYPE:
@@ -298,17 +298,17 @@ public class AnnotatableTypeSystem extends TypeSystem {
case Binding.WILDCARD_TYPE:
case Binding.INTERSECTION_TYPE:
case Binding.INTERSECTION_TYPE18:
- /* Taking the binding of QTR as an example, there could be different annotatable components, but we come in a with a single binding, e.g:
+ /* Taking the binding of QTR as an example, there could be different annotatable components, but we come in a with a single binding, e.g:
@T Z; type => Z annotations => [[@T]]
@T Y.@T Z type => Z annotations => [[@T][@T]]
- @T X.@T Y.@T Z type => Z annotations => [[@T][@T][@T]]
+ @T X.@T Y.@T Z type => Z annotations => [[@T][@T][@T]]
java.lang.@T X.@T Y.@T Z type => Z annotations => [[][][@T][@T][@T]]
in all these cases the incoming type binding is for Z, but annotations are for different levels. We need to align their layout for proper attribution.
*/
-
+
if (type.isUnresolvedType() && CharOperation.indexOf('$', type.sourceName()) > 0)
type = BinaryTypeBinding.resolveType(type, this.environment, true); // must resolve member types before asking for enclosingType
-
+
int levels = type.depth() + 1;
TypeBinding [] types = new TypeBinding[levels];
types[--levels] = type;
@@ -324,7 +324,7 @@ public class AnnotatableTypeSystem extends TypeSystem {
if (annotations[i] != null && annotations[i].length > 0)
break;
}
- if (i == levels) // empty annotations array ?
+ if (i == levels) // empty annotations array ?
return type;
if (j < 0) // Not kosher, broken type that is not flagged as invalid while reporting compilation error ? don't touch.
return type;
@@ -343,10 +343,10 @@ public class AnnotatableTypeSystem extends TypeSystem {
return annotatedType;
}
- /* Private subroutine for public APIs. Create an annotated version of the type. To materialize the annotated version, we can't use new since
- this is a general purpose method designed to deal type bindings of all types. "Clone" the incoming type, specializing for any enclosing type
- that may itself be possibly be annotated. This is so the binding for @Outer Outer.Inner != Outer.@Inner Inner != @Outer Outer.@Inner Inner.
- Likewise so the bindings for @Readonly List<@NonNull String> != @Readonly List<@Nullable String> != @Readonly List<@Interned String>
+ /* Private subroutine for public APIs. Create an annotated version of the type. To materialize the annotated version, we can't use new since
+ this is a general purpose method designed to deal type bindings of all types. "Clone" the incoming type, specializing for any enclosing type
+ that may itself be possibly be annotated. This is so the binding for @Outer Outer.Inner != Outer.@Inner Inner != @Outer Outer.@Inner Inner.
+ Likewise so the bindings for @Readonly List<@NonNull String> != @Readonly List<@Nullable String> != @Readonly List<@Interned String>
*/
private TypeBinding getAnnotatedType(TypeBinding type, TypeBinding enclosingType, AnnotationBinding[] annotations) {
if (type.kind() == Binding.PARAMETERIZED_TYPE) {
@@ -371,10 +371,10 @@ public class AnnotatableTypeSystem extends TypeSystem {
for (int i = 0, length = derivedTypes.length; i < length; i++) {
TypeBinding derivedType = derivedTypes[i];
if (derivedType == null) break;
-
+
if (derivedType.enclosingType() != enclosingType || !Util.effectivelyEqual(derivedType.typeArguments(), type.typeArguments())) //$IDENTITY-COMPARISON$
continue;
-
+
switch(type.kind()) {
case Binding.ARRAY_TYPE:
if (!derivedType.isArrayType() || derivedType.dimensions() != type.dimensions() || derivedType.leafComponentType() != type.leafComponentType()) //$IDENTITY-COMPARISON$
@@ -414,10 +414,10 @@ public class AnnotatableTypeSystem extends TypeSystem {
}
if (nakedType == null)
nakedType = getUnannotatedType(type);
-
+
if (!haveTypeAnnotations(type, enclosingType, null, annotations))
return nakedType;
-
+
TypeBinding annotatedType = type.clone(enclosingType);
annotatedType.id = nakedType.id;
annotatedType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled);
@@ -458,12 +458,12 @@ public class AnnotatableTypeSystem extends TypeSystem {
private boolean haveTypeAnnotations(TypeBinding leafType, AnnotationBinding[] annotations) {
return haveTypeAnnotations(leafType, null, null, annotations);
}
-
+
private boolean haveTypeAnnotations(TypeBinding memberType, TypeBinding enclosingType) {
return haveTypeAnnotations(memberType, enclosingType, null, null);
}
- /* Utility method to "flatten" annotations. For multidimensional arrays, we encode the annotations into a flat array
+ /* Utility method to "flatten" annotations. For multidimensional arrays, we encode the annotations into a flat array
where a null separates the annotations of dimension n from dimension n - 1 as well as dimenion n + 1. There is a
final null always.
*/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotationBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotationBinding.java
index 912c34c46..3aa1b607c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotationBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotationBinding.java
@@ -160,7 +160,7 @@ private static AnnotationBinding buildTargetAnnotation(long bits, LookupEnvironm
arraysize++;
if ((bits & TagBits.AnnotationForRecordComponent) != 0)
arraysize++;
-
+
Object[] value = new Object[arraysize];
if (arraysize > 0) {
ReferenceBinding elementType = env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_ELEMENTTYPE, null);
@@ -249,7 +249,7 @@ public String toString() {
if (this.pairs != null && this.pairs.length > 0) {
buffer.append('(');
if (this.pairs.length == 1 && CharOperation.equals(this.pairs[0].getName(), TypeConstants.VALUE)) {
- buffer.append(this.pairs[0].value);
+ buffer.append(this.pairs[0].value);
} else {
for (int i = 0, max = this.pairs.length; i < max; i++) {
if (i > 0) buffer.append(", "); //$NON-NLS-1$
@@ -284,7 +284,7 @@ public boolean equals(Object object) {
final ElementValuePair[] thisElementValuePairs = this.getElementValuePairs();
final ElementValuePair[] thatElementValuePairs = that.getElementValuePairs();
final int length = thisElementValuePairs.length;
- if (length != thatElementValuePairs.length)
+ if (length != thatElementValuePairs.length)
return false;
loop: for (int i = 0; i < length; i++) {
ElementValuePair thisPair = thisElementValuePairs[i];
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ArrayBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ArrayBinding.java
index 1005de5a9..6f4b38375 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ArrayBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ArrayBinding.java
@@ -59,7 +59,7 @@ public final class ArrayBinding extends TypeBinding {
// possible bits are TagBits.AnnotationNonNull and TagBits.AnnotationNullable
// (only ever set when CompilerOptions.isAnnotationBasedNullAnalysisEnabled == true):
public long[] nullTagBitsPerDimension;
-
+
private MethodBinding clone;
public ArrayBinding(TypeBinding type, int dimensions, LookupEnvironment environment) {
@@ -210,13 +210,13 @@ public int dimensions() {
*/
public TypeBinding elementsType() {
-
- if (this.dimensions == 1)
+
+ if (this.dimensions == 1)
return this.leafComponentType;
-
+
AnnotationBinding [] oldies = getTypeAnnotations();
AnnotationBinding [] newbies = Binding.NO_ANNOTATIONS;
-
+
for (int i = 0, length = oldies == null ? 0 : oldies.length; i < length; i++) {
if (oldies[i] == null) {
System.arraycopy(oldies, i+1, newbies = new AnnotationBinding[length - i - 1], 0, length - i - 1);
@@ -402,8 +402,8 @@ public char[] nullAnnotatedReadableName(CompilerOptions options, boolean shortNa
fqAnnotationName = options.nonNullAnnotationName;
else
fqAnnotationName = options.nullableAnnotationName;
- char[] annotationName = shortNames
- ? fqAnnotationName[fqAnnotationName.length-1]
+ char[] annotationName = shortNames
+ ? fqAnnotationName[fqAnnotationName.length-1]
: CharOperation.concatWith(fqAnnotationName, '.');
brackets[i] = new char[annotationName.length+3];
brackets[i][0] = '@';
@@ -411,10 +411,10 @@ public char[] nullAnnotatedReadableName(CompilerOptions options, boolean shortNa
brackets[i][annotationName.length+1] = '[';
brackets[i][annotationName.length+2] = ']';
} else {
- brackets[i] = new char[]{'[', ']'};
+ brackets[i] = new char[]{'[', ']'};
}
}
- return CharOperation.concat(this.leafComponentType.nullAnnotatedReadableName(options, shortNames),
+ return CharOperation.concat(this.leafComponentType.nullAnnotatedReadableName(options, shortNames),
CharOperation.concatWith(brackets, ' '),
' ');
}
@@ -453,12 +453,12 @@ public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNull
if (annotations == null || annotations.length == 0)
return;
this.typeAnnotations = annotations;
-
+
if (evalNullAnnotations) {
long nullTagBits = 0;
if (this.nullTagBitsPerDimension == null)
this.nullTagBitsPerDimension = new long[this.dimensions + 1];
-
+
int dimension = 0;
for (int i = 0, length = annotations.length; i < length; i++) {
AnnotationBinding annotation = annotations[i];
@@ -507,15 +507,15 @@ public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceB
/* Leaf component type is the key in the type system. If it undergoes change, the array has to be rehashed.
We achieve by creating a fresh array with the new component type and equating this array's id with that.
This means this array can still be found under the old key, but that is harmless (since the component type
- is always consulted (see TypeSystem.getArrayType()).
-
- This also means that this array type is not a fully interned singleton: There is `this' object and there is
- the array that is being created down below that gets cached by the type system and doled out for all further
- array creations against the same (raw) component type, dimensions and annotations. This again is harmless,
- since TypeBinding.id is consulted for (in)equality checks.
-
+ is always consulted (see TypeSystem.getArrayType()).
+
+ This also means that this array type is not a fully interned singleton: There is `this' object and there is
+ the array that is being created down below that gets cached by the type system and doled out for all further
+ array creations against the same (raw) component type, dimensions and annotations. This again is harmless,
+ since TypeBinding.id is consulted for (in)equality checks.
+
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=430425 for details and a test case.
- */
+ */
if (this.leafComponentType != resolvedType) //$IDENTITY-COMPARISON$
this.id = env.createArrayType(this.leafComponentType, this.dimensions, this.typeAnnotations).id;
this.tagBits |= this.leafComponentType.tagBits & (TagBits.HasTypeVariable | TagBits.HasDirectWildcard | TagBits.HasMissingType | TagBits.HasCapturedWildcard);
@@ -561,7 +561,7 @@ public boolean acceptsNonNullDefault() {
@Override
public long updateTagBits() {
if (this.leafComponentType != null)
- this.tagBits |= this.leafComponentType.updateTagBits();
+ this.tagBits |= this.leafComponentType.updateTagBits();
return super.updateTagBits();
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding.java
index a7f49f048..ba5ac37cb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding.java
@@ -24,17 +24,17 @@ public class BaseTypeBinding extends TypeBinding {
public static final int WIDENING = 2;
public static final int NARROWING = 4;
public static final int MAX_CONVERSIONS = 16*16; // well-known x well-known
-
+
static {
CONVERSIONS = initializeConversions();
}
-
+
public static final int[] initializeConversions(){
// fromType destType --> conversion
// 0000 0000 0000
int[] table = new int[MAX_CONVERSIONS];
-
+
table[TypeIds.Boolean2Boolean] = IDENTITY;
table[TypeIds.Byte2Byte] = IDENTITY;
@@ -92,7 +92,7 @@ public class BaseTypeBinding extends TypeBinding {
table[TypeIds.Double2Long] = NARROWING;
table[TypeIds.Double2Float] = NARROWING;
table[TypeIds.Double2Double]= IDENTITY;
-
+
return table;
}
/**
@@ -104,8 +104,8 @@ public class BaseTypeBinding extends TypeBinding {
*/
public static final boolean isNarrowing(int left, int right) {
int right2left = right + (left<<4);
- return right2left >= 0
- && right2left < MAX_CONVERSIONS
+ return right2left >= 0
+ && right2left < MAX_CONVERSIONS
&& (CONVERSIONS[right2left] & (IDENTITY|NARROWING)) != 0;
}
@@ -118,11 +118,11 @@ public class BaseTypeBinding extends TypeBinding {
*/
public static final boolean isWidening(int left, int right) {
int right2left = right + (left<<4);
- return right2left >= 0
- && right2left < MAX_CONVERSIONS
+ return right2left >= 0
+ && right2left < MAX_CONVERSIONS
&& (CONVERSIONS[right2left] & (IDENTITY|WIDENING)) != 0;
}
-
+
public char[] simpleName;
private char[] constantPoolName;
@@ -154,13 +154,13 @@ public class BaseTypeBinding extends TypeBinding {
public TypeBinding clone(TypeBinding enclosingType) {
return new BaseTypeBinding(this.id, this.simpleName, this.constantPoolName);
}
-
+
@Override
public PackageBinding getPackage() {
return null;
}
-
+
/* Answer true if the receiver type can be assigned to the argument type (right)
*/
@Override
@@ -168,13 +168,13 @@ public class BaseTypeBinding extends TypeBinding {
if (equalsEquals(this, right))
return true;
int right2left = this.id + (right.id<<4);
- if (right2left >= 0
- && right2left < MAX_CONVERSIONS
+ if (right2left >= 0
+ && right2left < MAX_CONVERSIONS
&& (CONVERSIONS[right2left] & (IDENTITY|WIDENING)) != 0)
return true;
return this == TypeBinding.NULL && !right.isBaseType();
}
-
+
@Override
public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
super.setTypeAnnotations(annotations, false); // never set nullTagBits on base types
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryModuleBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryModuleBinding.java
index 5102e9ca1..4f35dc217 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryModuleBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryModuleBinding.java
@@ -28,7 +28,7 @@ import org.eclipse.jdt.internal.compiler.util.Util;
import org.eclipse.jdt.internal.compiler.env.IModuleAwareNameEnvironment;
public class BinaryModuleBinding extends ModuleBinding {
-
+
private static class AutomaticModuleBinding extends ModuleBinding {
boolean autoNameFromManifest;
@@ -80,12 +80,12 @@ public class BinaryModuleBinding extends ModuleBinding {
return this.moduleName;
}
}
-
+
private IPackageExport[] unresolvedExports;
private IPackageExport[] unresolvedOpens;
private char[][] unresolvedUses;
private IService[] unresolvedProvides;
-
+
/**
* Construct a named module from binary, could be an auto module - or from an info from Java Model.
* <p>
@@ -106,7 +106,7 @@ public class BinaryModuleBinding extends ModuleBinding {
existingEnvironment.root.knownModules.put(this.moduleName, this);
cachePartsFrom(module);
}
-
+
void cachePartsFrom(IBinaryModule module) {
if (module.isOpen())
this.modifiers |= ClassFileConstants.ACC_OPEN;
@@ -173,7 +173,7 @@ public class BinaryModuleBinding extends ModuleBinding {
resolvePackages();
return super.getExports();
}
-
+
@Override
public PlainPackageBinding[] getOpens() {
if (this.openedPackages == null && this.unresolvedOpens != null)
@@ -195,7 +195,7 @@ public class BinaryModuleBinding extends ModuleBinding {
}
if (count < this.exportedPackages.length)
System.arraycopy(this.exportedPackages, 0, this.exportedPackages = new PlainPackageBinding[count], 0, count);
-
+
this.openedPackages = new PlainPackageBinding[this.unresolvedOpens.length];
count = 0;
for (int i = 0; i < this.unresolvedOpens.length; i++) {
@@ -224,7 +224,7 @@ public class BinaryModuleBinding extends ModuleBinding {
}
return super.getUses();
}
-
+
@Override
public TypeBinding[] getServices() {
if (this.services == null)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
index fd82699cb..23044b80c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
@@ -192,7 +192,7 @@ public class BinaryTypeBinding extends ReferenceBinding {
}
}
public ExternalAnnotationStatus externalAnnotationStatus = ExternalAnnotationStatus.NOT_EEA_CONFIGURED; // unless proven differently
-
+
//{ObjectTeams: support callout-to-field
/** Callout to field adds faked access method (set or get): */
@@ -283,18 +283,18 @@ static Object convertMemberValue(Object binaryValue, LookupEnvironment env, char
public TypeBinding clone(TypeBinding outerType) {
BinaryTypeBinding copy = new BinaryTypeBinding(this);
copy.enclosingType = (ReferenceBinding) outerType;
-
+
/* BinaryTypeBinding construction is not "atomic" and is split between the constructor and cachePartsFrom and between the two
stages of construction, clone can kick in when LookupEnvironment.createBinaryTypeFrom calls PackageBinding.addType. This
can result in some URB's being resolved, which could trigger the clone call, leaving the clone with semi-initialized prototype.
Fortunately, the protocol for this type demands all clients to use public access methods, where we can deflect the call to the
prototype. enclosingType() and memberTypes() should not delegate, so ...
*/
- if (copy.enclosingType != null)
+ if (copy.enclosingType != null)
copy.tagBits |= TagBits.HasUnresolvedEnclosingType;
- else
+ else
copy.tagBits &= ~TagBits.HasUnresolvedEnclosingType;
-
+
copy.tagBits |= TagBits.HasUnresolvedMemberTypes;
return copy;
}
@@ -407,7 +407,7 @@ public BinaryTypeBinding(PackageBinding packageBinding, IBinaryType binaryType,
* @param needFieldsAndMethods
*/
public BinaryTypeBinding(PackageBinding packageBinding, IBinaryType binaryType, LookupEnvironment environment, boolean needFieldsAndMethods) {
-
+
this.prototype = this;
this.compoundName = CharOperation.splitOn('/', binaryType.getName());
computeId();
@@ -467,11 +467,11 @@ public boolean canBeSeenBy(Scope sco) {
*/
@Override
public FieldBinding[] availableFields() {
-
+
if (!isPrototype()) {
return this.prototype.availableFields();
}
-
+
if ((this.tagBits & TagBits.AreFieldsComplete) != 0)
return this.fields;
@@ -501,7 +501,7 @@ private TypeVariableBinding[] addMethodTypeVariables(TypeVariableBinding[] metho
if (!isPrototype()) throw new IllegalStateException();
if (this.typeVariables == null || this.typeVariables == Binding.NO_TYPE_VARIABLES) {
return methodTypeVars;
- }
+ }
if (methodTypeVars == null || methodTypeVars == Binding.NO_TYPE_VARIABLES) {
return this.typeVariables;
}
@@ -528,7 +528,7 @@ private TypeVariableBinding[] addMethodTypeVariables(TypeVariableBinding[] metho
*/
@Override
public MethodBinding[] availableMethods() {
-
+
if (!isPrototype()) {
return this.prototype.availableMethods();
}
@@ -656,7 +656,7 @@ void cachePartsFrom(IBinaryType binaryType, boolean needFieldsAndMethods) {
this.tagBits |= binaryType.getTagBits();
if (this.environment.globalOptions.complianceLevel < ClassFileConstants.JDK1_8)
this.tagBits &= ~TagBits.AnnotationForTypeUse; // avoid confusion with semantics that are not supported at 1.7-
-
+
char[][][] missingTypeNames = binaryType.getMissingTypeNames();
SignatureWrapper wrapper = null;
if (typeSignature != null) {
@@ -677,7 +677,7 @@ void cachePartsFrom(IBinaryType binaryType, boolean needFieldsAndMethods) {
MethodBinding enclosingMethod = findMethod(methodDescriptor, missingTypeNames);
if (enclosingMethod != null) {
typeVars = enclosingMethod.typeVariables;
- this.typeVariables = addMethodTypeVariables(typeVars);
+ this.typeVariables = addMethodTypeVariables(typeVars);
}
}
if (typeSignature == null) {
@@ -716,7 +716,7 @@ void cachePartsFrom(IBinaryType binaryType, boolean needFieldsAndMethods) {
}
} else {
// attempt to find the superclass if it exists in the cache (otherwise - resolve it when requested)
- this.superclass = (ReferenceBinding) this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames,
+ this.superclass = (ReferenceBinding) this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames,
toplevelWalker.toSupertype((short) -1, wrapper.peekFullType()));
//{ObjectTeams: wrapping of type (incl. its arguments)?
if (!TypeAnalyzer.isTopConfined(this.superclass))
@@ -1108,7 +1108,7 @@ private MethodBinding createMethod(IBinaryMethod method, IBinaryType binaryType,
if (!method.isConstructor())
returnType = this.environment.getTypeFromSignature(methodDescriptor, index + 1, -1, false, this, missingTypeNames, walker.toMethodReturn()); // index is currently pointing at the ')'
-
+
final int argumentNamesLength = argumentNames == null ? 0 : argumentNames.length;
if (startIndex > 0 && argumentNamesLength > 0) {
// We'll have to slice the starting arguments off
@@ -1199,7 +1199,7 @@ private MethodBinding createMethod(IBinaryMethod method, IBinaryType binaryType,
// SH}
? new MethodBinding(methodModifiers, parameters, exceptions, this)
: new MethodBinding(methodModifiers, method.getSelector(), returnType, parameters, exceptions, this);
-
+
IBinaryAnnotation[] receiverAnnotations = walker.toReceiver().getAnnotationsAtCursor(this.id, false);
if (receiverAnnotations != null && receiverAnnotations.length > 0) {
result.receiver = this.environment.createAnnotatedType(this, createAnnotations(receiverAnnotations, this.environment, missingTypeNames));
@@ -1225,7 +1225,7 @@ private MethodBinding createMethod(IBinaryMethod method, IBinaryType binaryType,
}
if (argumentNames != null) result.parameterNames = argumentNames;
-
+
if (use15specifics)
result.tagBits |= method.getTagBits();
result.typeVariables = typeVars;
@@ -1404,7 +1404,7 @@ private TypeVariableBinding[] createTypeVariables(SignatureWrapper wrapper, bool
int colon = CharOperation.indexOf(Util.C_COLON, typeSignature, i);
char[] variableName = CharOperation.subarray(typeSignature, i, colon);
TypeVariableBinding typeVariable = new TypeVariableBinding(variableName, this, rank, this.environment);
- AnnotationBinding [] annotations = BinaryTypeBinding.createAnnotations(walker.toTypeParameter(isClassTypeParameter, rank++).getAnnotationsAtCursor(0, false),
+ AnnotationBinding [] annotations = BinaryTypeBinding.createAnnotations(walker.toTypeParameter(isClassTypeParameter, rank++).getAnnotationsAtCursor(0, false),
this.environment, missingTypeNames);
if (annotations != null && annotations != Binding.NO_ANNOTATIONS)
typeVariable.setTypeAnnotations(annotations, this.environment.globalOptions.isAnnotationBasedNullAnalysisEnabled);
@@ -1445,7 +1445,7 @@ public ReferenceBinding enclosingType() { // should not delegate to prototype.
// NOTE: the type of each field of a binary type is resolved when needed
@Override
public FieldBinding[] fields() {
-
+
if (!isPrototype()) {
return this.fields = this.prototype.fields();
}
@@ -1517,7 +1517,7 @@ private MethodBinding findMethod(char[] methodDescriptor, char[][][] missingType
/* orig:
if (TypeBinding.notEquals(parameters[j], parameters2[j]) && TypeBinding.notEquals(parameters[j].erasure(), parameters2[j].erasure())) {
:giro */
- if ( !AnchorMapping.areTypesEqual(parameters[j], parameters2[j], currentMethod)
+ if ( !AnchorMapping.areTypesEqual(parameters[j], parameters2[j], currentMethod)
&& !AnchorMapping.areTypesEqual(parameters[j].erasure(), parameters2[j].erasure(), currentMethod)) {
// SH}
continue loop;
@@ -1648,7 +1648,7 @@ public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes
//NOTE: the type of a field of a binary type is resolved when needed
@Override
public FieldBinding getField(char[] fieldName, boolean needResolve) {
-
+
if (!isPrototype())
return this.prototype.getField(fieldName, needResolve);
@@ -1738,7 +1738,7 @@ public static final TypeDeclaration binaryEnclosingTeam = new TypeDeclaration(nu
// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
@Override
public MethodBinding[] getMethods(char[] selector) {
-
+
if (!isPrototype())
return this.prototype.getMethods(selector);
@@ -1779,7 +1779,7 @@ public MethodBinding[] getMethods(char[] selector) {
// The suggested parameter length is optional and may not be guaranteed by every type.
@Override
public MethodBinding[] getMethods(char[] selector, int suggestedParameterLength) {
-
+
if (!isPrototype())
return this.prototype.getMethods(selector, suggestedParameterLength);
@@ -1838,10 +1838,10 @@ public TypeVariableBinding getTypeVariable(char[] variableName) {
}
@Override
public boolean hasTypeBit(int bit) {
-
+
if (!isPrototype())
return this.prototype.hasTypeBit(bit);
-
+
// ensure hierarchy is resolved, which will propagate bits down to us
boolean wasToleratingMissingTypeProcessingAnnotations = this.environment.mayTolerateMissingType;
this.environment.mayTolerateMissingType = true;
@@ -1903,7 +1903,7 @@ private void initializeTypeVariable(TypeVariableBinding variable, TypeVariableBi
*/
@Override
public boolean isEquivalentTo(TypeBinding otherType) {
-
+
if (TypeBinding.equalsEquals(this, otherType)) return true;
if (otherType == null) return false;
switch(otherType.kind()) {
@@ -1912,12 +1912,12 @@ public boolean isEquivalentTo(TypeBinding otherType) {
return ((WildcardBinding) otherType).boundCheck(this);
case Binding.PARAMETERIZED_TYPE:
/* With the hybrid 1.4/1.5+ projects modes, while establishing type equivalence, we need to
- be prepared for a type such as Map appearing in one of three forms: As (a) a ParameterizedTypeBinding
- e.g Map<String, String>, (b) as RawTypeBinding Map#RAW and finally (c) as a BinaryTypeBinding
+ be prepared for a type such as Map appearing in one of three forms: As (a) a ParameterizedTypeBinding
+ e.g Map<String, String>, (b) as RawTypeBinding Map#RAW and finally (c) as a BinaryTypeBinding
When the usage of a type lacks type parameters, whether we land up with the raw form or not depends
on whether the underlying type was "seen to be" a generic type in the particular build environment or
- not. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=186565 && https://bugs.eclipse.org/bugs/show_bug.cgi?id=328827
- */
+ not. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=186565 && https://bugs.eclipse.org/bugs/show_bug.cgi?id=328827
+ */
case Binding.RAW_TYPE :
return TypeBinding.equalsEquals(otherType.erasure(), this);
}
@@ -1925,18 +1925,18 @@ public boolean isEquivalentTo(TypeBinding otherType) {
}
@Override
public boolean isGenericType() {
-
+
if (!isPrototype())
return this.prototype.isGenericType();
-
+
return this.typeVariables != Binding.NO_TYPE_VARIABLES;
}
@Override
public boolean isHierarchyConnected() {
-
+
if (!isPrototype())
return this.prototype.isHierarchyConnected();
-
+
return (this.tagBits & (TagBits.HasUnresolvedSuperclass | TagBits.HasUnresolvedSuperinterfaces)) == 0;
}
@Override
@@ -1946,10 +1946,10 @@ public boolean isRepeatableAnnotationType() {
}
@Override
public int kind() {
-
+
if (!isPrototype())
return this.prototype.kind();
-
+
if (this.typeVariables != Binding.NO_TYPE_VARIABLES)
return Binding.GENERIC_TYPE;
return Binding.TYPE;
@@ -1976,7 +1976,7 @@ public ReferenceBinding[] memberTypes() {
this.memberTypesSorted = true;
return this.memberTypes;
}
-
+
if ((this.tagBits & TagBits.HasUnresolvedMemberTypes) == 0) {
return maybeSortedMemberTypes();
}
@@ -2004,11 +2004,11 @@ private ReferenceBinding[] maybeSortedMemberTypes() {
// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
@Override
public MethodBinding[] methods() {
-
+
if (!isPrototype()) {
return this.methods = this.prototype.methods();
}
-
+
if ((this.tagBits & TagBits.AreMethodsComplete) != 0)
return this.methods;
@@ -2052,10 +2052,10 @@ public ReferenceBinding containerAnnotationType() {
}
private FieldBinding resolveTypeFor(FieldBinding field) {
-
+
if (!isPrototype())
return this.prototype.resolveTypeFor(field);
-
+
if ((field.modifiers & ExtraCompilerModifiers.AccUnresolved) == 0)
return field;
@@ -2086,10 +2086,10 @@ private FieldBinding resolveTypeFor(FieldBinding field) {
return field;
}
MethodBinding resolveTypesFor(MethodBinding method) {
-
+
if (!isPrototype())
return this.prototype.resolveTypesFor(method);
-
+
if ((method.modifiers & ExtraCompilerModifiers.AccUnresolved) == 0)
return method;
@@ -2138,10 +2138,10 @@ MethodBinding resolveTypesFor(MethodBinding method) {
public
// SH}
AnnotationBinding[] retrieveAnnotations(Binding binding) {
-
+
if (!isPrototype())
return this.prototype.retrieveAnnotations(binding);
-
+
return AnnotationBinding.addStandardAnnotations(super.retrieveAnnotations(binding), binding.getAnnotationTagBits(), this.environment);
}
@@ -2160,10 +2160,10 @@ public void tagAsHavingDefectiveContainerType() {
@Override
SimpleLookupTable storedAnnotations(boolean forceInitialize, boolean forceStore) {
-
+
if (!isPrototype())
return this.prototype.storedAnnotations(forceInitialize, forceStore);
-
+
if (forceInitialize && this.storedAnnotations == null) {
//{ObjectTeams: do support annotations for roles for the sake of copying:
if (!this.isRole())
@@ -2209,7 +2209,7 @@ private void scanFieldForNullAnnotation(IBinaryField field, FieldBinding fieldBi
boolean explicitNullness = false;
IBinaryAnnotation[] annotations = externalAnnotationWalker != ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER
- ? externalAnnotationWalker.getAnnotationsAtCursor(fieldBinding.type.id, false)
+ ? externalAnnotationWalker.getAnnotationsAtCursor(fieldBinding.type.id, false)
: field.getAnnotations();
if (annotations != null) {
for (int i = 0; i < annotations.length; i++) {
@@ -2351,8 +2351,8 @@ private void scanMethodForNullAnnotation(IBinaryMethod method, MethodBinding met
}
}
if (useNullTypeAnnotations && this.externalAnnotationStatus.isPotentiallyUnannotatedLib()) {
- if (methodBinding.returnType.hasNullTypeAnnotations()
- || (methodBinding.tagBits & TagBits.AnnotationNullMASK) != 0
+ if (methodBinding.returnType.hasNullTypeAnnotations()
+ || (methodBinding.tagBits & TagBits.AnnotationNullMASK) != 0
|| methodBinding.parameterNonNullness != null) {
this.externalAnnotationStatus = ExternalAnnotationStatus.TYPE_IS_ANNOTATED;
} else {
@@ -2482,7 +2482,7 @@ public static int evaluateTypeQualifierDefault(ReferenceBinding annotationType)
for (Object value1 : values)
nullness |= Annotation.nullLocationBitsFromElementTypeAnnotationValue(value1);
} else {
- nullness |= Annotation.nullLocationBitsFromElementTypeAnnotationValue(value);
+ nullness |= Annotation.nullLocationBitsFromElementTypeAnnotationValue(value);
}
return nullness;
}
@@ -2529,11 +2529,11 @@ private void scanTypeForContainerAnnotation(IBinaryType binaryType, char[][][] m
*/
@Override
public ReferenceBinding superclass() {
-
+
if (!isPrototype()) {
return this.superclass = this.prototype.superclass();
}
-
+
if ((this.tagBits & TagBits.HasUnresolvedSuperclass) == 0)
return this.superclass;
@@ -2554,7 +2554,7 @@ public ReferenceBinding superclass() {
}
}
this.typeBits |= (this.superclass.typeBits & TypeIds.InheritableBits);
- if ((this.typeBits & (TypeIds.BitAutoCloseable|TypeIds.BitCloseable)) != 0) // avoid the side-effects of hasTypeBit()!
+ if ((this.typeBits & (TypeIds.BitAutoCloseable|TypeIds.BitCloseable)) != 0) // avoid the side-effects of hasTypeBit()!
this.typeBits |= applyCloseableClassWhitelists(this.environment.globalOptions);
detectCircularHierarchy();
return this.superclass;
@@ -2571,7 +2571,7 @@ private void breakLoop() {
currentSuper.tagBits |= TagBits.EndHierarchyCheck;
prevSuper = currentSuper;
currentSuper = currentSuper.superclass();
- }
+ }
}
private void detectCircularHierarchy() {
@@ -2579,14 +2579,14 @@ private void detectCircularHierarchy() {
ReferenceBinding tempSuper = null;
int count = 0;
int skipCount = 20;
- while (currentSuper != null) {
+ while (currentSuper != null) {
if (currentSuper.hasHierarchyCheckStarted())
break;
if (TypeBinding.equalsEquals(currentSuper, this) || TypeBinding.equalsEquals(currentSuper, tempSuper)) {
currentSuper.tagBits |= TagBits.HierarchyHasProblems;
if (currentSuper.isBinaryBinding())
breakLoop();
-
+
return;
}
if (count == skipCount) {
@@ -2595,19 +2595,19 @@ private void detectCircularHierarchy() {
count = 0;
}
//Ignore if the super is not yet resolved..
- if (!currentSuper.isHierarchyConnected())
+ if (!currentSuper.isHierarchyConnected())
return;
- currentSuper = currentSuper.superclass();
+ currentSuper = currentSuper.superclass();
count++;
}
/* No loop detected and completely found that there is no loop
- * So, set that info for all the classes
+ * So, set that info for all the classes
*/
tempSuper = this;
while (TypeBinding.notEquals(currentSuper, tempSuper)) {
tempSuper.setHierarchyCheckDone();
tempSuper=tempSuper.superclass();
- }
+ }
}
//{ObjectTeams:
@@ -2641,7 +2641,7 @@ public void resetSuperclass(ReferenceBinding superClass) {
// NOTE: superInterfaces of binary types are resolved when needed
@Override
public ReferenceBinding[] superInterfaces() {
-
+
if (!isPrototype()) {
return this.superInterfaces = this.prototype.superInterfaces();
}
@@ -2668,10 +2668,10 @@ public ReferenceBinding[] superInterfaces() {
this.superInterfaces[i].superInterfaces();
} finally {
this.environment.mayTolerateMissingType = wasToleratingMissingTypeProcessingAnnotations;
- }
+ }
}
this.typeBits |= (this.superInterfaces[i].typeBits & TypeIds.InheritableBits);
- if ((this.typeBits & (TypeIds.BitAutoCloseable|TypeIds.BitCloseable)) != 0) // avoid the side-effects of hasTypeBit()!
+ if ((this.typeBits & (TypeIds.BitAutoCloseable|TypeIds.BitCloseable)) != 0) // avoid the side-effects of hasTypeBit()!
this.typeBits |= applyCloseableInterfaceWhitelists();
}
this.tagBits &= ~TagBits.HasUnresolvedSuperinterfaces;
@@ -2679,7 +2679,7 @@ public ReferenceBinding[] superInterfaces() {
}
@Override
public TypeVariableBinding[] typeVariables() {
-
+
if (!isPrototype()) {
return this.typeVariables = this.prototype.typeVariables();
}
@@ -2693,10 +2693,10 @@ public TypeVariableBinding[] typeVariables() {
}
@Override
public String toString() {
-
+
if (this.hasTypeAnnotations())
return annotatedDebugName();
-
+
StringBuffer buffer = new StringBuffer();
if (isDeprecated()) buffer.append("deprecated "); //$NON-NLS-1$
@@ -2809,19 +2809,19 @@ public TypeBinding withoutToplevelNullAnnotation() {
}
@Override
MethodBinding[] unResolvedMethods() { // for the MethodVerifier so it doesn't resolve types
-
+
if (!isPrototype())
return this.prototype.unResolvedMethods();
-
+
return this.methods;
}
@Override
public FieldBinding[] unResolvedFields() {
-
+
if (!isPrototype())
return this.prototype.unResolvedFields();
-
+
return this.fields;
}
//{ObjectTeams: for use by TypeModel:
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Binding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Binding.java
index 8a4798823..814a7aec9 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Binding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Binding.java
@@ -54,8 +54,8 @@ public abstract class Binding {
public static final int TYPE_USE = TYPE | ASTNode.Bit15;
public static final int INTERSECTION_TYPE18 = TYPE | ASTNode.Bit16;
public static final int POLY_TYPE = TYPE | ASTNode.Bit17;
-
- // In the unlikely event you add a new type binding, remember to update TypeBindingVisitor and Scope.substitute methods.
+
+ // In the unlikely event you add a new type binding, remember to update TypeBindingVisitor and Scope.substitute methods.
//{ObjectTeams
public static final int BINDING = ASTNode.Bit16; //callin/callout-Binding
@@ -83,7 +83,7 @@ public abstract class Binding {
public static final CallinCalloutBinding[] NO_CALLIN_CALLOUT_BINDINGS = new CallinCalloutBinding[0];
public static final SyntheticArgumentBinding[] NO_SYNTH_ARGUMENTS = new SyntheticArgumentBinding[0];
//Markus Witte}
-
+
public static final FieldBinding[] UNINITIALIZED_FIELDS = new FieldBinding[0];
public static final MethodBinding[] UNINITIALIZED_METHODS = new MethodBinding[0];
public static final ReferenceBinding[] UNINITIALIZED_REFERENCE_TYPES = new ReferenceBinding[0];
@@ -131,7 +131,7 @@ public abstract class Binding {
public static final int DefaultLocationsForTrueValue = DefaultLocationParameter | DefaultLocationReturnType | DefaultLocationField;
- public static final int NullnessDefaultMASK =
+ public static final int NullnessDefaultMASK =
NULL_UNSPECIFIED_BY_DEFAULT | // included to terminate search up the parent chain
DefaultLocationParameter | DefaultLocationReturnType | DefaultLocationField |
DefaultLocationTypeArgument | DefaultLocationTypeParameter | DefaultLocationTypeBound | DefaultLocationArrayContents;
@@ -160,7 +160,7 @@ public abstract class Binding {
/**
* Compute the tagbits for standard annotations. For source types, these could require
* lazily resolving corresponding annotation nodes, in case of forward references.
- * For type use bindings, this method still returns the tagbits corresponding to the type
+ * For type use bindings, this method still returns the tagbits corresponding to the type
* declaration binding.
* @see org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding#getAnnotationTagBits()
*/
@@ -180,7 +180,7 @@ public abstract class Binding {
public boolean isAnnotationType() {
return false;
}
-
+
/* API
* Answer true if the receiver is not a problem binding
*/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
index 9956ab7f1..d53f8d639 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
@@ -119,16 +119,16 @@ public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBindi
anonymousClassScope.buildAnonymousTypeBinding(
enclosingSourceType(),
superBinding);
-
+
/* Tag any enclosing lambdas as instance capturing. Strictly speaking they need not be, unless the local/anonymous type references enclosing instance state.
but the types themselves track enclosing types regardless of whether the state is accessed or not. This creates a mismatch in expectations in code generation
- time, if we choose to make the lambda method static. To keep things simple and avoid a messy rollback, we force the lambda to be an instance method under
+ time, if we choose to make the lambda method static. To keep things simple and avoid a messy rollback, we force the lambda to be an instance method under
this situation. However if per source, the lambda occurs in a static context, we would generate a static synthetic method.
*/
MethodScope methodScope = methodScope();
//{ObjectTeams: nested type of method mapping (via param map)?
if (anonymousType.binding != null) {
- if ( methodScope != null
+ if ( methodScope != null
&& methodScope.referenceContext instanceof AbstractMethodDeclaration
&& ((AbstractMethodDeclaration)methodScope.referenceContext).isMappingWrapper != WrapperKind.NONE)
// in this case isRole() cannot rely of depth() because physically the type is contained in the team;
@@ -151,7 +151,7 @@ public final void addLocalType(TypeDeclaration localType) {
ClassScope localTypeScope = new ClassScope(this, localType);
addSubscope(localTypeScope);
localTypeScope.buildLocalTypeBinding(enclosingSourceType());
-
+
// See comment in addAnonymousType.
MethodScope methodScope = methodScope();
while (methodScope != null && methodScope.referenceContext instanceof LambdaExpression) {
@@ -212,7 +212,7 @@ public final boolean allowBlankFinalFieldAssignment(FieldBinding binding) {
MethodScope methodScope = methodScope();
if (methodScope.isStatic != binding.isStatic())
return false;
- if (methodScope.isLambdaScope())
+ if (methodScope.isLambdaScope())
return false;
return methodScope.isInsideInitializer() // inside initializer
|| ((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod(); // inside constructor or clinit
@@ -361,7 +361,7 @@ public void emulateOuterAccess(LocalVariableBinding outerLocalVariable) {
BlockScope outerVariableScope = outerLocalVariable.declaringScope;
if (outerVariableScope == null)
return; // no need to further emulate as already inserted (val$this$0)
-
+
int depth = 0;
Scope scope = this;
while (outerVariableScope != scope) {
@@ -369,7 +369,7 @@ public void emulateOuterAccess(LocalVariableBinding outerLocalVariable) {
case CLASS_SCOPE:
depth++;
break;
- case METHOD_SCOPE:
+ case METHOD_SCOPE:
if (scope.isLambdaScope()) {
LambdaExpression lambdaExpression = (LambdaExpression) scope.referenceContext();
lambdaExpression.addSyntheticArgument(outerLocalVariable);
@@ -378,9 +378,9 @@ public void emulateOuterAccess(LocalVariableBinding outerLocalVariable) {
}
scope = scope.parent;
}
- if (depth == 0)
+ if (depth == 0)
return;
-
+
MethodScope currentMethodScope = methodScope();
if (outerVariableScope.methodScope() != currentMethodScope) {
NestedTypeBinding currentType = (NestedTypeBinding) enclosingSourceType();
@@ -681,10 +681,10 @@ private Binding internalGetBinding(char[][] compoundName, int mask, InvocationSi
((ProblemFieldBinding)binding).closestMatch,
((ProblemFieldBinding)binding).declaringClass,
CharOperation.concatWith(CharOperation.subarray(compoundName, 0, currentIndex), '.'),
- binding.problemId());
+ binding.problemId());
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=317858 : If field is inaccessible,
- // don't give up yet, continue to look for a visible member type
- if (binding.problemId() != ProblemReasons.NotVisible) {
+ // don't give up yet, continue to look for a visible member type
+ if (binding.problemId() != ProblemReasons.NotVisible) {
return problemFieldBinding;
}
}
@@ -712,7 +712,7 @@ private Binding internalGetBinding(char[][] compoundName, int mask, InvocationSi
// binding is a ReferenceBinding
if (!binding.isValidBinding()) {
//{ObjectTeams: let decapsulation see into nested levels of invisible types:
- if (binding.problemId() == ProblemReasons.NotVisible
+ if (binding.problemId() == ProblemReasons.NotVisible
&& invocationSite instanceof Expression
&& ((Expression)invocationSite).getBaseclassDecapsulation().isAllowed())
{
@@ -747,7 +747,7 @@ private Binding internalGetBinding(char[][] compoundName, int mask, InvocationSi
field.declaringClass,
CharOperation.concatWith(CharOperation.subarray(compoundName, 0, currentIndex), '.'),
ProblemReasons.NonStaticReferenceInStaticContext);
- // Since a qualified reference must be for a static member, it won't affect static-ness of the enclosing method,
+ // Since a qualified reference must be for a static member, it won't affect static-ness of the enclosing method,
// so we don't have to call resetEnclosingMethodStaticFlag() in this case
return binding;
}
@@ -1303,7 +1303,7 @@ public void checkUnclosedCloseables(FlowInfo flowInfo, FlowContext flowContext,
// compute the most specific null status for this resource,
int status = trackingVar.findMostSpecificStatus(flowInfo, this, locationScope);
-
+
if (status == FlowInfo.NULL) {
// definitely unclosed: highest priority
reportResourceLeak(trackingVar, location, status);
@@ -1314,12 +1314,12 @@ public void checkUnclosedCloseables(FlowInfo flowInfo, FlowContext flowContext,
// problems at specific locations: medium priority
if (trackingVar.reportRecordedErrors(this, status, flowInfo.reachMode() != FlowInfo.REACHABLE)) // ... report previously recorded errors
continue;
- }
+ }
if (status == FlowInfo.POTENTIALLY_NULL) {
// potentially unclosed: lower priority
reportResourceLeak(trackingVar, location, status);
} else if (status == FlowInfo.NON_NULL) {
- // properly closed but not managed by t-w-r: lowest priority
+ // properly closed but not managed by t-w-r: lowest priority
if (environment().globalOptions.complianceLevel >= ClassFileConstants.JDK1_7)
trackingVar.reportExplicitClosing(problemReporter());
}
@@ -1327,7 +1327,7 @@ public void checkUnclosedCloseables(FlowInfo flowInfo, FlowContext flowContext,
if (location == null) {
// when leaving this block dispose off all tracking variables:
for (int i=0; i<this.localIndex; i++)
- this.locals[i].closeTracker = null;
+ this.locals[i].closeTracker = null;
this.trackingVariables = null;
}
}
@@ -1339,23 +1339,23 @@ private void reportResourceLeak(FakedTrackingVariable trackingVar, ASTNode locat
trackingVar.reportError(problemReporter(), null, nullStatus);
}
-/**
+/**
* If one branch of an if-else closes any AutoCloseable resource, and if the same
* resource is known to be null on the other branch mark it as closed, too,
* so that merging both branches indicates that the resource is always closed.
* Example:
* FileReader fr1 = null;
* try {\n" +
- * fr1 = new FileReader(someFile);" +
- * fr1.read(buf);\n" +
- * } finally {\n" +
+ * fr1 = new FileReader(someFile);" +
+ * fr1.read(buf);\n" +
+ * } finally {\n" +
* if (fr1 != null)\n" +
* try {\n" +
* fr1.close();\n" +
* } catch (IOException e) {
- * // do nothing
+ * // do nothing
* }
- * // after this if statement fr1 is definitely not leaked
+ * // after this if statement fr1 is definitely not leaked
* }
*/
public void correlateTrackingVarsIfElse(FlowInfo thenFlowInfo, FlowInfo elseFlowInfo) {
@@ -1372,7 +1372,7 @@ public void correlateTrackingVarsIfElse(FlowInfo thenFlowInfo, FlowInfo elseFlow
elseFlowInfo.markNullStatus(trackingVar.binding, nullStatus);
} else if (!hasNullInfoInThen && hasNullInfoInElse) {
int nullStatus = elseFlowInfo.nullStatus(trackingVar.binding);
- thenFlowInfo.markNullStatus(trackingVar.binding, nullStatus);
+ thenFlowInfo.markNullStatus(trackingVar.binding, nullStatus);
}
continue;
}
@@ -1402,7 +1402,7 @@ public void correlateTrackingVarsIfElse(FlowInfo thenFlowInfo, FlowInfo elseFlow
if (!var1SeenInThen && var1SeenInElse && var2SeenInThen && !var2SeenInElse) {
newStatus = FlowInfo.mergeNullStatus(thenFlowInfo.nullStatus(var2.binding), elseFlowInfo.nullStatus(trackingVar.binding));
} else if (var1SeenInThen && !var1SeenInElse && !var2SeenInThen && var2SeenInElse) {
- newStatus = FlowInfo.mergeNullStatus(thenFlowInfo.nullStatus(trackingVar.binding), elseFlowInfo.nullStatus(var2.binding));
+ newStatus = FlowInfo.mergeNullStatus(thenFlowInfo.nullStatus(trackingVar.binding), elseFlowInfo.nullStatus(var2.binding));
} else {
continue;
}
@@ -1442,7 +1442,7 @@ private boolean checkAppropriate(MethodBinding compileTimeDeclaration, MethodBin
return true;
if (MethodVerifier.doesMethodOverride(otherMethod, compileTimeDeclaration, this.environment())) {
problemReporter().illegalSuperCallBypassingOverride(location, compileTimeDeclaration, otherMethod.declaringClass);
- return false;
+ return false;
}
return true;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java
index d004bd72d..643964fda 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java
@@ -51,10 +51,10 @@ class BoundSet {
enableOptimizationForBug543480 = enableOptimizationForBug543480Property.equalsIgnoreCase("true"); //$NON-NLS-1$
}
}
-
+
static final BoundSet TRUE = new BoundSet(); // empty set of bounds
static final BoundSet FALSE = new BoundSet(); // pseudo bounds
-
+
/**
* For a given inference variable this structure holds all type bounds
* with a relation in { SUPERTYPE, SAME, SUBTYPE }.
@@ -131,7 +131,7 @@ class BoundSet {
if (!onlyProper || right.isProperType(true)) {
if (right instanceof ReferenceBinding) {
rights[i++] = right;
- nullHints |= right.tagBits & TagBits.AnnotationNullMASK;
+ nullHints |= right.tagBits & TagBits.AnnotationNullMASK;
} else {
if (simpleUpper != null)
return Binding.NO_TYPES; // shouldn't
@@ -237,7 +237,7 @@ class BoundSet {
return boundType;
}
}
- }
+ }
}
if (this.superBounds != null) {
Iterator<TypeBound> it = this.superBounds.iterator();
@@ -256,7 +256,7 @@ class BoundSet {
return boundType;
}
}
- }
+ }
}
return null;
}
@@ -330,10 +330,10 @@ class BoundSet {
}
// main storage of type bounds:
HashMap<InferenceVariable, ThreeSets> boundsPerVariable = new HashMap<>();
-
+
/**
* 18.1.3 bullet 4: G<α1, ..., αn> = capture(G<A1, ..., An>)
- * On both sides we only enter types with nonnull arguments.
+ * On both sides we only enter types with nonnull arguments.
*/
HashMap<ParameterizedTypeBinding,ParameterizedTypeBinding> captures = new HashMap<>();
/** 18.1.3 bullet 5: throws α */
@@ -343,9 +343,9 @@ class BoundSet {
private TypeBound [] unincorporatedBounds = new TypeBound [1024];
private int unincorporatedBoundsCount = 0;
private TypeBound [] mostRecentBounds = new TypeBound[4]; // for quick & dirty duplicate elimination.
-
+
public BoundSet() {}
-
+
// pre: typeParameters != null, variables[i].typeParameter == typeParameters[i]
public void addBoundsFromTypeParameters(InferenceContext18 context, TypeVariableBinding[] typeParameters, InferenceVariable[] variables) {
int length = typeParameters.length;
@@ -396,7 +396,7 @@ class BoundSet {
}
public void addBound(TypeBound bound, LookupEnvironment environment) {
-
+
if (bound.relation == ReductionResult.SUBTYPE && bound.right.id == TypeIds.T_JavaLangObject)
return;
if (bound.left == bound.right) //$IDENTITY-COMPARISON$
@@ -417,12 +417,12 @@ class BoundSet {
return;
}
}
-
+
this.mostRecentBounds[3] = this.mostRecentBounds[2];
this.mostRecentBounds[2] = this.mostRecentBounds[1];
this.mostRecentBounds[1] = this.mostRecentBounds[0];
this.mostRecentBounds[0] = bound;
-
+
InferenceVariable variable = bound.left.prototype();
ThreeSets three = this.boundsPerVariable.get(variable);
if (three == null)
@@ -459,13 +459,13 @@ class BoundSet {
}
return hasProperBound;
}
-
+
public void addBounds(BoundSet that, LookupEnvironment environment) {
if (that == null || environment == null)
return;
addBounds(that.flatten(), environment);
}
-
+
public boolean isInstantiated(InferenceVariable inferenceVariable) {
ThreeSets three = this.boundsPerVariable.get(inferenceVariable.prototype());
if (three != null)
@@ -477,7 +477,7 @@ class BoundSet {
ThreeSets three = this.boundsPerVariable.get(inferenceVariable.prototype());
if (three != null) {
TypeBinding instantiation = three.instantiation;
- if (environment != null && environment.globalOptions.isAnnotationBasedNullAnalysisEnabled
+ if (environment != null && environment.globalOptions.isAnnotationBasedNullAnalysisEnabled
&& instantiation != null && (instantiation.tagBits & TagBits.AnnotationNullMASK) == 0)
return three.combineAndUseNullHints(instantiation, inferenceVariable.nullHints, environment);
return instantiation;
@@ -493,22 +493,22 @@ class BoundSet {
}
return num;
}
-
- // Driver for the real workhorse - Implements generational incorporation a la generational garbage collector.
+
+ // Driver for the real workhorse - Implements generational incorporation a la generational garbage collector.
boolean incorporate(InferenceContext18 context) throws InferenceFailureException {
-
+
if (this.unincorporatedBoundsCount == 0 && this.captures.size() == 0)
return true;
-
+
do {
TypeBound [] freshBounds;
System.arraycopy(this.unincorporatedBounds, 0, freshBounds = new TypeBound[this.unincorporatedBoundsCount], 0, this.unincorporatedBoundsCount);
this.unincorporatedBoundsCount = 0;
-
+
// Pairwise bidirectional compare all bounds from previous generation with the fresh set.
if (!incorporate(context, this.incorporatedBounds, freshBounds))
return false;
- // Pairwise bidirectional compare all fresh bounds.
+ // Pairwise bidirectional compare all fresh bounds.
if (!incorporate(context, freshBounds, freshBounds))
return false;
@@ -519,17 +519,17 @@ class BoundSet {
System.arraycopy(this.incorporatedBounds, 0, aggregate, 0, incorporatedLength);
System.arraycopy(freshBounds, 0, aggregate, incorporatedLength, unincorporatedLength);
this.incorporatedBounds = aggregate;
-
+
} while (this.unincorporatedBoundsCount > 0);
-
+
return true;
}
/**
* <b>JLS 18.3:</b> Try to infer new constraints from pairs of existing type bounds.
* Each new constraint is first reduced and checked for TRUE or FALSE, which will
- * abort the processing.
+ * abort the processing.
* @param context the context that manages our inference variables
- * @return false if any constraint resolved to false, true otherwise
+ * @return false if any constraint resolved to false, true otherwise
* @throws InferenceFailureException a compile error has been detected during inference
*/
boolean incorporate(InferenceContext18 context, TypeBound [] first, TypeBound [] next) throws InferenceFailureException {
@@ -604,10 +604,10 @@ class BoundSet {
mostRecentFormulas[2] = mostRecentFormulas[1];
mostRecentFormulas[1] = mostRecentFormulas[0];
mostRecentFormulas[0] = newConstraint;
-
+
if (!reduceOneConstraint(context, newConstraint))
return false;
-
+
if (analyzeNull) {
// not per JLS: if the new constraint relates types where at least one has a null annotations,
// record all null tagBits as hints for the final inference solution.
@@ -638,7 +638,7 @@ class BoundSet {
}
}
/* TODO: are we sure this will always terminate? Cf. e.g. (Discussion in 18.3):
- *
+ *
* "The assertion that incorporation reaches a fixed point oversimplifies the matter slightly. ..."
*/
Iterator<Entry<ParameterizedTypeBinding, ParameterizedTypeBinding>> captIter = this.captures.entrySet().iterator();
@@ -685,7 +685,7 @@ class BoundSet {
bi1 = context.object; // implicit bound
}
// If Bi is Object, α <: R implies ⟨T <: R⟩ (extends wildcard)
- // α <: R implies ⟨θ Bi <: R⟩ (else)
+ // α <: R implies ⟨θ Bi <: R⟩ (else)
it = three.subBounds.iterator();
while (it.hasNext()) {
TypeBound bound = it.next();
@@ -708,7 +708,7 @@ class BoundSet {
}
if (three.superBounds != null) {
// R <: α implies ⟨R <: T⟩ (super wildcard)
- // R <: α implies false (else)
+ // R <: α implies false (else)
it = three.superBounds.iterator();
while (it.hasNext()) {
TypeBound bound = it.next();
@@ -746,7 +746,7 @@ class BoundSet {
}
private ConstraintTypeFormula combineSameSame(TypeBound boundS, TypeBound boundT, TypeBound[] firstBounds, TypeBound[] nextBounds) {
-
+
// α = S and α = T imply ⟨S = T⟩
if (TypeBinding.equalsEquals(boundS.left, boundT.left))
return ConstraintTypeFormula.create(boundS.right, boundT.right, ReductionResult.SAME, boundS.isSoft||boundT.isSoft);
@@ -763,7 +763,7 @@ class BoundSet {
}
// pre: boundLeft.left != boundRight.left
- private ConstraintTypeFormula combineSameSameWithProperType(TypeBound boundLeft, TypeBound boundRight,
+ private ConstraintTypeFormula combineSameSameWithProperType(TypeBound boundLeft, TypeBound boundRight,
TypeBound[] firstBounds, TypeBound[] nextBounds) {
// α = U and S = T imply ⟨S[α:=U] = T[α:=U]⟩
TypeBinding u = boundLeft.right;
@@ -781,9 +781,9 @@ class BoundSet {
}
return null;
}
-
+
private ConstraintTypeFormula combineSameSubSuper(TypeBound boundS, TypeBound boundT, TypeBound[] firstBounds, TypeBound[] nextBounds) {
- // α = S and α <: T imply ⟨S <: T⟩
+ // α = S and α <: T imply ⟨S <: T⟩
// α = S and T <: α imply ⟨T <: S⟩
InferenceVariable alpha = boundS.left;
TypeBinding s = boundS.right;
@@ -807,7 +807,7 @@ class BoundSet {
if (TypeBinding.equalsEquals(alpha, boundT.right)) {
TypeBinding t = boundT.left;
return ConstraintTypeFormula.create(t, s, boundT.relation, boundT.isSoft||boundS.isSoft);
- }
+ }
}
return combineSameSubSuperWithProperType(boundS, boundT, alpha, firstBounds, nextBounds);
}
@@ -818,7 +818,7 @@ class BoundSet {
InferenceVariable alpha, TypeBound[] firstBounds, TypeBound[] nextBounds) {
// α = U and S <: T imply ⟨S[α:=U] <: T[α:=U]⟩
TypeBinding u = boundLeft.right;
-
+
if (enableOptimizationForBug543480 && isParameterizedDependency(boundRight)) {
// Performance optimization: do not incorporate arguments one by one, which yielt 2^n new bounds (n=number of type arguments) in the past.
// Instead, all arguments of a parameterized dependency are incorporated at once - but only when they are available.
@@ -835,7 +835,7 @@ class BoundSet {
}
return null;
}
-
+
private ConstraintTypeFormula combineSuperAndSub(TypeBound boundS, TypeBound boundT) {
// permutations of: S <: α and α <: T imply ⟨S <: T⟩
InferenceVariable alpha = boundS.left;
@@ -851,14 +851,14 @@ class BoundSet {
}
return null;
}
-
+
private ConstraintTypeFormula combineEqualSupers(TypeBound boundS, TypeBound boundT) {
// more permutations of: S <: α and α <: T imply ⟨S <: T⟩
if (TypeBinding.equalsEquals(boundS.left, boundT.right))
- // came in as: α REL S and T REL α imply ⟨T REL S⟩
+ // came in as: α REL S and T REL α imply ⟨T REL S⟩
return ConstraintTypeFormula.create(boundT.left, boundS.right, boundS.relation, boundT.isSoft||boundS.isSoft);
if (TypeBinding.equalsEquals(boundS.right, boundT.left))
- // came in as: S REL α and α REL T imply ⟨S REL T⟩
+ // came in as: S REL α and α REL T imply ⟨S REL T⟩
return ConstraintTypeFormula.create(boundS.left, boundT.right, boundS.relation, boundT.isSoft||boundS.isSoft);
return null;
}
@@ -868,7 +868,7 @@ class BoundSet {
&& !typeBound.right.isProperType(true) /* is a dependency, not a type bound */
&& typeBound.right.isParameterizedTypeWithActualArguments();
}
-
+
private ConstraintTypeFormula incorporateIntoParameterizedDependencyIfAllArgumentsAreProperTypes(TypeBound typeBound,
TypeBound[] firstBounds, TypeBound[] nextBounds) {
Collection<TypeBound> properTypesForAllInferenceVariables = getProperTypesForAllInferenceVariablesOrNull((ParameterizedTypeBinding)typeBound.right, firstBounds, nextBounds);
@@ -877,8 +877,8 @@ class BoundSet {
}
return null;
}
-
- private Collection<TypeBound> getProperTypesForAllInferenceVariablesOrNull(ParameterizedTypeBinding parameterizedType,
+
+ private Collection<TypeBound> getProperTypesForAllInferenceVariablesOrNull(ParameterizedTypeBinding parameterizedType,
TypeBound[] firstBounds, TypeBound[] nextBounds) {
final Map<InferenceVariable,TypeBound> properTypesByInferenceVariable = properTypesByInferenceVariable(firstBounds, nextBounds);
if(properTypesByInferenceVariable.size() == 0) {
@@ -896,7 +896,7 @@ class BoundSet {
.filter(bound -> bound.relation == ReductionResult.SAME)
.filter(bound -> bound.right.isProperType(true))
.collect(toMap(bound -> bound.left, identity(),
- // If nextBounds and firstBounds have a bound for the IV, prefer the newer one from nextBounds.
+ // If nextBounds and firstBounds have a bound for the IV, prefer the newer one from nextBounds.
(boundFromNextBounds, boundFromFirstBounds) -> boundFromNextBounds));
}
@@ -918,7 +918,7 @@ class BoundSet {
}
return inferenceVariables;
}
-
+
private ConstraintTypeFormula combineWithProperTypes(Collection<TypeBound> properTypesForAllInferenceVariables, TypeBound boundRight) {
// either: α = U, β = V, ... and S = T imply ⟨S[α:=U, β:=V, ...] = T[α:=U, β:=V, ...]⟩
// or: α = U, β = V, ... and S <: T imply ⟨S[α:=U, β:=V, ...] <: T[α:=U, β:=V, ...]⟩
@@ -928,7 +928,7 @@ class BoundSet {
boolean isAnyLeftSoft = false;
InferenceVariable left = boundRight.left;
TypeBinding right = boundRight.right;
- for(final TypeBound properTypeForInferenceVariable: properTypesForAllInferenceVariables) {
+ for(final TypeBound properTypeForInferenceVariable: properTypesForAllInferenceVariables) {
final TypeBound boundLeft = properTypeForInferenceVariable;
final InferenceVariable alpha = boundLeft.left;
final TypeBinding u = boundLeft.right;
@@ -942,7 +942,7 @@ class BoundSet {
/* From 18.4:
* If two bounds have the form α <: S and α <: T, and if for some generic class or interface, G,
* there exists a supertype (4.10) of S of the form G<S1, ..., Sn> and a supertype of T of the form G<T1, ..., Tn>,
- * then for all i, 1 ≤ i ≤ n, if Si and Ti are types (not wildcards), the constraint ⟨Si = Ti⟩ is implied.
+ * then for all i, 1 ≤ i ≤ n, if Si and Ti are types (not wildcards), the constraint ⟨Si = Ti⟩ is implied.
*/
// callers must ensure both relations are <: and both lefts are equal
TypeBinding[] supers = superTypesWithCommonGenericType(boundS.right, boundT.right);
@@ -960,7 +960,7 @@ class BoundSet {
TypeBinding[] tis = t.typeArguments();
if (sis == null || tis == null || sis.length != tis.length)
return null;
- List<ConstraintTypeFormula> result = new ArrayList<>();
+ List<ConstraintTypeFormula> result = new ArrayList<>();
for (int i = 0; i < sis.length; i++) {
TypeBinding si = sis[i];
TypeBinding ti = tis[i];
@@ -1006,7 +1006,7 @@ class BoundSet {
/**
* Helper for resolution (18.4):
- * Does this bound set define a direct dependency between the two given inference variables?
+ * Does this bound set define a direct dependency between the two given inference variables?
*/
public boolean dependsOnResolutionOf(InferenceVariable alpha, InferenceVariable beta) {
alpha = alpha.prototype();
@@ -1025,7 +1025,7 @@ class BoundSet {
ParameterizedTypeBinding captured = entry.getValue();
if (captured.mentionsAny(new TypeBinding[]{beta}, -1/*don't care about index*/))
return true;
- if (g.mentionsAny(new TypeBinding[]{beta}, i)) // exclude itself
+ if (g.mentionsAny(new TypeBinding[]{beta}, i)) // exclude itself
return true;
} else if (TypeBinding.equalsEquals(g.arguments[i], beta)) {
betaIsInCaptureLhs = true;
@@ -1112,7 +1112,7 @@ class BoundSet {
/**
* JLS 18.1.3:
- * Answer all upper bounds for the given inference variable as defined by any bounds in this set.
+ * Answer all upper bounds for the given inference variable as defined by any bounds in this set.
*/
public TypeBinding[] upperBounds(InferenceVariable variable, boolean onlyProper) {
ThreeSets three = this.boundsPerVariable.get(variable.prototype());
@@ -1122,10 +1122,10 @@ class BoundSet {
// TODO: if !onlyProper: should we also consider ThreeSets.inverseBounds,
// or is it safe to rely on incorporation to produce the required bounds?
}
-
+
/**
* JLS 18.1.3:
- * Answer all lower bounds for the given inference variable as defined by any bounds in this set.
+ * Answer all lower bounds for the given inference variable as defined by any bounds in this set.
*/
TypeBinding[] lowerBounds(InferenceVariable variable, boolean onlyProper) {
ThreeSets three = this.boundsPerVariable.get(variable.prototype());
@@ -1163,7 +1163,7 @@ class BoundSet {
}
// this condition is just way too complex to check it in-line:
public boolean condition18_5_2_bullet_3_3_1(InferenceVariable alpha, TypeBinding targetType) {
- // T is a reference type, but is not a wildcard-parameterized type, and either
+ // T is a reference type, but is not a wildcard-parameterized type, and either
// i) B2 contains a bound of one of the forms α = S or S <: α, where S is a wildcard-parameterized type, or ...
if (targetType.isBaseType()) return false;
if (InferenceContext18.parameterizedWithWildcard(targetType) != null) return false;
@@ -1197,7 +1197,7 @@ class BoundSet {
TypeBinding s2 = superBounds.get(j).right;
TypeBinding[] supers = superTypesWithCommonGenericType(s1, s2);
if (supers != null) {
- /* HashMap<K#8,V#9> and HashMap<K#8,ArrayList<T>> with an instantiation for V9 = ArrayList<T> already in the
+ /* HashMap<K#8,V#9> and HashMap<K#8,ArrayList<T>> with an instantiation for V9 = ArrayList<T> already in the
bound set should not be seen as two different parameterizations of the same generic class or interface.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=432626 for a test that triggers this condition.
See https://bugs.openjdk.java.net/browse/JDK-8056092: recommendation is to check for proper types.
@@ -1247,7 +1247,7 @@ class BoundSet {
return s.isCompatibleWith(env.convertToRawType(g, false));
return false;
}
-
+
protected TypeBinding[] superTypesWithCommonGenericType(TypeBinding s, TypeBinding t) {
if (s == null || s.id == TypeIds.T_JavaLangObject || t == null || t.id == TypeIds.T_JavaLangObject)
return null;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java
index 91178434c..79c99526e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java
@@ -75,7 +75,7 @@ public class CaptureBinding extends TypeVariableBinding {
}
}
}
-
+
// for subclass CaptureBinding18
protected CaptureBinding(ReferenceBinding sourceType, char[] sourceName, int start, int end, int captureID, LookupEnvironment environment) {
super(sourceName, null, 0, environment);
@@ -97,7 +97,7 @@ public class CaptureBinding extends TypeVariableBinding {
this.tagBits |= (prototype.tagBits & TagBits.HasCapturedWildcard);
this.cud = prototype.cud;
}
-
+
// Captures may get cloned and annotated during type inference.
@Override
public TypeBinding clone(TypeBinding enclosingType) {
@@ -404,7 +404,7 @@ public class CaptureBinding extends TypeVariableBinding {
}
return super.readableName();
}
-
+
@Override
public char[] signableName() {
if (this.wildcard != null) {
@@ -436,7 +436,7 @@ public class CaptureBinding extends TypeVariableBinding {
}
return super.shortReadableName();
}
-
+
@Override
public char[] nullAnnotatedReadableName(CompilerOptions options, boolean shortNames) {
StringBuffer nameBuffer = new StringBuffer(10);
@@ -474,13 +474,13 @@ public class CaptureBinding extends TypeVariableBinding {
return this;
if (this.wildcard != null && this.wildcard.hasNullTypeAnnotations()) {
WildcardBinding newWildcard = (WildcardBinding) this.wildcard.withoutToplevelNullAnnotation();
- if (newWildcard != this.wildcard) { //$IDENTITY-COMPARISON$
-
+ if (newWildcard != this.wildcard) { //$IDENTITY-COMPARISON$
+
CaptureBinding newCapture = (CaptureBinding) this.environment.getUnannotatedType(this).clone(null);
if (newWildcard.hasTypeAnnotations())
newCapture.tagBits |= TagBits.HasTypeAnnotations;
newCapture.wildcard = newWildcard;
-
+
// manually transfer the following two, because we are not in a context where we can call initializeBounds():
newCapture.superclass = this.superclass;
newCapture.superInterfaces = this.superInterfaces;
@@ -524,7 +524,7 @@ public class CaptureBinding extends TypeVariableBinding {
this.pendingSubstitute = null;
}
}
-
+
@Override
public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
super.setTypeAnnotations(annotations, evalNullAnnotations);
@@ -606,12 +606,12 @@ public class CaptureBinding extends TypeVariableBinding {
TypeBinding wrappedBound = RoleTypeCreator.maybeWrapQualifiedRoleType(scope, anchorExpr, this.firstBound, typedNode);
if (TypeBinding.notEquals(wrappedBound, this.firstBound))
hasWrapped = true;
-
+
TypeBinding newSuper = RoleTypeCreator.maybeWrapQualifiedRoleType(scope, anchorExpr, this.superclass, typedNode);
if (TypeBinding.notEquals(newSuper, this.superclass))
hasWrapped = true;
-
- ReferenceBinding[] newSuperIfcs = new ReferenceBinding[this.superInterfaces.length];
+
+ ReferenceBinding[] newSuperIfcs = new ReferenceBinding[this.superInterfaces.length];
for (int i=0; i<this.superInterfaces.length; i++) {
newSuperIfcs[i] = (ReferenceBinding) RoleTypeCreator.maybeWrapQualifiedRoleType(scope, anchorExpr, this.superInterfaces[i], typedNode);
if (TypeBinding.notEquals(newSuperIfcs[i], this.superInterfaces[i]))
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding18.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding18.java
index 597111471..a48b86053 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding18.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding18.java
@@ -21,7 +21,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.ITeamAnchor;
* Capture-like type variable introduced during 1.8 type inference.
*/
public class CaptureBinding18 extends CaptureBinding {
-
+
TypeBinding[] upperBounds;
private char[] originalName;
private CaptureBinding18 prototype;
@@ -31,13 +31,13 @@ public class CaptureBinding18 extends CaptureBinding {
this.originalName = originalName;
this.prototype = this;
}
-
+
private CaptureBinding18(CaptureBinding18 prototype) {
super(prototype);
this.sourceName = CharOperation.append(prototype.sourceName, '\'');
this.originalName = prototype.originalName;
this.upperBounds = prototype.upperBounds;
- this.prototype = prototype.prototype;
+ this.prototype = prototype.prototype;
}
public boolean setUpperBounds(TypeBinding[] upperBounds, ReferenceBinding javaLangObject) {
@@ -142,7 +142,7 @@ public class CaptureBinding18 extends CaptureBinding {
return true;
if (this.inRecursiveFunction)
return true;
- this.inRecursiveFunction = true;
+ this.inRecursiveFunction = true;
try {
if (this.upperBounds != null) {
int length = this.upperBounds.length;
@@ -188,7 +188,7 @@ public class CaptureBinding18 extends CaptureBinding {
if (candidate != null)
return candidate;
// TODO: maybe we should double check about multiple candidates here,
- // but upper bounds should be consistent so hopefully the first non-null candidate is good enough.
+ // but upper bounds should be consistent so hopefully the first non-null candidate is good enough.
}
}
return super.findSuperTypeOriginatingFrom(otherType);
@@ -287,7 +287,7 @@ public class CaptureBinding18 extends CaptureBinding {
@Override
public boolean isProperType(boolean admitCapture18) {
- if (!admitCapture18)
+ if (!admitCapture18)
return false;
if (this.inRecursiveFunction)
return true;
@@ -362,7 +362,7 @@ public class CaptureBinding18 extends CaptureBinding {
}
return super.shortReadableName();
}
-
+
@Override
public TypeBinding uncapture(Scope scope) {
return this;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CatchParameterBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CatchParameterBinding.java
index 5df69c72a..25da77e4b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CatchParameterBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CatchParameterBinding.java
@@ -16,13 +16,13 @@ package org.eclipse.jdt.internal.compiler.lookup;
import org.eclipse.jdt.internal.compiler.ast.LocalDeclaration;
public class CatchParameterBinding extends LocalVariableBinding {
-
+
TypeBinding [] preciseTypes = Binding.NO_EXCEPTIONS; // the catch block can be entered with the parameters set to these types.
-
+
public CatchParameterBinding(LocalDeclaration declaration, TypeBinding type, int modifiers, boolean isArgument) {
super(declaration, type, modifiers, isArgument);
}
-
+
public TypeBinding [] getPreciseTypes() {
return this.preciseTypes;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
index 60e55bae2..d96a2a940 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
@@ -12,7 +12,7 @@
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
* Technical University Berlin - extended API and implementation
- * Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for
+ * Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for
* Bug 328281 - visibility leaks not detected when analyzing unused field in private class
* Bug 300576 - NPE Computing type hierarchy when compliance doesn't match libraries
* Bug 354536 - compiling package-info.java still depends on the order of compilation units
@@ -613,7 +613,7 @@ public class ClassScope extends Scope {
problemReporter().abstractMethodInConcreteClass(sourceType);
// :giro
}
-// SH}
+// SH}
}
if (sourceType.isRecord()) {
assert this.referenceContext instanceof RecordDeclaration;
@@ -632,7 +632,7 @@ public class ClassScope extends Scope {
}
FieldBinding[] fields = sourceType.unResolvedFields(); // https://bugs.eclipse.org/bugs/show_bug.cgi?id=301683
for (int i = 0; i < fields.length; i++) {
- fields[i].modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
+ fields[i].modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
}
}
if (isEnum && compilerOptions().isAnnotationBasedNullAnalysisEnabled) {
@@ -689,7 +689,7 @@ public class ClassScope extends Scope {
SourceTypeBinding sourceType = this.referenceContext.binding;
sourceType.module = module();
environment().setAccessRestriction(sourceType, accessRestriction);
-
+
TypeParameter[] typeParameters = this.referenceContext.typeParameters;
sourceType.typeVariables = typeParameters == null || typeParameters.length == 0 ? Binding.NO_TYPE_VARIABLES : null;
sourceType.fPackage.addType(sourceType);
@@ -728,7 +728,7 @@ public class ClassScope extends Scope {
// SH}
checkAndSetModifiers();
buildTypeVariables();
-
+
buildMemberTypes(accessRestriction);
//{ObjectTeams: setup cache for known role files:
if (this.referenceContext.isTeam())
@@ -1015,7 +1015,7 @@ public class ClassScope extends Scope {
switch (scope.kind) {
case METHOD_SCOPE :
MethodScope methodScope = (MethodScope) scope;
- if (methodScope.isLambdaScope())
+ if (methodScope.isLambdaScope())
methodScope = methodScope.namedMethodScope();
if (methodScope.isInsideInitializer()) {
SourceTypeBinding type = ((TypeDeclaration) methodScope.referenceContext).binding;
@@ -1204,19 +1204,19 @@ public class ClassScope extends Scope {
problemReporter().illegalModifierForRecord(sourceType);
}
// JLS 14 8.10 : It is a compile-time error if a record declaration has the modifier abstract.
-
+
/* Section 8.10 http://cr.openjdk.java.net/~gbierman/8222777/8222777-20190823/specs/records-jls.html#jls-8.10
* It is a compile-time error if a record declaration has the modifier abstract.
- *
+ *
* A record declaration is implicitly final. It is permitted for the declaration of a record type
* to redundantly specify the final modifier.
- *
+ *
* A nested record type is implicitly static. It is permitted for the declaration of a nested record
* type to redundantly specify the static modifier.
- *
+ *
* This implies that it is impossible to declare a record type in the body of an inner class (8.1.3),
* because an inner class cannot have static members except for constant variables.
- *
+ *
* It is a compile-time error if the same keyword appears more than once as a modifier for a record declaration,
* or if a record declaration has more than one of the access modifiers public, protected, and private (6.6).
*/
@@ -1347,7 +1347,7 @@ public class ClassScope extends Scope {
// set the modifiers
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=267670. Force all enumerators to be marked
// as used locally. We are unable to track the usage of these reliably as they could be used
- // in non obvious ways via the synthesized methods values() and valueOf(String) or by using
+ // in non obvious ways via the synthesized methods values() and valueOf(String) or by using
// Enum.valueOf(Class<T>, String).
final int IMPLICIT_MODIFIERS = ClassFileConstants.AccPublic | ClassFileConstants.AccStatic | ClassFileConstants.AccFinal | ClassFileConstants.AccEnum | ExtraCompilerModifiers.AccLocallyUsed;
fieldBinding.modifiers|= IMPLICIT_MODIFIERS;
@@ -1818,7 +1818,7 @@ public class ClassScope extends Scope {
}
try {
TypeReference baseclassRef = this.referenceContext.baseclass;
-
+
ReferenceBinding baseclass= findBaseclass(baseclassRef);
// detect cycle wrt. containment:
@@ -1882,11 +1882,11 @@ public class ClassScope extends Scope {
if (baseclass.isFinal())
problemReporter().decapsulationOfFinal(baseclassRef, baseclass);
- if (baseclass instanceof BinaryTypeBinding
+ if (baseclass instanceof BinaryTypeBinding
&& ((BinaryTypeBinding)baseclass).version >= ClassFileConstants.JDK1_8
&& compilerOptions().weavingScheme == WeavingScheme.OTRE) {
problemReporter().otreCannotWeaveIntoJava8(baseclassRef, baseclass, (int) (((BinaryTypeBinding)baseclass).version >> 16));
- }
+ }
if (/* !sourceType.isInterface() // FIXME(SH): ifc playedBy ifc is currently incompatible with add/removeRole infrastructure.
&& */baseclass.isInterface() && (baseclass.tagBits & TagBits.HasMissingType) == 0)
{
@@ -1996,7 +1996,7 @@ public class ClassScope extends Scope {
tsuperBase = tsuperBase.getRealType();
}
if ( !(TypeBinding.equalsEquals(baseclass, tsuperBase) || TSuperHelper.isTSubOf(baseclass, tsuperBase))
- || !TSuperHelper.isEquivalentField(baseAnchor, tsuperAnchor))
+ || !TSuperHelper.isEquivalentField(baseAnchor, tsuperAnchor))
{
problemReporter().overridesPlayedBy(ClassScope.this.referenceContext, tsuperBase);
}
@@ -2078,7 +2078,7 @@ public class ClassScope extends Scope {
} else {
// only want to reach here when no errors are reported
sourceType.superclass = superclass;
-
+
// team:
// if superclass is not o.o.Team add "implements org.objectteams.ITeam":
if (!superclass.isTeam()) {
@@ -2169,11 +2169,11 @@ public class ClassScope extends Scope {
sourceType.tagBits |= TagBits.HierarchyHasProblems;
continue nextInterface;
}
- if ( sourceType.isInterface()
- && TypeAnalyzer.isConfined(superInterface)
- && this.referenceContext.superclass == null)
+ if ( sourceType.isInterface()
+ && TypeAnalyzer.isConfined(superInterface)
+ && this.referenceContext.superclass == null)
{
- sourceType.superclass = null; // cancel premature superclass j.l.Object
+ sourceType.superclass = null; // cancel premature superclass j.l.Object
}
// SH}
@@ -2275,7 +2275,7 @@ public class ClassScope extends Scope {
//{ObjectTeams: top level source super-team must be fully loaded/connected:
ReferenceBinding superType= sourceType.superclass;
if ( superType != null
- && superType.isTeam())
+ && superType.isTeam())
{
ReferenceBinding superOriginal = (ReferenceBinding) superType.original();
if (!superOriginal.isBinaryBinding()) {
@@ -2378,7 +2378,7 @@ public class ClassScope extends Scope {
return detectHierarchyCycle(this.referenceContext.binding, (ReferenceBinding) superType, reference);
}
// Reinstate the code deleted by the fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=205235
- // For details, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=294057.
+ // For details, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=294057.
if ((superType.tagBits & TagBits.BeginHierarchyCheck) == 0 && superType instanceof SourceTypeBinding)
// ensure if this is a source superclass that it has already been checked
((SourceTypeBinding) superType).scope.connectTypeHierarchyWithoutMembers();
@@ -2419,7 +2419,7 @@ public class ClassScope extends Scope {
// force its superclass & superinterfaces to be found... 2 possibilities exist - the source type is included in the hierarchy of:
// - a binary type... this case MUST be caught & reported here
// - another source type... this case is reported against the other source type
- if (superType.problemId() != ProblemReasons.NotFound && (superType.tagBits & TagBits.HierarchyHasProblems) != 0) {
+ if (superType.problemId() != ProblemReasons.NotFound && (superType.tagBits & TagBits.HierarchyHasProblems) != 0) {
sourceType.tagBits |= TagBits.HierarchyHasProblems;
problemReporter().hierarchyHasProblems(sourceType);
return true;
@@ -2482,7 +2482,7 @@ public class ClassScope extends Scope {
if (ref != null && ref.resolvedType == null) {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=319885 Don't cry foul prematurely.
// Check the edges traversed to see if there really is a cycle.
- char [] referredName = ref.getLastToken();
+ char [] referredName = ref.getLastToken();
for (Iterator iter = environment().typesBeingConnected.iterator(); iter.hasNext();) {
SourceTypeBinding type = (SourceTypeBinding) iter.next();
if (CharOperation.equals(referredName, type.sourceName())) {
@@ -2666,7 +2666,7 @@ public class ClassScope extends Scope {
}
return this.parent.checkRedundantDefaultNullness(nullBits, sourceStart);
}
-
+
@Override
public String toString() {
if (this.referenceContext != null)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
index d1e42b2a2..3510a5dc2 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
@@ -89,9 +89,9 @@ public class CompilationUnitScope extends Scope {
HashtableOfType constantPoolNameUsage;
private int captureID = 1;
-
+
private ImportBinding[] tempImports; // to keep a record of resolved imports while traversing all in faultInImports()
-
+
/**
* Skips import caching if unresolved imports were
* found last time.
@@ -146,7 +146,7 @@ void buildFieldsAndMethods() {
//{ObjectTeams: extract from the above:
public void connectBaseclass() {
for (int i = 0, length = this.topLevelTypes.length; i < length; i++)
- this.topLevelTypes[i].scope.connectBaseclassRecurse();
+ this.topLevelTypes[i].scope.connectBaseclassRecurse();
}
// SH}
void buildTypeBindings(AccessRestriction accessRestriction) {
@@ -291,8 +291,8 @@ void buildTypeBindings(AccessRestriction accessRestriction) {
//{ObjectTeams: role files: (a) classes never match the name of the unit: prepended __OT__!
// (b) always check for matching file name (also protected), except for purely copied role files
boolean isRole = typeDecl.isRole() ;
- if ( (typeDecl.modifiers & ClassFileConstants.AccPublic) != 0
- || typeDecl.isRole()) // (b) check independently of publicness
+ if ( (typeDecl.modifiers & ClassFileConstants.AccPublic) != 0
+ || typeDecl.isRole()) // (b) check independently of publicness
{
char[] mainTypeName;
/* orig:
@@ -306,7 +306,7 @@ void buildTypeBindings(AccessRestriction accessRestriction) {
&& !(isRole && !typeDecl.isInterface()) // (a): ignore role classes
&& !typeDecl.isPurelyCopied) // (has no file)
{
- if (typeDecl.isRole()) // (b) : more specific message
+ if (typeDecl.isRole()) // (b) : more specific message
problemReporter().roleFileMismatchingName(this.referenceContext, typeDecl);
else
// SH}
@@ -769,7 +769,7 @@ void faultInImports() {
}
}
}
- // all the code here which checks for valid bindings have been moved to the method
+ // all the code here which checks for valid bindings have been moved to the method
// checkAndRecordImportBinding() since bug 361327
if(checkAndRecordImportBinding(importBinding, typesBySimpleNames, importReference, compoundName) == -1)
continue nextImport;
@@ -779,7 +779,7 @@ void faultInImports() {
// So if a type is found, no fields and methods are available anyway
// similarly when method is found, type may be available but no field available for sure
if (importBinding.kind() == Binding.FIELD) {
- checkMoreStaticBindings(compoundName, typesBySimpleNames, Binding.TYPE | Binding.METHOD, importReference);
+ checkMoreStaticBindings(compoundName, typesBySimpleNames, Binding.TYPE | Binding.METHOD, importReference);
} else if (importBinding.kind() == Binding.METHOD) {
checkMoreStaticBindings(compoundName, typesBySimpleNames, Binding.TYPE, importReference);
}
@@ -1269,7 +1269,7 @@ private void recordImportBinding(ImportBinding bindingToAdd) {
this.tempImports[this.importPtr++] = bindingToAdd;
}
/**
- * Checks additional bindings (methods or types) imported from a single static import.
+ * Checks additional bindings (methods or types) imported from a single static import.
* Method is tried first, followed by type. If found, records them.
* If in the process, import is flagged as duplicate, -1 is returned.
* @param compoundName
@@ -1278,8 +1278,8 @@ private void recordImportBinding(ImportBinding bindingToAdd) {
* @param importReference
*/
private void checkMoreStaticBindings(
- char[][] compoundName,
- HashtableOfType typesBySimpleNames,
+ char[][] compoundName,
+ HashtableOfType typesBySimpleNames,
int mask,
ImportReference importReference) {
Binding importBinding = findSingleStaticImport(compoundName, mask);
@@ -1312,8 +1312,8 @@ private void checkMoreStaticBindings(
* @return -1 when this import is flagged as duplicate, importPtr otherwise.
*/
private int checkAndRecordImportBinding(
- Binding importBinding,
- HashtableOfType typesBySimpleNames,
+ Binding importBinding,
+ HashtableOfType typesBySimpleNames,
ImportReference importReference,
char[][] compoundName) {
ReferenceBinding conflictingType = null;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExceptionFormula.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExceptionFormula.java
index 84394cda3..bd4d2231b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExceptionFormula.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExceptionFormula.java
@@ -35,13 +35,13 @@ import org.eclipse.jdt.internal.compiler.ast.ReferenceExpression;
public class ConstraintExceptionFormula extends ConstraintFormula {
FunctionalExpression left;
-
+
public ConstraintExceptionFormula(FunctionalExpression left, TypeBinding type) {
this.left = left;
this.right = type;
this.relation = EXCEPTIONS_CONTAINED;
}
-
+
@Override
public Object reduce(InferenceContext18 inferenceContext) {
// JLS 18.2.5
@@ -61,7 +61,7 @@ public class ConstraintExceptionFormula extends ConstraintFormula {
if (sam.returnType != TypeBinding.VOID && !sam.returnType.isProperType(true))
return FALSE;
} else { // reference expression
- if (!((ReferenceExpression)this.left).isExactMethodReference()) {
+ if (!((ReferenceExpression)this.left).isExactMethodReference()) {
int nParam = sam.parameters.length;
for (int i = 0; i < nParam; i++)
if (!sam.parameters[i].isProperType(true))
@@ -76,13 +76,13 @@ public class ConstraintExceptionFormula extends ConstraintFormula {
for (int i = 0; i < thrown.length; i++)
if (!thrown[i].isProperType(true))
e[n++] = (InferenceVariable) thrown[i]; // thrown[i] is not a proper type, since it's an exception it must be an inferenceVariable, right?
-
+
/* If throw specification does not encode any type parameters, there are no constraints to be gleaned/gathered from the throw sites.
See also that thrown exceptions are not allowed to influence compatibility and overload resolution.
*/
if (n == 0)
return TRUE;
-
+
TypeBinding[] ePrime = null;
if (this.left instanceof LambdaExpression) {
LambdaExpression lambda = ((LambdaExpression) this.left).resolveExpressionExpecting(this.right, inferenceContext.scope, inferenceContext);
@@ -108,7 +108,7 @@ public class ConstraintExceptionFormula extends ConstraintFormula {
continue actual;
for (int j = 0; j < n; j++)
result.add(ConstraintTypeFormula.create(ePrime[i], e[j], SUBTYPE));
- }
+ }
for (int j = 0; j < n; j++)
inferenceContext.currentBounds.inThrows.add(e[j].prototype());
return result.toArray(new ConstraintFormula[result.size()]);
@@ -131,7 +131,7 @@ public class ConstraintExceptionFormula extends ConstraintFormula {
for (int i = 0; i < len; i++) {
sam.parameters[i].collectInferenceVariables(variables);
}
- }
+ }
if (sam.returnType != TypeBinding.VOID) {
// ii)
sam.returnType.collectInferenceVariables(variables);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExpressionFormula.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExpressionFormula.java
index ccf6562ba..c8d11c76c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExpressionFormula.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintExpressionFormula.java
@@ -51,7 +51,7 @@ class ConstraintExpressionFormula extends ConstraintFormula {
this.right = type;
this.relation = relation;
}
-
+
ConstraintExpressionFormula(Expression expression, TypeBinding type, int relation, boolean isSoft) {
this(expression, type, relation);
this.isSoft = isSoft;
@@ -59,17 +59,17 @@ class ConstraintExpressionFormula extends ConstraintFormula {
@Override
public Object reduce(InferenceContext18 inferenceContext) throws InferenceFailureException {
-
+
if (this.relation == POTENTIALLY_COMPATIBLE) {
- /* 15.12.2.1: ... The definition of potential applicability goes beyond a basic arity check to also take into account the presence and "shape" of functional interface
- target types. In some cases involving type argument inference, a lambda expression appearing as a method invocation argument cannot be properly typed until after
- overload resolution. These rules allow the form of the lambda expression to still be taken into account, discarding obviously incorrect target types that might
+ /* 15.12.2.1: ... The definition of potential applicability goes beyond a basic arity check to also take into account the presence and "shape" of functional interface
+ target types. In some cases involving type argument inference, a lambda expression appearing as a method invocation argument cannot be properly typed until after
+ overload resolution. These rules allow the form of the lambda expression to still be taken into account, discarding obviously incorrect target types that might
otherwise cause ambiguity errors.
*/
-
+
return this.left.isPotentiallyCompatibleWith(this.right, inferenceContext.scope) ? TRUE: FALSE;
}
-
+
// JLS 18.2.1
if (this.right.isProperType(true)) {
if (this.left.isCompatibleWith(this.right, inferenceContext.scope) || this.left.isBoxingCompatibleWith(this.right, inferenceContext.scope)) {
@@ -98,7 +98,7 @@ class ConstraintExpressionFormula extends ConstraintFormula {
return null; // -> proceed with no new constraints
MethodBinding method = previousMethod;
// ignore previous (inner) inference result and do a fresh start:
- // avoid original(), since we only want to discard one level of instantiation
+ // avoid original(), since we only want to discard one level of instantiation
// (method type variables - not class type variables)!
method = previousMethod.shallowOriginal();
SuspendedInferenceRecord prevInvocation = inferenceContext.enterPolyInvocation(invocation, invocation.arguments());
@@ -113,7 +113,7 @@ class ConstraintExpressionFormula extends ConstraintFormula {
if (previousMethod instanceof ParameterizedGenericMethodBinding) {
// find the previous inner inference context to see what inference kind this invocation needs:
innerCtx = invocation.getInferenceContext((ParameterizedGenericMethodBinding) previousMethod);
- if (innerCtx == null) {
+ if (innerCtx == null) {
/* No inference context -> the method was likely manufactured by Scope.findExactMethod -> assume it wasn't really poly after all.
-> proceed as for non-poly expressions.
*/
@@ -161,7 +161,7 @@ class ConstraintExpressionFormula extends ConstraintFormula {
return TRUE; // assume inner inference will handle the fine print
if (!this.right.isFunctionalInterface(scope))
return FALSE;
-
+
ReferenceBinding t = (ReferenceBinding) this.right;
ParameterizedTypeBinding withWildCards = InferenceContext18.parameterizedWithWildcard(t);
if (withWildCards != null) {
@@ -240,7 +240,7 @@ class ConstraintExpressionFormula extends ConstraintFormula {
}
private boolean canBePolyExpression(Expression expr) {
- // when inferring compatibility against a right type, the check isPolyExpression
+ // when inferring compatibility against a right type, the check isPolyExpression
// must assume that expr occurs in s.t. like an assignment context:
ExpressionContext previousExpressionContext = expr.getExpressionContext();
if (previousExpressionContext == ExpressionContext.VANILLA_CONTEXT)
@@ -352,7 +352,7 @@ class ConstraintExpressionFormula extends ConstraintFormula {
} else {
compileTimeReturn = original.returnType;
}
- return (original.typeVariables() != Binding.NO_TYPE_VARIABLES
+ return (original.typeVariables() != Binding.NO_TYPE_VARIABLES
&& compileTimeReturn.mentionsAny(original.typeVariables(), -1));
}
@@ -397,8 +397,8 @@ class ConstraintExpressionFormula extends ConstraintFormula {
}
/** Perform steps from JLS 18.5.2. needed for computing the bound set B3. */
- static boolean inferPolyInvocationType(InferenceContext18 inferenceContext, InvocationSite invocationSite, TypeBinding targetType, MethodBinding method)
- throws InferenceFailureException
+ static boolean inferPolyInvocationType(InferenceContext18 inferenceContext, InvocationSite invocationSite, TypeBinding targetType, MethodBinding method)
+ throws InferenceFailureException
{
TypeBinding[] typeArguments = invocationSite.genericTypeArguments();
if (typeArguments == null) {
@@ -530,7 +530,7 @@ class ConstraintExpressionFormula extends ConstraintFormula {
sam.parameters[i].collectInferenceVariables(variables);
}
return variables;
- }
+ }
} else if (this.left instanceof ConditionalExpression && this.left.isPolyExpression()) {
ConditionalExpression expr = (ConditionalExpression) this.left;
Set<InferenceVariable> variables = new HashSet<>();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintFormula.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintFormula.java
index 898c3ece3..36bf8c30d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintFormula.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintFormula.java
@@ -38,7 +38,7 @@ abstract class ConstraintFormula extends ReductionResult {
Collection<InferenceVariable> inputVariables(InferenceContext18 context) {
return EMPTY_VARIABLE_LIST;
}
-
+
Collection<InferenceVariable> outputVariables(InferenceContext18 context) {
Set<InferenceVariable> variables = new HashSet<>();
this.right.collectInferenceVariables(variables);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java
index 720c6440d..13a2639a4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java
@@ -33,18 +33,18 @@ import org.eclipse.jdt.internal.compiler.ast.Wildcard;
class ConstraintTypeFormula extends ConstraintFormula {
TypeBinding left;
-
+
// this flag contributes to the workaround controlled by InferenceContext18.ARGUMENT_CONSTRAINTS_ARE_SOFT:
boolean isSoft;
public static ConstraintTypeFormula create(TypeBinding exprType, TypeBinding right, int relation) {
- if (exprType == null || right == null)
+ if (exprType == null || right == null)
return FALSE;
return new ConstraintTypeFormula(exprType, right, relation, false);
}
public static ConstraintTypeFormula create(TypeBinding exprType, TypeBinding right, int relation, boolean isSoft) {
- if (exprType == null || right == null)
+ if (exprType == null || right == null)
return FALSE;
return new ConstraintTypeFormula(exprType, right, relation, isSoft);
}
@@ -83,7 +83,7 @@ class ConstraintTypeFormula extends ConstraintFormula {
break;
//$FALL-THROUGH$ array of parameterized is handled below:
case Binding.PARAMETERIZED_TYPE:
- {
+ {
// this.right = G<T1,T2,...> or G<T1,T2,...>[]k
TypeBinding gs = this.left.findSuperTypeOriginatingFrom(this.right); // G<S1,S2,...> or G<S1,S2,...>[]k
if (gs != null && gs.leafComponentType().isRawType()) {
@@ -110,7 +110,7 @@ class ConstraintTypeFormula extends ConstraintFormula {
// 18.2.3:
if (this.right.kind() != Binding.WILDCARD_TYPE) { // "If T is a type" ... all alternatives require "wildcard"
if (this.left.kind() != Binding.WILDCARD_TYPE) {
- return ConstraintTypeFormula.create(this.left, this.right, SAME, this.isSoft);
+ return ConstraintTypeFormula.create(this.left, this.right, SAME, this.isSoft);
} else {
// TODO: speculative addition:
if (this.right instanceof InferenceVariable)
@@ -129,15 +129,15 @@ class ConstraintTypeFormula extends ConstraintFormula {
switch (s.boundKind) {
case Wildcard.UNBOUND:
return ConstraintTypeFormula.create(inferenceContext.object, t.bound, SUBTYPE, this.isSoft);
- case Wildcard.EXTENDS:
+ case Wildcard.EXTENDS:
return ConstraintTypeFormula.create(s.bound, t.bound, SUBTYPE, this.isSoft);
- case Wildcard.SUPER:
+ case Wildcard.SUPER:
return ConstraintTypeFormula.create(inferenceContext.object, t.bound, SAME, this.isSoft);
default:
throw new IllegalArgumentException("Unexpected boundKind "+s.boundKind); //$NON-NLS-1$
}
}
- } else { // SUPER
+ } else { // SUPER
if (this.left.kind() != Binding.WILDCARD_TYPE) {
return ConstraintTypeFormula.create(t.bound, this.left, SUBTYPE, this.isSoft);
} else {
@@ -181,7 +181,7 @@ class ConstraintTypeFormula extends ConstraintFormula {
||(leftWC.boundKind == Wildcard.SUPER && rightWC.boundKind == Wildcard.SUPER))
{
return ConstraintTypeFormula.create(leftWC.bound, rightWC.bound, SAME, this.isSoft);
- }
+ }
}
} else {
if (this.right.kind() != Binding.WILDCARD_TYPE) {
@@ -200,9 +200,9 @@ class ConstraintTypeFormula extends ConstraintFormula {
if (this.right instanceof InferenceVariable && !this.left.isPrimitiveType()) {
return new TypeBound((InferenceVariable) this.right, this.left, SAME, this.isSoft);
}
- if ((this.left.isClass() || this.left.isInterface())
+ if ((this.left.isClass() || this.left.isInterface())
&& (this.right.isClass() || this.right.isInterface())
- && TypeBinding.equalsEquals(this.left.erasure(), this.right.erasure()))
+ && TypeBinding.equalsEquals(this.left.erasure(), this.right.erasure()))
{
TypeBinding[] leftParams = this.left.typeArguments();
TypeBinding[] rightParams = this.right.typeArguments();
@@ -244,9 +244,9 @@ class ConstraintTypeFormula extends ConstraintFormula {
if (subCandidate.isSubtypeOf(superCandidate, InferenceContext18.SIMULATE_BUG_JDK_8026527))
return TRUE;
//{ObjectTeams: one more kind of "sub-typing":
- if (subCandidate instanceof ReferenceBinding && superCandidate instanceof ReferenceBinding
+ if (subCandidate instanceof ReferenceBinding && superCandidate instanceof ReferenceBinding
&& ((ReferenceBinding) subCandidate).isCompatibleViaLowering((ReferenceBinding) superCandidate))
- return TRUE;
+ return TRUE;
// SH}
return FALSE;
}
@@ -273,7 +273,7 @@ class ConstraintTypeFormula extends ConstraintFormula {
boolean isFirst = true;
while (superCandidate != null && superCandidate.kind() == Binding.PARAMETERIZED_TYPE && subCandidate != null) {
if (!addConstraintsFromTypeParameters(subCandidate, (ParameterizedTypeBinding) superCandidate, constraints))
- if (isFirst) return FALSE;
+ if (isFirst) return FALSE;
isFirst = false;
// travel to enclosing types to check if they have type parameters, too:
superCandidate = superCandidate.enclosingType();
@@ -305,7 +305,7 @@ class ConstraintTypeFormula extends ConstraintFormula {
sPrimeArray = findMostSpecificSuperArray(subTVB.firstBound, subTVB.otherUpperBounds(), subTVB);
break;
}
- default:
+ default:
return FALSE;
}
if (sPrimeArray == null)
@@ -365,7 +365,7 @@ class ConstraintTypeFormula extends ConstraintFormula {
}
throw new IllegalStateException("Unexpected RHS "+superCandidate); //$NON-NLS-1$
}
-
+
private ArrayBinding findMostSpecificSuperArray(TypeBinding firstBound, TypeBinding[] otherUpperBounds, TypeBinding theType) {
int numArrayBounds = 0;
ArrayBinding result = null;
@@ -390,7 +390,7 @@ class ConstraintTypeFormula extends ConstraintFormula {
boolean addConstraintsFromTypeParameters(TypeBinding subCandidate, ParameterizedTypeBinding ca, List<ConstraintFormula> constraints) {
TypeBinding cb = subCandidate.findSuperTypeOriginatingFrom(ca); // C<B1,B2,...>
if (cb == null)
- return false; // nothing here means we failed
+ return false; // nothing here means we failed
if (TypeBinding.equalsEquals(ca, cb)) // incl C#RAW vs C#RAW
return true;
if (!(cb instanceof ParameterizedTypeBinding)) {
@@ -402,17 +402,17 @@ class ConstraintTypeFormula extends ConstraintFormula {
if (ai == null)
return true; // no arguments here means nothing to check
if (cb.isRawType() || bi == null || bi.length == 0)
- return (this.isSoft && InferenceContext18.SIMULATE_BUG_JDK_8026527) ? true : false; // FALSE would conform to the spec
+ return (this.isSoft && InferenceContext18.SIMULATE_BUG_JDK_8026527) ? true : false; // FALSE would conform to the spec
for (int i = 0; i < ai.length; i++)
constraints.add(ConstraintTypeFormula.create(bi[i], ai[i], TYPE_ARGUMENT_CONTAINED, this.isSoft));
return true;
}
public boolean equalsEquals (ConstraintTypeFormula that) {
- return (that != null && this.relation == that.relation && this.isSoft == that.isSoft &&
+ return (that != null && this.relation == that.relation && this.isSoft == that.isSoft &&
TypeBinding.equalsEquals(this.left, that.left) && TypeBinding.equalsEquals(this.right, that.right));
}
-
+
@Override
public boolean applySubstitution(BoundSet solutionSet, InferenceVariable[] variables) {
super.applySubstitution(solutionSet, variables);
@@ -431,7 +431,7 @@ class ConstraintTypeFormula extends ConstraintFormula {
public String toString() {
StringBuffer buf = new StringBuffer("Type Constraint:\n"); //$NON-NLS-1$
buf.append('\t').append(LEFT_ANGLE_BRACKET);
- appendTypeName(buf, this.left);
+ appendTypeName(buf, this.left);
buf.append(relationToString(this.relation));
appendTypeName(buf, this.right);
buf.append(RIGHT_ANGLE_BRACKET);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ElementValuePair.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ElementValuePair.java
index dea720c46..ff19f339a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ElementValuePair.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ElementValuePair.java
@@ -23,7 +23,7 @@ public class ElementValuePair {
char[] name;
public Object value;
public MethodBinding binding;
-
+
/**
* We want to avoid eagerly resolving of all enums that are used in annotations.
* This class encapsulates an unresolved enum constant as referenced in an ElementValuePair.
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExternalAnnotationSuperimposer.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExternalAnnotationSuperimposer.java
index b1785aa24..f4dfe2034 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExternalAnnotationSuperimposer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExternalAnnotationSuperimposer.java
@@ -55,7 +55,7 @@ class ExternalAnnotationSuperimposer extends TypeBindingVisitor {
} catch (FileNotFoundException e) {
// file not found is expected
} catch (IOException e) {
- typeBinding.scope.problemReporter().abortDueToInternalError(Messages.bind(Messages.abort_externaAnnotationFile,
+ typeBinding.scope.problemReporter().abortDueToInternalError(Messages.bind(Messages.abort_externaAnnotationFile,
new String[] {String.valueOf(typeBinding.readableName()), externalAnnotationPath, e.getMessage()}));
} finally {
if (zipFile != null)
@@ -118,7 +118,7 @@ class ExternalAnnotationSuperimposer extends TypeBindingVisitor {
private TypeBinding typeReplacement;
private LookupEnvironment environment;
private boolean isReplacing;
-
+
ExternalAnnotationSuperimposer(LookupEnvironment environment) {
this.environment = environment;
}
@@ -157,13 +157,13 @@ class ExternalAnnotationSuperimposer extends TypeBindingVisitor {
return cl.cast(this.typeReplacement);
return type;
}
-
+
private TypeBinding goAndSuperimpose(ITypeAnnotationWalker walker, TypeBinding type) {
// no reset here
if (walker == ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER)
return type;
this.currentWalker = walker;
-
+
TypeBindingVisitor.visit(this, type);
if (this.typeReplacement == null)
@@ -173,7 +173,7 @@ class ExternalAnnotationSuperimposer extends TypeBindingVisitor {
this.typeReplacement = null;
return answer;
}
-
+
@Override
public boolean visit(ArrayBinding arrayBinding) {
ExternalAnnotationSuperimposer memento = snapshot();
@@ -229,7 +229,7 @@ class ExternalAnnotationSuperimposer extends TypeBindingVisitor {
return false;
} finally {
restore(memento);
- }
+ }
}
@Override
public boolean visit(RawTypeBinding rawTypeBinding) {
@@ -254,7 +254,7 @@ class ExternalAnnotationSuperimposer extends TypeBindingVisitor {
if (bound != null) {
bound = goAndSuperimpose(memento.currentWalker.toWildcardBound(), bound);
}
- IBinaryAnnotation[] binaryAnnotations = memento.currentWalker.getAnnotationsAtCursor(-1, false);
+ IBinaryAnnotation[] binaryAnnotations = memento.currentWalker.getAnnotationsAtCursor(-1, false);
if (this.isReplacing || binaryAnnotations != ITypeAnnotationWalker.NO_ANNOTATIONS) {
TypeBinding[] otherBounds = wildcardBinding.otherBounds;
if (binaryAnnotations != ITypeAnnotationWalker.NO_ANNOTATIONS) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExtraCompilerModifiers.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExtraCompilerModifiers.java
index 495b1c57b..0bb313475 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExtraCompilerModifiers.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExtraCompilerModifiers.java
@@ -53,7 +53,7 @@ public interface ExtraCompilerModifiers { // modifier constant
final int AccBlankFinal = ASTNode.Bit27; // for blank final variables
final int AccIsDefaultConstructor = ASTNode.Bit27; // for default constructor
final int AccLocallyUsed = ASTNode.Bit28; // used to diagnose unused (a) private/local members or (b) members of private classes
- // generally set when actual usage has been detected
+ // generally set when actual usage has been detected
// or, (b) when member of a private class is exposed via a non-private subclass
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=328281
final int AccVisibilityMASK = ClassFileConstants.AccPublic | ClassFileConstants.AccProtected | ClassFileConstants.AccPrivate;
@@ -69,7 +69,7 @@ public interface ExtraCompilerModifiers { // modifier constant
* also: AccDefaultMethod, for disambiguation avoid Flags.toString() in favor of Flags.typeFlagsToString()
*/
int AccRole = ASTNode.Bit17;
-
+
/**
* Encoding for the "team" class modifier.
*/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
index fece30cf0..e40381e20 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
@@ -349,7 +349,7 @@ public void fillInDefaultNonNullness(FieldDeclaration sourceField, Scope scope)
this.tagBits |= TagBits.AnnotationNonNull;
} else if ((this.tagBits & TagBits.AnnotationNonNull) != 0) {
scope.problemReporter().nullAnnotationIsRedundant(sourceField);
- }
+ }
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ImplicitNullAnnotationVerifier.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ImplicitNullAnnotationVerifier.java
index dfdd9b91b..0c38ddb38 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ImplicitNullAnnotationVerifier.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ImplicitNullAnnotationVerifier.java
@@ -105,15 +105,15 @@ public class ImplicitNullAnnotationVerifier {
// compatibility & inheritance do not consider constructors / static methods:
boolean isInstanceMethod = !currentMethod.isConstructor() && !currentMethod.isStatic();
complain &= isInstanceMethod;
- if (!needToApplyNonNullDefault
- && !complain
+ if (!needToApplyNonNullDefault
+ && !complain
&& !(this.inheritNullAnnotations && isInstanceMethod)) {
return; // short cut, no work to be done
}
if (isInstanceMethod) {
List superMethodList = new ArrayList();
-
+
// need super types connected:
if (currentType instanceof SourceTypeBinding && !currentType.isHierarchyConnected() && !currentType.isAnonymousType()) {
((SourceTypeBinding) currentType).scope.connectTypeHierarchy();
@@ -122,8 +122,8 @@ public class ImplicitNullAnnotationVerifier {
int paramLen = currentMethod.parameters.length;
findAllOverriddenMethods(currentMethod.original(), currentMethod.selector, paramLen,
currentType, new HashSet(), superMethodList);
-
- // prepare interim storage for nullness info so we don't pollute currentMethod before we know its conflict-free:
+
+ // prepare interim storage for nullness info so we don't pollute currentMethod before we know its conflict-free:
InheritedNonNullnessInfo[] inheritedNonNullnessInfos = new InheritedNonNullnessInfo[paramLen+1]; // index 0 is for the return type
for (int i=0; i<paramLen+1; i++) inheritedNonNullnessInfos[i] = new InheritedNonNullnessInfo();
@@ -137,7 +137,7 @@ public class ImplicitNullAnnotationVerifier {
checkNullSpecInheritance(currentMethod, srcMethod, needToApplyReturnNonNullDefault, needToApplyParameterNonNullDefault, complain, currentSuper, null, scope, inheritedNonNullnessInfos);
needToApplyNonNullDefault = false;
}
-
+
// transfer collected information into currentMethod:
InheritedNonNullnessInfo info = inheritedNonNullnessInfos[0];
if (!info.complained) {
@@ -176,17 +176,17 @@ public class ImplicitNullAnnotationVerifier {
else
currentMethod.fillInDefaultNonNullness18(srcMethod, scope.environment());
}
- } finally {
+ } finally {
currentMethod.tagBits |= TagBits.IsNullnessKnown;
}
}
- /*
+ /*
* Recursively traverse the tree of ancestors but whenever we find a matching method prune the super tree.
* Collect all matching methods in 'result'.
*/
- private void findAllOverriddenMethods(MethodBinding original, char[] selector, int suggestedParameterLength,
- ReferenceBinding currentType, Set ifcsSeen, List result)
+ private void findAllOverriddenMethods(MethodBinding original, char[] selector, int suggestedParameterLength,
+ ReferenceBinding currentType, Set ifcsSeen, List result)
{
if (currentType.id == TypeIds.T_JavaLangObject)
return;
@@ -214,7 +214,7 @@ public class ImplicitNullAnnotationVerifier {
/* collect matching methods from one supertype. */
private void collectOverriddenMethods(MethodBinding original, char[] selector, int suggestedParameterLength,
- ReferenceBinding superType, Set ifcsSeen, List result)
+ ReferenceBinding superType, Set ifcsSeen, List result)
{
MethodBinding [] ifcMethods = superType.unResolvedMethods();
int length = ifcMethods.length;
@@ -242,7 +242,7 @@ public class ImplicitNullAnnotationVerifier {
* @param srcMethod AST of 'currentMethod' if present
* @param hasReturnNonNullDefault is a @NonNull default applicable for the return type of currentMethod?
* @param hasParameterNonNullDefault is a @NonNull default applicable for parameters of currentMethod?
- * @param shouldComplain should we report any errors found?
+ * @param shouldComplain should we report any errors found?
* (see also comment about flows into this method, below).
* @param inheritedMethod one overridden method from a super type
* @param allInheritedMethods look here to see if nonnull-unannotated conflict already exists in one super type
@@ -251,9 +251,9 @@ public class ImplicitNullAnnotationVerifier {
* interim recording of nullness information from inheritedMethod rather than prematurely updating currentMethod.
* Index position 0 is used for the return type, positions i+1 for argument i.
*/
- void checkNullSpecInheritance(MethodBinding currentMethod, AbstractMethodDeclaration srcMethod,
+ void checkNullSpecInheritance(MethodBinding currentMethod, AbstractMethodDeclaration srcMethod,
boolean hasReturnNonNullDefault, ParameterNonNullDefaultProvider hasParameterNonNullDefault, boolean shouldComplain,
- MethodBinding inheritedMethod, MethodBinding[] allInheritedMethods, Scope scope, InheritedNonNullnessInfo[] inheritedNonNullnessInfos)
+ MethodBinding inheritedMethod, MethodBinding[] allInheritedMethods, Scope scope, InheritedNonNullnessInfo[] inheritedNonNullnessInfos)
{
if(currentMethod.declaringClass.id == TypeIds.T_JavaLangObject) {
// all method implementations in java.lang.Object return non-null results and accept nullable as parameter.
@@ -276,7 +276,7 @@ public class ImplicitNullAnnotationVerifier {
boolean useTypeAnnotations = this.environment.usesNullTypeAnnotations();
long inheritedNullnessBits = getReturnTypeNullnessTagBits(inheritedMethod, useTypeAnnotations);
long currentNullnessBits = getReturnTypeNullnessTagBits(currentMethod, useTypeAnnotations);
-
+
boolean shouldInherit = this.inheritNullAnnotations;
// return type:
@@ -294,12 +294,12 @@ public class ImplicitNullAnnotationVerifier {
// still use the inherited bits to avoid incompatibility
}
if (inheritedNonNullnessInfos != null && srcMethod != null) {
- recordDeferredInheritedNullness(scope, ((MethodDeclaration) srcMethod).returnType,
+ recordDeferredInheritedNullness(scope, ((MethodDeclaration) srcMethod).returnType,
inheritedMethod, Boolean.valueOf(inheritedNullnessBits == TagBits.AnnotationNonNull), inheritedNonNullnessInfos[0]);
} else {
// no need to defer, record this info now:
applyReturnNullBits(currentMethod, inheritedNullnessBits);
- }
+ }
break returnType; // compatible by construction, skip complain phase below
}
}
@@ -366,7 +366,7 @@ public class ImplicitNullAnnotationVerifier {
for (int i = 0; i < length; i++) {
if (currentMethod.parameters[i].isBaseType()) continue;
- Argument currentArgument = currentArguments == null
+ Argument currentArgument = currentArguments == null
? null : currentArguments[i];
Boolean inheritedNonNullNess = getParameterNonNullness(inheritedMethod, i, useTypeAnnotations);
Boolean currentNonNullNess = getParameterNonNullness(currentMethod, i, useTypeAnnotations);
@@ -416,7 +416,7 @@ public class ImplicitNullAnnotationVerifier {
annotationName = this.environment.getNullableAnnotationName();
}
if (inheritedNonNullNess != Boolean.TRUE // super parameter is not restricted to @NonNull
- && currentNonNullNess == Boolean.TRUE) // current parameter is restricted to @NonNull
+ && currentNonNullNess == Boolean.TRUE) // current parameter is restricted to @NonNull
{
// incompatible
if (currentArgument != null) {
@@ -428,10 +428,10 @@ public class ImplicitNullAnnotationVerifier {
scope.problemReporter().cannotImplementIncompatibleNullness(scope.referenceContext(), currentMethod, inheritedMethod, false);
}
continue;
- } else if (currentNonNullNess == null)
+ } else if (currentNonNullNess == null)
{
// unannotated strictly conflicts only with inherited @Nullable
- if (inheritedNonNullNess == Boolean.FALSE) {
+ if (inheritedNonNullNess == Boolean.FALSE) {
if (currentArgument != null) {
scope.problemReporter().parameterLackingNullableAnnotation(
currentArgument,
@@ -453,12 +453,12 @@ public class ImplicitNullAnnotationVerifier {
scope.problemReporter().parameterLackingNonnullAnnotation(currentArgument, inheritedMethod.declaringClass, annotationName);
} else {
TypeDeclaration type = scope.classScope().referenceContext;
- ASTNode location = type.superclass != null ? type.superclass : type;
+ ASTNode location = type.superclass != null ? type.superclass : type;
scope.problemReporter().inheritedParameterLackingNonnullAnnotation(currentMethod, i+1, inheritedMethod.declaringClass, location, annotationName);
}
continue;
}
- }
+ }
if (useTypeAnnotations) {
TypeBinding inheritedParameter = inheritedMethod.parameters[i];
TypeBinding substituteParameter = substituteParameters != null ? substituteParameters[i] : null;
@@ -520,12 +520,12 @@ public class ImplicitNullAnnotationVerifier {
/* check for conflicting annotations and record here the info 'inheritedNonNullness' found in 'inheritedMethod'. */
protected void recordDeferredInheritedNullness(Scope scope, ASTNode location,
- MethodBinding inheritedMethod, Boolean inheritedNonNullness,
- InheritedNonNullnessInfo nullnessInfo)
+ MethodBinding inheritedMethod, Boolean inheritedNonNullness,
+ InheritedNonNullnessInfo nullnessInfo)
{
if (nullnessInfo.inheritedNonNullness != null && nullnessInfo.inheritedNonNullness != inheritedNonNullness) {
- scope.problemReporter().conflictingInheritedNullAnnotations(location,
- nullnessInfo.inheritedNonNullness.booleanValue(), nullnessInfo.annotationOrigin,
+ scope.problemReporter().conflictingInheritedNullAnnotations(location,
+ nullnessInfo.inheritedNonNullness.booleanValue(), nullnessInfo.annotationOrigin,
inheritedNonNullness.booleanValue(), inheritedMethod);
nullnessInfo.complained = true;
// leave previous info intact, so subsequent errors are reported against the same first method
@@ -554,7 +554,7 @@ public class ImplicitNullAnnotationVerifier {
}
// ==== minimal set of utility methods previously from MethodVerifier15: ====
-
+
//{ObjectTeams: added 3. argument:
static boolean areParametersEqual(MethodBinding one, MethodBinding two, LookupEnvironment environment) {
// SH}
@@ -571,7 +571,7 @@ public class ImplicitNullAnnotationVerifier {
int length = oneArgs.length;
if (length != twoArgs.length) return false;
-
+
// methods with raw parameters are considered equal to inherited methods
// with parameterized parameters for backwards compatibility, need a more complex check
int i;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java
index 8ae0a05c3..05f223526 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java
@@ -42,7 +42,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.ITeamAnchor;
/**
* Main class for new type inference as per JLS8 sect 18.
* Keeps contextual state and drives the algorithm.
- *
+ *
* <h2>Inference Basics</h2>
* <ul>
* <li>18.1.1 Inference variables: {@link InferenceVariable}</li>
@@ -112,14 +112,14 @@ public class InferenceContext18 {
/** to conform with javac regarding https://bugs.openjdk.java.net/browse/JDK-8026527 */
static final boolean SIMULATE_BUG_JDK_8026527 = true;
-
- /** Temporary workaround until we know fully what to do with https://bugs.openjdk.java.net/browse/JDK-8054721
+
+ /** Temporary workaround until we know fully what to do with https://bugs.openjdk.java.net/browse/JDK-8054721
* It looks likely that we have a bug independent of this JLS bug in that we clear the capture bounds eagerly.
*/
static final boolean SHOULD_WORKAROUND_BUG_JDK_8054721 = true; // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=437444#c24 onwards
-
+
static final boolean SHOULD_WORKAROUND_BUG_JDK_8153748 = true; // emulating javac behaviour after private email communication
-
+
/**
* Detail flag to control the extent of {@link #SIMULATE_BUG_JDK_8026527}.
* A setting of 'false' implements the advice from http://mail.openjdk.java.net/pipermail/lambda-spec-experts/2013-December/000447.html
@@ -134,7 +134,7 @@ public class InferenceContext18 {
InvocationSite currentInvocation;
/** arguments of #currentInvocation, if any */
Expression[] invocationArguments;
-
+
/** The inference variables for which as solution is sought. */
InferenceVariable[] inferenceVariables;
@@ -156,7 +156,7 @@ public class InferenceContext18 {
/** Invocation Type Inference (18.5.2) has been completed (for some target type). */
public static final int TYPE_INFERRED = 2;
public static final int TYPE_INFERRED_FINAL = 3; // as above plus asserting that target type was a proper type
-
+
/** Signals whether any type compatibility makes use of unchecked conversion. */
public List<ConstraintFormula> constraintsWithUncheckedConversion;
public boolean usesUncheckedConversion;
@@ -168,12 +168,12 @@ public class InferenceContext18 {
public BoundSet b2;
private BoundSet b3;
/** Not per JLS: inbox for emulation of how javac passes type bounds from inner to outer */
- private BoundSet innerInbox;
+ private BoundSet innerInbox;
/** Not per JLS: signal when current is ready to directly merge all bounds from inner. */
private boolean directlyAcceptingInnerBounds = false;
/** Not per JLS: pushing bounds from inner to outer may have to be deferred till after overload resolution, store here a runnable to perform the push. */
private Runnable pushToOuterJob = null;
-
+
public static boolean isSameSite(InvocationSite site1, InvocationSite site2) {
if (site1 == site2)
return true;
@@ -188,7 +188,7 @@ public class InferenceContext18 {
public static final int CHECK_STRICT = 1;
public static final int CHECK_LOOSE = 2;
public static final int CHECK_VARARG = 3;
-
+
static class SuspendedInferenceRecord {
InvocationSite site;
Expression[] invocationArguments;
@@ -203,7 +203,7 @@ public class InferenceContext18 {
this.usesUncheckedConversion = usesUncheckedConversion;
}
}
-
+
/** Construct an inference context for an invocation (method/constructor). */
public InferenceContext18(Scope scope, Expression[] arguments, InvocationSite site, InferenceContext18 outerContext) {
this.scope = scope;
@@ -227,7 +227,7 @@ public class InferenceContext18 {
* @return the set of inference variables created for the given typeParameters
*/
public InferenceVariable[] createInitialBoundSet(TypeVariableBinding[] typeParameters) {
- //
+ //
if (this.currentBounds == null) {
this.currentBounds = new BoundSet();
}
@@ -240,7 +240,7 @@ public class InferenceContext18 {
}
/**
- * Substitute any type variables mentioned in 'type' by the corresponding inference variable, if one exists.
+ * Substitute any type variables mentioned in 'type' by the corresponding inference variable, if one exists.
*/
public TypeBinding substitute(TypeBinding type) {
InferenceSubstitution inferenceSubstitution = new InferenceSubstitution(this);
@@ -369,7 +369,7 @@ public class InferenceContext18 {
break;
}
}
- }
+ }
}
/** JLS 18.5.1 Invocation Applicability Inference. */
@@ -378,8 +378,8 @@ public class InferenceContext18 {
}
/** Perform steps from JLS 18.5.2. needed for computing the bound set B3. */
- boolean computeB3(InvocationSite invocationSite, TypeBinding targetType, MethodBinding method)
- throws InferenceFailureException
+ boolean computeB3(InvocationSite invocationSite, TypeBinding targetType, MethodBinding method)
+ throws InferenceFailureException
{
boolean result = ConstraintExpressionFormula.inferPolyInvocationType(this, invocationSite, targetType, method);
if (result) {
@@ -390,16 +390,16 @@ public class InferenceContext18 {
return result;
}
- /** JLS 18.5.2 Invocation Type Inference
+ /** JLS 18.5.2 Invocation Type Inference
*/
- public BoundSet inferInvocationType(TypeBinding expectedType, InvocationSite invocationSite, MethodBinding method) throws InferenceFailureException
+ public BoundSet inferInvocationType(TypeBinding expectedType, InvocationSite invocationSite, MethodBinding method) throws InferenceFailureException
{
// not JLS: simply ensure that null hints from the return type have been seen even in standalone contexts:
if (expectedType == null && method.returnType != null)
substitute(method.returnType); // result is ignore, the only effect is on InferenceVariable.nullHints
-
+
this.currentBounds = this.b2.copy();
-
+
int step = (expectedType == null || expectedType.isProperType(true)) ? TYPE_INFERRED_FINAL : TYPE_INFERRED;
try {
@@ -407,7 +407,7 @@ public class InferenceContext18 {
if (expectedType != null
&& expectedType != TypeBinding.VOID
&& invocationSite instanceof Expression && ((Expression) invocationSite).isTrulyExpression()
- && ((Expression)invocationSite).isPolyExpression(method))
+ && ((Expression)invocationSite).isPolyExpression(method))
{
// 3. bullet: special treatment for poly expressions
if (!computeB3(invocationSite, expectedType, method)) {
@@ -458,7 +458,7 @@ public class InferenceContext18 {
// don't bother with finding the necessary superset, just resolve all:
if (solution == null)
solution = resolve(this.inferenceVariables);
- // * ~ apply substitutions to all constraints:
+ // * ~ apply substitutions to all constraints:
bottomIt = bottomSet.iterator();
while (bottomIt.hasNext()) {
ConstraintFormula constraint = bottomIt.next();
@@ -553,7 +553,7 @@ public class InferenceContext18 {
TypeBinding parameter = getParameter(method.parameters, i, method.isVarargs());
if (parameter == null)
return ReductionResult.FALSE;
- parameter = substitution.substitute(substitution, parameter);
+ parameter = substitution.substitute(substitution, parameter);
ReductionResult result = addJDK_8153748ConstraintsFromExpression(argument, parameter, method, substitution);
if (result == ReductionResult.FALSE)
return ReductionResult.FALSE;
@@ -610,7 +610,7 @@ public class InferenceContext18 {
}
return null;
}
-
+
InferenceSubstitution enrichSubstitution(InferenceSubstitution substitution, Invocation innerInvocation, MethodBinding innerMethod) {
if (innerMethod instanceof ParameterizedGenericMethodBinding) {
InferenceContext18 innerContext = innerInvocation.getInferenceContext((ParameterizedMethodBinding) innerMethod);
@@ -699,7 +699,7 @@ public class InferenceContext18 {
MethodBinding innerMethod = invocation.binding();
if (innerMethod == null)
return true; // -> proceed with no new C set elements.
-
+
Expression[] arguments = invocation.arguments();
TypeBinding[] argumentTypes = arguments == null ? Binding.NO_PARAMETERS : new TypeBinding[arguments.length];
for (int i = 0; i < argumentTypes.length; i++)
@@ -707,7 +707,7 @@ public class InferenceContext18 {
InferenceContext18 innerContext = null;
if (innerMethod instanceof ParameterizedGenericMethodBinding)
innerContext = invocation.getInferenceContext((ParameterizedGenericMethodBinding) innerMethod);
-
+
if (innerContext != null) {
MethodBinding shallowMethod = innerMethod.shallowOriginal();
innerContext.outerContext = this;
@@ -739,7 +739,7 @@ public class InferenceContext18 {
return true;
}
-
+
protected int getInferenceKind(MethodBinding nonGenericMethod, TypeBinding[] argumentTypes) {
switch (this.scope.parameterCompatibilityLevel(nonGenericMethod, argumentTypes)) {
case Scope.AUTOBOX_COMPATIBLE:
@@ -754,8 +754,8 @@ public class InferenceContext18 {
/**
* 18.5.3 Functional Interface Parameterization Inference
*/
- public ReferenceBinding inferFunctionalInterfaceParameterization(LambdaExpression lambda, BlockScope blockScope,
- ParameterizedTypeBinding targetTypeWithWildCards)
+ public ReferenceBinding inferFunctionalInterfaceParameterization(LambdaExpression lambda, BlockScope blockScope,
+ ParameterizedTypeBinding targetTypeWithWildCards)
{
TypeBinding[] q = createBoundsForFunctionalInterfaceParameterizationInference(targetTypeWithWildCards);
if (q == null || q.length != lambda.arguments().length) {
@@ -782,7 +782,7 @@ public class InferenceContext18 {
/**
* Create initial bound set for 18.5.3 Functional Interface Parameterization Inference
* @param functionalInterface the functional interface F<A1,..Am>
- * @return the parameter types Q1..Qk of the function type of the type F<α1, ..., αm>, or null
+ * @return the parameter types Q1..Qk of the function type of the type F<α1, ..., αm>, or null
*/
TypeBinding[] createBoundsForFunctionalInterfaceParameterizationInference(ParameterizedTypeBinding functionalInterface) {
if (this.currentBounds == null)
@@ -871,7 +871,7 @@ public class InferenceContext18 {
return false;
}
}
-
+
// FALSE: inference fails
// TRUE: constraints have been incorporated
// null: need to create the si <: ti constraint
@@ -895,13 +895,13 @@ public class InferenceContext18 {
for (int i = 0; i < elements.length; i++)
if (!siSuperI(elements[i], funcI))
break checkSuper;
- return null; // bullet 4
+ return null; // bullet 4
// each element of the intersection is a superinterface of I, or a parameterization of a superinterface of I.
}
for (int i = 0; i < elements.length; i++)
if (siSubI(elements[i], funcI))
return null; // bullet 5
- // some element of the intersection is a subinterface of I, or a parameterization of a subinterface of I.
+ // some element of the intersection is a subinterface of I, or a parameterization of a subinterface of I.
}
// all passed, time to do some work:
TypeBinding siCapture = si.capture(this.scope, expri.sourceStart, expri.sourceEnd);
@@ -916,7 +916,7 @@ public class InferenceContext18 {
return null;
}
- private boolean checkExpression(Expression expri, TypeBinding[] u, TypeBinding r1, TypeBinding[] v, TypeBinding r2)
+ private boolean checkExpression(Expression expri, TypeBinding[] u, TypeBinding r1, TypeBinding[] v, TypeBinding r2)
throws InferenceFailureException {
if (expri instanceof LambdaExpression && !((LambdaExpression)expri).argumentsTypeElided()) {
for (int i = 0; i < u.length; i++) {
@@ -955,7 +955,7 @@ public class InferenceContext18 {
break checkPrimitive2;
}
return true;
- }
+ }
}
return reduceAndIncorporate(ConstraintTypeFormula.create(r1, r2, ReductionResult.SUBTYPE));
} else if (expri instanceof ReferenceExpression && ((ReferenceExpression)expri).isExactMethodReference()) {
@@ -968,7 +968,7 @@ public class InferenceContext18 {
return true;
MethodBinding method = reference.getExactMethod();
TypeBinding returnType = method.isConstructor() ? method.declaringClass : method.returnType;
- if (r1.isPrimitiveType() && !r2.isPrimitiveType() && returnType.isPrimitiveType())
+ if (r1.isPrimitiveType() && !r2.isPrimitiveType() && returnType.isPrimitiveType())
return true;
if (r2.isPrimitiveType() && !r1.isPrimitiveType() && !returnType.isPrimitiveType())
return true;
@@ -1029,14 +1029,14 @@ public class InferenceContext18 {
this.b2 = this.currentBounds.copy(); // Preserve the result after reduction, without effects of resolve() for later use in invocation type inference.
BoundSet solution = resolve(this.inferenceVariables);
-
+
/* If inferring applicability make a final pass over the initial constraints preserved as final constraints to make sure they hold true at a macroscopic level.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=426537#c55 onwards.
*/
if (inferringApplicability && solution != null && this.finalConstraints != null) {
for (ConstraintExpressionFormula constraint: this.finalConstraints) {
if (constraint.left.isPolyExpression())
- continue; // avoid redundant re-inference, inner poly's own constraints get validated in its own context & poly invocation type inference proved compatibility against target.
+ continue; // avoid redundant re-inference, inner poly's own constraints get validated in its own context & poly invocation type inference proved compatibility against target.
constraint.applySubstitution(solution, this.inferenceVariables);
if (!this.currentBounds.reduceOneConstraint(this, constraint)) {
return null;
@@ -1045,11 +1045,11 @@ public class InferenceContext18 {
}
return solution;
}
-
+
public /*@Nullable*/ BoundSet solve() throws InferenceFailureException {
return solve(false);
}
-
+
public /*@Nullable*/ BoundSet solve(InferenceVariable[] toResolve) throws InferenceFailureException {
if (!reduce())
return null;
@@ -1060,8 +1060,8 @@ public class InferenceContext18 {
}
/**
- * JLS 18.2. reduce all initial constraints
- * @throws InferenceFailureException
+ * JLS 18.2. reduce all initial constraints
+ * @throws InferenceFailureException
*/
private boolean reduce() throws InferenceFailureException {
// Caution: This can be reentered recursively even as an earlier call is munching through the constraints !
@@ -1128,11 +1128,11 @@ public class InferenceContext18 {
/**
* <b>JLS 18.4</b> Resolution
* @return answer null if some constraint resolved to FALSE, otherwise the boundset representing the solution
- * @throws InferenceFailureException
+ * @throws InferenceFailureException
*/
private /*@Nullable*/ BoundSet resolve(InferenceVariable[] toResolve) throws InferenceFailureException {
this.captureId = 0;
- // NOTE: 18.5.2 ...
+ // NOTE: 18.5.2 ...
// "(While it was necessary to demonstrate that the inference variables in B1 could be resolved
// in order to establish applicability, the resulting instantiations are not considered part of B1.)
// For this reason, resolve works on a temporary bound set, copied before any modification.
@@ -1181,7 +1181,7 @@ public class InferenceContext18 {
if (glb == null) {
// inconsistent intersection
tmpBoundSet = prevBoundSet; // clean up
- break variables; // and start over
+ break variables; // and start over
}
}
}
@@ -1202,7 +1202,7 @@ public class InferenceContext18 {
final BoundSet kurrentBoundSet = tmpBoundSet;
Substitution theta = new Substitution() {
@Override
- public LookupEnvironment environment() {
+ public LookupEnvironment environment() {
return InferenceContext18.this.environment;
}
@Override
@@ -1281,7 +1281,7 @@ public class InferenceContext18 {
}
return tmpBoundSet;
}
-
+
private TypeBinding intersectionFromGlb(TypeBinding[] glbs) {
ReferenceBinding[] refGlbs = new ReferenceBinding[glbs.length];
for (int i = 0; i < glbs.length; i++) {
@@ -1297,9 +1297,9 @@ public class InferenceContext18 {
return intersection;
return null;
}
-
+
int captureId = 0;
-
+
/** For 18.4: "Let Z1, ..., Zn be fresh type variables" use capture bindings. */
private CaptureBinding18 freshCapture(InferenceVariable variable) {
int id = this.captureId++;
@@ -1310,7 +1310,7 @@ public class InferenceContext18 {
start, end, id, this.environment);
}
// === ===
-
+
private boolean setUpperBounds(CaptureBinding18 typeVariable, TypeBinding[] substitutedUpperBounds) {
// 18.4: ... define the upper bound of Zi as glb(L1θ, ..., Lkθ)
if (substitutedUpperBounds.length == 1) {
@@ -1337,7 +1337,7 @@ public class InferenceContext18 {
Arrays.sort(types, new Comparator<TypeBinding>() {
@Override
public int compare(TypeBinding o1, TypeBinding o2) {
- int i1 = o1.id, i2 = o2.id;
+ int i1 = o1.id, i2 = o2.id;
return (i1<i2 ? -1 : (i1==i2 ? 0 : 1));
}
});
@@ -1349,7 +1349,7 @@ public class InferenceContext18 {
*/
private Set<InferenceVariable> getSmallestVariableSet(BoundSet bounds, InferenceVariable[] subSet) {
// "Given a set of inference variables to resolve, let V be the union of this set and
- // all variables upon which the resolution of at least one variable in this set depends."
+ // all variables upon which the resolution of at least one variable in this set depends."
Set<InferenceVariable> v = new HashSet<InferenceVariable>();
Map<InferenceVariable,Set<InferenceVariable>> dependencies = new HashMap<>(); // compute only once, store for the final loop over 'v'.
for (InferenceVariable iv : subSet) {
@@ -1408,7 +1408,7 @@ public class InferenceContext18 {
// causing non-termination of the algorithm.
// Since that is not acceptable, I'm *interpreting* the spec to request a search for a constraint
// that "best matches" the given conditions.
-
+
// collect all constraints participating in a cycle
HashMap<ConstraintFormula,Set<ConstraintFormula>> dependencies = new HashMap<ConstraintFormula, Set<ConstraintFormula>>();
Set<ConstraintFormula> cycles = new HashSet<ConstraintFormula>();
@@ -1447,7 +1447,7 @@ public class InferenceContext18 {
}
if (candidatesII.isEmpty())
candidatesII = c; // not spec'ed but needed to avoid returning null below, witness: java.util.stream.Collectors
-
+
// tentatively: (iii) has the form ⟨Expression → T⟩
Set<ConstraintFormula> candidatesIII = new HashSet<ConstraintFormula>();
for (ConstraintFormula candidate : candidatesII) {
@@ -1459,7 +1459,7 @@ public class InferenceContext18 {
} else { // candidatesIII contains all relevant constraints ⟨Expression → T⟩
// (iv) contains an expression that appears to the left of the expression
// of every other constraint satisfying the previous three requirements
-
+
// collect containment info regarding all expressions in candidate constraints:
// (a) find minimal enclosing expressions:
Map<ConstraintExpressionFormula,ConstraintExpressionFormula> expressionContainedBy = new HashMap<ConstraintExpressionFormula, ConstraintExpressionFormula>();
@@ -1486,7 +1486,7 @@ public class InferenceContext18 {
containmentForest.put(parent, children = new HashSet<ConstraintExpressionFormula>());
children.add(parentRelation.getKey());
}
-
+
// approximate the spec by searching the largest containment tree:
int bestRank = -1;
ConstraintExpressionFormula candidate = null;
@@ -1500,7 +1500,7 @@ public class InferenceContext18 {
if (candidate != null)
return candidate;
}
-
+
if (candidatesIII.isEmpty())
throw new IllegalStateException("cannot pick constraint from cyclic set"); //$NON-NLS-1$
return candidatesIII.iterator().next();
@@ -1552,7 +1552,7 @@ public class InferenceContext18 {
}
/** non-roots answer -1, roots answer the size of the spanned tree */
- private int rankNode(ConstraintExpressionFormula parent,
+ private int rankNode(ConstraintExpressionFormula parent,
Map<ConstraintExpressionFormula,ConstraintExpressionFormula> expressionContainedBy,
Map<ConstraintExpressionFormula, Set<ConstraintExpressionFormula>> containmentForest)
{
@@ -1570,7 +1570,7 @@ public class InferenceContext18 {
return sum;
}
- private Set<ConstraintFormula> findBottomSet(Set<ConstraintFormula> constraints,
+ private Set<ConstraintFormula> findBottomSet(Set<ConstraintFormula> constraints,
Set<InferenceVariable> allOutputVariables, List<Set<InferenceVariable>> components)
{
// 18.5.2 bullet 5.(1)
@@ -1621,7 +1621,7 @@ public class InferenceContext18 {
types[i] = last;
return types;
}
-
+
public SuspendedInferenceRecord enterPolyInvocation(InvocationSite invocation, Expression[] innerArguments) {
SuspendedInferenceRecord record = new SuspendedInferenceRecord(this.currentInvocation, this.invocationArguments, this.inferenceVariables, this.inferenceKind, this.usesUncheckedConversion);
this.inferenceVariables = null;
@@ -1630,7 +1630,7 @@ public class InferenceContext18 {
this.usesUncheckedConversion = false;
return record;
}
-
+
public SuspendedInferenceRecord enterLambda(LambdaExpression lambda) {
SuspendedInferenceRecord record = new SuspendedInferenceRecord(this.currentInvocation, this.invocationArguments, this.inferenceVariables, this.inferenceKind, this.usesUncheckedConversion);
this.inferenceVariables = null;
@@ -1665,7 +1665,7 @@ public class InferenceContext18 {
System.arraycopy(this.inferenceVariables, 0, this.inferenceVariables=new InferenceVariable[l1+l2], l2, l1);
System.arraycopy(record.inferenceVariables, 0, this.inferenceVariables, 0, l2);
}
-
+
// replace invocation site & arguments:
this.currentInvocation = record.site;
this.invocationArguments = record.invocationArguments;
@@ -1682,11 +1682,11 @@ public class InferenceContext18 {
}
return this.seenInnerContexts.add(innerContext);
}
-
+
private Substitution getResultSubstitution(final BoundSet result) {
return new Substitution() {
@Override
- public LookupEnvironment environment() {
+ public LookupEnvironment environment() {
return InferenceContext18.this.environment;
}
@Override
@@ -1723,7 +1723,7 @@ public class InferenceContext18 {
public static TypeBinding getParameter(TypeBinding[] parameters, int rank, boolean isVarArgs) {
if (isVarArgs) {
if (rank >= parameters.length-1)
- return ((ArrayBinding)parameters[parameters.length-1]).elementsType();
+ return ((ArrayBinding)parameters[parameters.length-1]).elementsType();
} else if (rank >= parameters.length) {
return null;
}
@@ -1745,7 +1745,7 @@ public class InferenceContext18 {
}
/* We used to check if expected type is null and if so return method, but that is wrong - it injects an incompatible method into overload resolution.
if we get here with expected type set to null at all, the target context does not define a target type (vanilla context), so inference has done its
- best and nothing more to do than to signal error.
+ best and nothing more to do than to signal error.
*/
ProblemMethodBinding problemMethod = new ProblemMethodBinding(method, method.selector, method.parameters, ProblemReasons.InvocationTypeInferenceFailure);
problemMethod.returnType = expectedType != null ? expectedType : method.returnType;
@@ -1831,7 +1831,7 @@ public class InferenceContext18 {
this.constraintsWithUncheckedConversion.add(constraint);
this.usesUncheckedConversion = true;
}
-
+
void reportUncheckedConversions(BoundSet solution) {
if (this.constraintsWithUncheckedConversion != null) {
int len = this.constraintsWithUncheckedConversion.size();
@@ -1855,7 +1855,7 @@ public class InferenceContext18 {
}
}
}
-
+
/** For use by 15.12.2.6 Method Invocation Type */
public boolean usesUncheckedConversion() {
return this.constraintsWithUncheckedConversion != null;
@@ -1884,7 +1884,7 @@ public class InferenceContext18 {
if (binding instanceof ParameterizedGenericMethodBinding) {
MethodBinding shallowOriginal = binding.shallowOriginal();
TypeBinding[] solutions = getSolutions(shallowOriginal.typeVariables(), polyInvocation, result);
- if (solutions == null) // in CEF.reduce, we lift inner poly expressions into outer context only if their target type has inference variables.
+ if (solutions == null) // in CEF.reduce, we lift inner poly expressions into outer context only if their target type has inference variables.
continue;
methodSubstitute = this.environment.createParameterizedGenericMethod(shallowOriginal, solutions);
} else {
@@ -1893,7 +1893,7 @@ public class InferenceContext18 {
MethodBinding shallowOriginal = binding.shallowOriginal();
ReferenceBinding genericType = shallowOriginal.declaringClass;
TypeBinding[] solutions = getSolutions(genericType.typeVariables(), polyInvocation, result);
- if (solutions == null) // in CEF.reduce, we lift inner poly expressions into outer context only if their target type has inference variables.
+ if (solutions == null) // in CEF.reduce, we lift inner poly expressions into outer context only if their target type has inference variables.
continue;
ParameterizedTypeBinding parameterizedType = this.environment.createParameterizedType(genericType, solutions, binding.declaringClass.enclosingType());
for (MethodBinding parameterizedMethod : parameterizedType.methods()) {
@@ -1914,7 +1914,7 @@ public class InferenceContext18 {
}
}
TypeBinding parameterType = InferenceContext18.getParameter(parameters, i, variableArity);
- forwardResults(result, polyInvocation, methodSubstitute, parameterType);
+ forwardResults(result, polyInvocation, methodSubstitute, parameterType);
}
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceFailureException.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceFailureException.java
index a017f1aea..188270228 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceFailureException.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceFailureException.java
@@ -21,9 +21,9 @@ public class InferenceFailureException extends Exception {
private static final long serialVersionUID = 1L;
// TODO(stephan); add more details so that ProblemReported can eventually manufacture an appropriate message
-
+
public InferenceFailureException(String message) {
super(message);
}
-
+
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceSubstitution.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceSubstitution.java
index dbf2ff903..3408ea312 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceSubstitution.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceSubstitution.java
@@ -57,7 +57,7 @@ public class InferenceSubstitution extends Scope.Substitutor implements Substitu
return false;
}
};
-
+
int l1 = this.sites.length;
subst.sites = new InvocationSite[l1+1];
System.arraycopy(this.sites, 0, subst.sites, 0, l1);
@@ -76,7 +76,7 @@ public class InferenceSubstitution extends Scope.Substitutor implements Substitu
}
/**
- * Override method {@link Scope.Substitutor#substitute(Substitution, TypeBinding)},
+ * Override method {@link Scope.Substitutor#substitute(Substitution, TypeBinding)},
* to add substitution of types other than type variables.
*/
@Override
@@ -129,7 +129,7 @@ public class InferenceSubstitution extends Scope.Substitutor implements Substitu
continue;
}
if (superInterfaces != null) {
- int ifcLen = superInterfaces.length;
+ int ifcLen = superInterfaces.length;
for (int j = 0; j < ifcLen; j++) {
if (TypeBinding.equalsEquals(pi, superInterfaces[j])) {
if (superInterfaces == typeVariable.superInterfaces)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceVariable.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceVariable.java
index dc7585669..3557117a0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceVariable.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceVariable.java
@@ -22,7 +22,7 @@ import org.eclipse.jdt.core.compiler.CharOperation;
* Implementation of 18.1.1 in JLS8
*/
public class InferenceVariable extends TypeVariableBinding {
-
+
/** Structured key for interning. */
static class InferenceVarKey {
/*@NonNull*/ TypeBinding typeParameter;
@@ -58,7 +58,7 @@ public class InferenceVariable extends TypeVariableBinding {
if (TypeBinding.notEquals(this.typeParameter, other.typeParameter))
return false;
return true;
- }
+ }
}
/**
@@ -88,9 +88,9 @@ public class InferenceVariable extends TypeVariableBinding {
long nullHints; // one of TagBits.{AnnotationNonNull,AnnotationNullable} may steer inference into inferring nullness as well; set both bits to request avoidance.
private InferenceVariable prototype;
int varId; // this is used for constructing a source name like T#0.
- public boolean isFromInitialSubstitution; // further ivars created during 18.5.2 (for capture bounds) set this to false
+ public boolean isFromInitialSubstitution; // further ivars created during 18.5.2 (for capture bounds) set this to false
// to mark that they don't participate in any theta substitution
-
+
private InferenceVariable(TypeBinding typeParameter, int parameterRank, int iVarId, InvocationSite site, LookupEnvironment environment, ReferenceBinding object, boolean initial) {
this(typeParameter, parameterRank, site, makeName(typeParameter, iVarId), environment, object);
this.varId = iVarId;
@@ -204,17 +204,17 @@ public class InferenceVariable extends TypeVariableBinding {
public boolean hasTypeBit(int bit) {
throw new UnsupportedOperationException();
}
-
+
@Override
public String debugName() {
return String.valueOf(this.sourceName);
}
-
+
@Override
public String toString() {
return debugName();
}
-
+
@Override
public int hashCode() {
int code = this.typeParameter.hashCode() + 17 * this.rank;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IntersectionTypeBinding18.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IntersectionTypeBinding18.java
index 944631baf..6a308121c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IntersectionTypeBinding18.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IntersectionTypeBinding18.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Stephan Herrmann - Contribution for
@@ -42,7 +42,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
public ReferenceBinding [] intersectingTypes;
private ReferenceBinding javaLangObject;
int length;
-
+
public IntersectionTypeBinding18(ReferenceBinding[] intersectingTypes, LookupEnvironment environment) {
this.intersectingTypes = intersectingTypes;
this.length = intersectingTypes.length;
@@ -51,7 +51,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
this.modifiers |= ClassFileConstants.AccInterface;
}
}
-
+
private IntersectionTypeBinding18(IntersectionTypeBinding18 prototype) {
this.intersectingTypes = prototype.intersectingTypes;
this.length = prototype.length;
@@ -60,7 +60,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
this.modifiers |= ClassFileConstants.AccInterface;
}
}
-
+
@Override
public TypeBinding clone(TypeBinding enclosingType) {
return new IntersectionTypeBinding18(this);
@@ -87,7 +87,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
@Override
public boolean hasTypeBit(int bit) { // Stephan ??
- for (int i = 0; i < this.length; i++) {
+ for (int i = 0; i < this.length; i++) {
if (this.intersectingTypes[i].hasTypeBit(bit))
return true;
}
@@ -98,7 +98,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
public boolean canBeInstantiated() {
return false;
}
-
+
@Override
public boolean canBeSeenBy(PackageBinding invocationPackage) {
for (int i = 0; i < this.length; i++) {
@@ -107,7 +107,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
}
return true;
}
-
+
@Override
public boolean canBeSeenBy(Scope scope) {
for (int i = 0; i < this.length; i++) {
@@ -116,7 +116,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
}
return true;
}
-
+
@Override
public boolean canBeSeenBy(ReferenceBinding receiverType, ReferenceBinding invocationType) {
for (int i = 0; i < this.length; i++) {
@@ -125,8 +125,8 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
}
return true;
}
-
-
+
+
@Override
public char[] constantPoolName() {
TypeBinding erasure = erasure();
@@ -141,7 +141,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
public PackageBinding getPackage() {
throw new UnsupportedOperationException(); // cannot be referred to
}
-
+
@Override
public ReferenceBinding[] getIntersectingTypes() {
return this.intersectingTypes;
@@ -149,9 +149,9 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
@Override
public ReferenceBinding superclass() {
- return this.intersectingTypes[0].isClass() ? this.intersectingTypes[0] : this.javaLangObject;
+ return this.intersectingTypes[0].isClass() ? this.intersectingTypes[0] : this.javaLangObject;
}
-
+
@Override
public ReferenceBinding [] superInterfaces() {
if (this.intersectingTypes[0].isClass()) {
@@ -161,12 +161,12 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
}
return this.intersectingTypes;
}
-
+
@Override
public boolean isBoxedPrimitiveType() {
return this.intersectingTypes[0].isBoxedPrimitiveType();
}
-
+
/* Answer true if the receiver type can be assigned to the argument type (right)
*/
@Override
@@ -199,13 +199,13 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
}
// normal case:
- for (int i = 0; i < this.length; i++) {
+ for (int i = 0; i < this.length; i++) {
if (this.intersectingTypes[i].isCompatibleWith(right, scope))
return true;
}
return false;
}
-
+
@Override
public boolean isSubtypeOf(TypeBinding other, boolean simulatingBugJDK8026527) {
if (TypeBinding.equalsEquals(this, other))
@@ -259,7 +259,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
@Override
public char[] qualifiedSourceName() {
StringBuffer qualifiedSourceName = new StringBuffer(16);
- for (int i = 0; i < this.length; i++) {
+ for (int i = 0; i < this.length; i++) {
qualifiedSourceName.append(this.intersectingTypes[i].qualifiedSourceName());
if (i != this.length - 1)
qualifiedSourceName.append(" & "); //$NON-NLS-1$
@@ -270,7 +270,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
@Override
public char[] sourceName() {
StringBuffer srcName = new StringBuffer(16);
- for (int i = 0; i < this.length; i++) {
+ for (int i = 0; i < this.length; i++) {
srcName.append(this.intersectingTypes[i].sourceName());
if (i != this.length - 1)
srcName.append(" & "); //$NON-NLS-1$
@@ -281,7 +281,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
@Override
public char[] readableName() {
StringBuffer readableName = new StringBuffer(16);
- for (int i = 0; i < this.length; i++) {
+ for (int i = 0; i < this.length; i++) {
readableName.append(this.intersectingTypes[i].readableName());
if (i != this.length - 1)
readableName.append(" & "); //$NON-NLS-1$
@@ -291,7 +291,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
@Override
public char[] shortReadableName() {
StringBuffer shortReadableName = new StringBuffer(16);
- for (int i = 0; i < this.length; i++) {
+ for (int i = 0; i < this.length; i++) {
shortReadableName.append(this.intersectingTypes[i].shortReadableName());
if (i != this.length - 1)
shortReadableName.append(" & "); //$NON-NLS-1$
@@ -309,7 +309,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
@Override
public String debugName() {
StringBuffer debugName = new StringBuffer(16);
- for (int i = 0; i < this.length; i++) {
+ for (int i = 0; i < this.length; i++) {
debugName.append(this.intersectingTypes[i].debugName());
if (i != this.length - 1)
debugName.append(" & "); //$NON-NLS-1$
@@ -342,7 +342,7 @@ public class IntersectionTypeBinding18 extends ReferenceBinding {
for (int i = 0; i < this.intersectingTypes.length; i++)
this.intersectingTypes[i].collectInferenceVariables(variables);
}
-
+
@Override
public ReferenceBinding upwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) {
ReferenceBinding[] projectedTypes = new ReferenceBinding[this.intersectingTypes.length];
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InvocationSite.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InvocationSite.java
index aa57e1214..afb5f22e0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InvocationSite.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InvocationSite.java
@@ -40,11 +40,11 @@ public interface InvocationSite {
boolean receiverIsImplicitThis();
boolean checkingPotentialCompatibility();
void acceptPotentiallyCompatibleMethods(MethodBinding [] methods);
-
+
/** When inference for this invocationSite starts, get a fresh inference context, initialized from this site. */
InferenceContext18 freshInferenceContext(Scope scope);
ExpressionContext getExpressionContext();
-
+
static class EmptyWithAstNode implements InvocationSite {
ASTNode node;
public EmptyWithAstNode(ASTNode node) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java
index 576c10921..0adc94106 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java
@@ -16,7 +16,7 @@
* bug 365662 - [compiler][null] warn on contradictory and redundant null annotations
* bug 401030 - [1.8][null] Null analysis support for lambda methods.
* Bug 429958 - [1.8][null] evaluate new DefaultLocation attribute of @NonNullByDefault
- * Bug 435805 - [1.8][compiler][null] Java 8 compiler does not recognize declaration style null annotations
+ * Bug 435805 - [1.8][compiler][null] Java 8 compiler does not recognize declaration style null annotations
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.lookup;
@@ -123,7 +123,7 @@ public ReferenceBinding anonymousOriginalSuperType() {
return ((LocalTypeBinding) this.prototype).anonymousOriginalSuperType();
if (this.superclass == null && this.scope != null)
return this.scope.getJavaLangObject();
-
+
if (this.superInterfaces != Binding.NO_SUPERINTERFACES) {
return this.superInterfaces[0];
}
@@ -143,7 +143,7 @@ public ReferenceBinding anonymousOriginalSuperType() {
public char[] computeUniqueKey(boolean isLeaf) {
if (!isPrototype())
return this.prototype.computeUniqueKey(isLeaf);
-
+
char[] outerKey = outermostEnclosingType().computeUniqueKey(isLeaf);
int semicolon = CharOperation.lastIndexOf(';', outerKey);
@@ -180,7 +180,7 @@ public char[] constantPoolName() /* java/lang/Object */ {
// cases where the left hand does not know what the right is doing.
this.constantPoolName = this.scope.compilationUnitScope().computeConstantPoolName(this);
}
- return this.constantPoolName;
+ return this.constantPoolName;
}
@Override
@@ -201,10 +201,10 @@ public int hashCode() {
*/
@Override
public char[] genericTypeSignature() {
-
+
if (!isPrototype())
return this.prototype.genericTypeSignature();
-
+
if (this.genericReferenceTypeSignature == null && this.constantPoolName == null) {
if (isAnonymousType())
setConstantPoolName(superclass().sourceName());
@@ -313,10 +313,10 @@ public void transferConstantPoolNameTo(TypeBinding substType) {
*/
@Override
public char[] signature() {
-
+
if (!isPrototype())
return this.prototype.signature();
-
+
if (this.signature == null && this.constantPoolName == null) {
if (isAnonymousType())
setConstantPoolName(superclass().sourceName());
@@ -338,7 +338,7 @@ public char[] sourceName() {
public String toString() {
if (this.hasTypeAnnotations())
return annotatedDebugName() + " (local)"; //$NON-NLS-1$
-
+
if (isAnonymousType())
return "Anonymous type : " + super.toString(); //$NON-NLS-1$
if (isMemberType())
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java
index e0b548c6c..12230d2cb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
@@ -84,7 +84,7 @@ public class LocalVariableBinding extends VariableBinding {
this(declaration.name, type, modifiers, isArgument);
this.declaration = declaration;
}
-
+
// argument
public LocalVariableBinding(LocalDeclaration declaration, TypeBinding type, int modifiers, MethodScope declaringScope) {
@@ -333,7 +333,7 @@ public class LocalVariableBinding extends VariableBinding {
public boolean isParameter() {
return ((this.tagBits & TagBits.IsArgument) != 0);
}
-
+
public boolean isCatchParameter() {
return false;
}
@@ -351,7 +351,7 @@ public class LocalVariableBinding extends VariableBinding {
}
return null;
}
-
+
public void markInitialized() {
// Signals that the type is correctly set now - This is for extension in subclasses
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
index 67a2a94ff..43dbeb7fa 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
@@ -141,7 +141,7 @@ public class LookupEnvironment implements ProblemReasons, TypeConstants {
private int lastUnitIndex = -1; // ROOT_ONLY
TypeSystem typeSystem; // SHARED
-
+
public INameEnvironment nameEnvironment; // SHARED
public CompilerOptions globalOptions; // SHARED
@@ -155,7 +155,7 @@ public class LookupEnvironment implements ProblemReasons, TypeConstants {
public ITypeRequestor typeRequestor; // SHARED
private SimpleLookupTable uniqueParameterizedGenericMethodBindings;
-
+
// key is a string with the method selector value is an array of method bindings
private SimpleLookupTable uniquePolymorphicMethodBindings;
private SimpleLookupTable uniqueGetClassMethodBinding; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=300734
@@ -279,7 +279,7 @@ public ModuleBinding getModule(char[] name) {
this.typeRequestor.accept(mod, this);
moduleBinding = this.root.knownModules.get(name);
}
- } else
+ } else
return this.UnNamedModule;
}
return moduleBinding;
@@ -318,7 +318,7 @@ public ReferenceBinding askForType(char[][] compoundName, /*@NonNull*/ModuleBind
Config.setSourceTypeRequired(false);
// SH}
ModuleBinding answerModule = answer.moduleBinding != null ? answer.moduleBinding : this.UnNamedModule;
-
+
if (answer.isBinaryType()) {
// the type was found as a .class file
PackageBinding pkg = answerModule.environment.computePackageFrom(compoundName, false /* valid pkg */);
@@ -384,7 +384,7 @@ ReferenceBinding askForType(PackageBinding packageBinding, char[] name, ModuleBi
// SH}
ModuleBinding answerModule = answer.moduleBinding != null ? answer.moduleBinding : this.UnNamedModule;
PackageBinding answerPackage = packageBinding;
-
+
if (answerModule != null) {
if (!answerPackage.isDeclaredIn(answerModule))
continue; // this answer is not reachable via the packageBinding
@@ -409,7 +409,7 @@ ReferenceBinding askForType(PackageBinding packageBinding, char[] name, ModuleBi
typeDeclaration = (TypeDeclaration)this.problemReporter.referenceContext;
prevFlag = typeDeclaration.willCatchAbort;
typeDeclaration.willCatchAbort = true;
- }
+ }
// SH}
try {
this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction());
@@ -516,7 +516,7 @@ private ModuleBinding getModuleFromAnswer(NameEnvironmentAnswer answer) {
ModuleBinding moduleBinding;
if (!this.useModuleSystem || moduleName == ModuleBinding.UNNAMED) {
moduleBinding = this.UnNamedModule;
- } else {
+ } else {
moduleBinding = this.knownModules.get(moduleName);
if (moduleBinding == null && this.nameEnvironment instanceof IModuleAwareNameEnvironment) {
IModule iModule = ((IModuleAwareNameEnvironment) this.nameEnvironment).getModule(moduleName);
@@ -691,7 +691,7 @@ public int internalCompleteTypeBindings(CompilationUnitDeclaration parsedUnit) {
if (this != this.root) {
return this.root.internalCompleteTypeBindings(parsedUnit);
}
- if (this.unitBeingCompleted == parsedUnit)
+ if (this.unitBeingCompleted == parsedUnit)
return 0; // avoid re-entrance
int todo = this.stepCompleted;
//SH}
@@ -719,7 +719,7 @@ public int internalCompleteTypeBindings(CompilationUnitDeclaration parsedUnit) {
ReferenceBinding enclosingType = roleBinding.enclosingType();
if (enclosingType != null) {
TeamModel enclosingTeam = enclosingType.getTeamModel();
- if ( enclosingTeam != null
+ if ( enclosingTeam != null
&& enclosingTeam._state.getProcessingState() == ITranslationStates.STATE_LENV_CONNECT_TYPE_HIERARCHY)
todo = CONNECT_TYPE_HIERARCHY;
}
@@ -983,7 +983,7 @@ private PackageBinding computePackageFrom(char[][] constantPoolName, boolean isM
}
}
if (packageBinding == null || packageBinding == TheNotFoundPackage) {
- packageBinding = this.module.createDeclaredToplevelPackage(constantPoolName[0]);
+ packageBinding = this.module.createDeclaredToplevelPackage(constantPoolName[0]);
}
if (isMissing) packageBinding.tagBits |= TagBits.HasMissingType;
this.knownPackages.put(constantPoolName[0], packageBinding); // TODO: split?
@@ -1024,7 +1024,7 @@ private PackageBinding computePackageFrom(char[][] constantPoolName, boolean isM
if (incarnation.hasCompilationUnit(false)) {
if (candidate != null) {
candidate = null;
- break; // likely to report "accessible from more than one module" downstream
+ break; // likely to report "accessible from more than one module" downstream
}
candidate = incarnation;
}
@@ -1108,7 +1108,7 @@ public TypeBinding convertToRawType(TypeBinding type, boolean forceRawEnclosingT
if (!((ReferenceBinding)originalType).hasEnclosingInstanceContext()) {
convertedEnclosing = (ReferenceBinding) originalEnclosing.original();
} else {
- if (originalEnclosing.kind() == Binding.RAW_TYPE) {
+ if (originalEnclosing.kind() == Binding.RAW_TYPE) {
convertedEnclosing = originalEnclosing;
needToConvert = true;
} else if (forceRawEnclosingType && !needToConvert/*stop recursion when conversion occurs*/) {
@@ -1144,7 +1144,7 @@ public ReferenceBinding[] convertToRawTypes(ReferenceBinding[] originalTypes, bo
for (int i = 0, length = originalTypes.length; i < length; i++) {
ReferenceBinding originalType = originalTypes[i];
ReferenceBinding convertedType = (ReferenceBinding) convertToRawType(forceErasure ? originalType.erasure() : originalType, forceRawEnclosingType);
- if (TypeBinding.notEquals(convertedType, originalType)) {
+ if (TypeBinding.notEquals(convertedType, originalType)) {
if (convertedTypes == originalTypes) {
System.arraycopy(originalTypes, 0, convertedTypes = new ReferenceBinding[length], 0, i);
}
@@ -1258,7 +1258,7 @@ public TypeBinding createIntersectionType18(ReferenceBinding[] intersectingTypes
});
}
return this.typeSystem.getIntersectionType18(intersectingTypes);
-}
+}
public BinaryTypeBinding createBinaryTypeFrom(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) {
return createBinaryTypeFrom(binaryType, packageBinding, true, accessRestriction);
@@ -1317,7 +1317,7 @@ public MissingTypeBinding createMissingType(PackageBinding packageBinding, char[
* 3. Create the method bindings
*/
public PackageBinding createPackage(char[][] compoundName) {
- return createPlainPackage(compoundName);
+ return createPlainPackage(compoundName);
}
public PlainPackageBinding createPlainPackage(char[][] compoundName) {
//{ObjectTeams: JDT didn't detect collision for toplevel type/package, because default package is weird ;-)
@@ -1482,7 +1482,7 @@ public PolymorphicMethodBinding createPolymorphicMethod(MethodBinding originalPo
String key = new String(originalPolymorphicMethod.selector);
PolymorphicMethodBinding[] cachedInfo = (PolymorphicMethodBinding[]) this.uniquePolymorphicMethodBindings.get(key);
int parametersLength = parameters == null ? 0: parameters.length;
- TypeBinding[] parametersTypeBinding = new TypeBinding[parametersLength];
+ TypeBinding[] parametersTypeBinding = new TypeBinding[parametersLength];
for (int i = 0; i < parametersLength; i++) {
TypeBinding parameterTypeBinding = parameters[i];
if (parameterTypeBinding.id == TypeIds.T_null) {
@@ -1637,7 +1637,7 @@ public ParameterizedTypeBinding createParameterizedType(ReferenceBinding generic
// SH}
public ReferenceBinding maybeCreateParameterizedType(ReferenceBinding nonGenericType, ReferenceBinding enclosingType) {
- boolean canSeeEnclosingTypeParameters = enclosingType != null
+ boolean canSeeEnclosingTypeParameters = enclosingType != null
&& (enclosingType.isParameterizedType() | enclosingType.isRawType())
&& !nonGenericType.isStatic();
if (canSeeEnclosingTypeParameters)
@@ -1781,7 +1781,7 @@ public char[][] getNullableAnnotationName() {
}
public AnnotationBinding getNonNullAnnotation() {
- if (this.nonNullAnnotation != null)
+ if (this.nonNullAnnotation != null)
return this.nonNullAnnotation;
if (this.root != this) {
return this.nonNullAnnotation = this.root.getNonNullAnnotation();
@@ -2085,9 +2085,9 @@ public ReferenceBinding getTypeFromCompoundName(char[][] compoundName, boolean i
if (binding == TheNotFoundType) {
// report the missing class file first
if (!wasMissingType) {
- /* Since missing types have been already been complained against while producing binaries, there is no class path
- * misconfiguration now that did not also exist in some equivalent form while producing the class files which encode
- * these missing types. So no need to bark again. Note that wasMissingType == true signals a type referenced in a .class
+ /* Since missing types have been already been complained against while producing binaries, there is no class path
+ * misconfiguration now that did not also exist in some equivalent form while producing the class files which encode
+ * these missing types. So no need to bark again. Note that wasMissingType == true signals a type referenced in a .class
* file which could not be found when the binary was produced. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=364450 */
this.problemReporter.isClassPathCorrect(compoundName, this.root.unitBeingCompleted, this.missingClassFileLocation, false);
}
@@ -2146,7 +2146,7 @@ ReferenceBinding getTypeFromConstantPoolName(char[] signature, int start, int en
//{ObjectTeams: changed default visibility to public
public
// SH}
-TypeBinding getTypeFromSignature(char[] signature, int start, int end, boolean isParameterized, TypeBinding enclosingType,
+TypeBinding getTypeFromSignature(char[] signature, int start, int end, boolean isParameterized, TypeBinding enclosingType,
char[][][] missingTypeNames, ITypeAnnotationWalker walker)
{
int dimension = 0;
@@ -2159,7 +2159,7 @@ TypeBinding getTypeFromSignature(char[] signature, int start, int end, boolean i
if (dimension > 0 && walker != ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER) {
for (int i = 0; i < dimension; i++) {
AnnotationBinding [] annotations = BinaryTypeBinding.createAnnotations(walker.getAnnotationsAtCursor(0, true), this, missingTypeNames);
- if (annotations != Binding.NO_ANNOTATIONS) {
+ if (annotations != Binding.NO_ANNOTATIONS) {
if (annotationsOnDimensions == null)
annotationsOnDimensions = new AnnotationBinding[dimension][];
annotationsOnDimensions[i] = annotations;
@@ -2167,7 +2167,7 @@ TypeBinding getTypeFromSignature(char[] signature, int start, int end, boolean i
walker = walker.toNextArrayDimension();
}
}
-
+
if (end == -1)
end = signature.length - 1;
@@ -2209,20 +2209,20 @@ TypeBinding getTypeFromSignature(char[] signature, int start, int end, boolean i
} else {
binding = getTypeFromConstantPoolName(signature, start + 1, end, isParameterized, missingTypeNames); // skip leading 'L' or 'T'
}
-
+
if (isParameterized) {
if (dimension != 0)
throw new IllegalStateException();
return binding;
}
-
+
if (walker != ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER) {
binding = annotateType(binding, walker, missingTypeNames);
}
-
+
if (dimension != 0)
binding = this.typeSystem.getArrayType(binding, dimension, AnnotatableTypeSystem.flattenedAnnotations(annotationsOnDimensions));
-
+
return binding;
}
@@ -2283,8 +2283,8 @@ boolean qualifiedNameMatchesSignature(char[][] name, char[] signature) {
return false;
}
-public TypeBinding getTypeFromTypeSignature(SignatureWrapper wrapper, TypeVariableBinding[] staticVariables, ReferenceBinding enclosingType,
- char[][][] missingTypeNames, ITypeAnnotationWalker walker)
+public TypeBinding getTypeFromTypeSignature(SignatureWrapper wrapper, TypeVariableBinding[] staticVariables, ReferenceBinding enclosingType,
+ char[][][] missingTypeNames, ITypeAnnotationWalker walker)
{
// TypeVariableSignature = 'T' Identifier ';'
// ArrayTypeSignature = '[' TypeSignature
@@ -2301,7 +2301,7 @@ public TypeBinding getTypeFromTypeSignature(SignatureWrapper wrapper, TypeVariab
if (dimension > 0 && walker != ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER) {
for (int i = 0; i < dimension; i++) {
AnnotationBinding [] annotations = BinaryTypeBinding.createAnnotations(walker.getAnnotationsAtCursor(0, true), this, missingTypeNames);
- if (annotations != Binding.NO_ANNOTATIONS) {
+ if (annotations != Binding.NO_ANNOTATIONS) {
if (annotationsOnDimensions == null)
annotationsOnDimensions = new AnnotationBinding[dimension][];
annotationsOnDimensions[i] = annotations;
@@ -2365,7 +2365,7 @@ public TypeBinding getTypeFromTypeSignature(SignatureWrapper wrapper, TypeVariab
if (memberType == null)
this.problemReporter.corruptedSignature(currentType, wrapper.signature, memberStart); // aborts
if(memberType.isStatic()) {
- // may happen for class files generated by eclipse before bug 460491 was fixed.
+ // may happen for class files generated by eclipse before bug 460491 was fixed.
walker = savedWalker;
} else {
walker = walker.toNextNestedType();
@@ -2376,7 +2376,7 @@ public TypeBinding getTypeFromTypeSignature(SignatureWrapper wrapper, TypeVariab
} else {
typeArguments = null;
}
- if (typeArguments != null || // has type arguments, or ...
+ if (typeArguments != null || // has type arguments, or ...
(!memberType.isStatic() && currentType.isParameterizedType())) // ... can see type arguments of enclosing
{
if (memberType.isStatic())
@@ -2486,7 +2486,7 @@ public void reset() {
this.accessRestrictions = new HashMap(3);
this.verifier = null;
-
+
// NOTE: remember to fix #updateCaches(...) when adding unique binding caches
this.uniqueParameterizedGenericMethodBindings = new SimpleLookupTable(3);
this.uniquePolymorphicMethodBindings = new SimpleLookupTable(3);
@@ -2609,7 +2609,7 @@ public boolean containsNullTypeAnnotation(AnnotationBinding[] typeAnnotations) {
if (typeAnnotation.type.hasNullBit(TypeIds.BitNonNullAnnotation|TypeIds.BitNullableAnnotation))
return true;
}
- return false;
+ return false;
}
public Binding getInaccessibleBinding(char[][] compoundName, ModuleBinding clientModule) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MemberTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MemberTypeBinding.java
index 48e6fb476..e0099bc3f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MemberTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MemberTypeBinding.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
@@ -82,10 +82,10 @@ void checkSyntheticArgsAndFields() {
@Override
public char[] constantPoolName() /* java/lang/Object */ {
-
+
if (this.constantPoolName != null)
return this.constantPoolName;
-
+
if (!isPrototype()) {
return this.prototype.constantPoolName();
}
@@ -292,7 +292,7 @@ private ReferenceBinding checkRefineBase(
if (next.isCompatibleWith(current)) return next;
if (current.isRole() && current.roleModel.hasTSuperRole(next.getRealType())) return current;
if ( RoleTypeBinding.isRoleWithExplicitAnchor(current)
- && RoleTypeBinding.isRoleWithExplicitAnchor(next))
+ && RoleTypeBinding.isRoleWithExplicitAnchor(next))
{
// check for implicit refinement of base anchored baseclasses (OTJLD 2.7(d)):
ITeamAnchor currentAnchor = ((RoleTypeBinding)current).getAnchor();
@@ -306,7 +306,7 @@ private ReferenceBinding checkRefineBase(
if ( next.getRealType().isCompatibleWith(current.getRealType())
&& nextDeclaringType.isCompatibleWith(currentDeclaringType))
return next;
- }
+ }
}
classScope.problemReporter().incompatibleBaseclasses(
classScope.referenceContext, sStart, sEnd, current, next);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
index acd33bd17..8fe6c449c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
@@ -519,7 +519,7 @@ public final boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invoca
SourceTypeBinding invocationType = scope.enclosingSourceType();
//{ObjectTeams: staticness is no problem in synthetic role interfaces:
- if (!this.declaringClass.isSynthInterface())
+ if (!this.declaringClass.isSynthInterface())
// SH}
if (this.declaringClass.isInterface() && isStatic() && !isPrivate()) {
// Static interface methods can be explicitly invoked only through the type reference of the declaring interface or implicitly in the interface itself or via static import.
@@ -529,9 +529,9 @@ public final boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invoca
return true;
return false;
}
-
+
if (isPublic()) return true;
-
+
//{ObjectTeams:
// creator methods conceptually belong to the role, check for stored orig ctor:
@@ -551,7 +551,7 @@ public final boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invoca
receiverClass = ((ReferenceBinding)receiverType).getRealClass();
receiverType = ((ReferenceBinding)receiverType).getRealType();
}
-
+
// short-cut for generated methods (here: callin wrappers)
if (scope.methodScope() != null && scope.methodScope().isCallinWrapper())
if ( !isPrivate()
@@ -590,7 +590,7 @@ public final boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invoca
/* orig:
TypeBinding receiverErasure = receiverType.erasure();
:giro*/
- TypeBinding receiverErasure = receiverClass != null ? receiverClass.erasure()
+ TypeBinding receiverErasure = receiverClass != null ? receiverClass.erasure()
: receiverType.erasure();
// SH}
ReferenceBinding declaringErasure = (ReferenceBinding) this.declaringClass.erasure();
@@ -900,8 +900,8 @@ public TypeBinding getCodeGenType(int pos) {
break checkTsuper;
tsuperType = tsuperOriginal.parameters[pos];
}
- if ( tsuperType.isTypeVariable()
- && (((TypeVariableBinding)tsuperType).declaringElement.kind() & Binding.TYPE) != 0
+ if ( tsuperType.isTypeVariable()
+ && (((TypeVariableBinding)tsuperType).declaringElement.kind() & Binding.TYPE) != 0
&& !currentType.isTypeVariable())
return tsuperType.erasure();
}
@@ -926,8 +926,8 @@ public final char[] constantPoolName() {
/**
* After method verifier has finished, fill in missing @NonNull specification from the applicable default.
- * @param needToApplyParameterNonNullDefault
- * @param needToApplyReturnNonNullDefault
+ * @param needToApplyParameterNonNullDefault
+ * @param needToApplyReturnNonNullDefault
*/
protected void fillInDefaultNonNullness(AbstractMethodDeclaration sourceMethod, boolean needToApplyReturnNonNullDefault, ParameterNonNullDefaultProvider needToApplyParameterNonNullDefault) {
if (this.parameterNonNullness == null)
@@ -999,7 +999,7 @@ protected void fillInDefaultNonNullness18(AbstractMethodDeclaration sourceMethod
if (original.returnType != null && hasNonNullDefaultForReturnType(sourceMethod) && original.returnType.acceptsNonNullDefault()) {
if ((this.returnType.tagBits & TagBits.AnnotationNullMASK) == 0) {
this.returnType = env.createAnnotatedType(this.returnType, new AnnotationBinding[]{env.getNonNullAnnotation()});
- } else if (sourceMethod instanceof MethodDeclaration && (this.returnType.tagBits & TagBits.AnnotationNonNull) != 0
+ } else if (sourceMethod instanceof MethodDeclaration && (this.returnType.tagBits & TagBits.AnnotationNonNull) != 0
&& ((MethodDeclaration)sourceMethod).hasNullTypeAnnotation(AnnotationPosition.MAIN_TYPE)) {
sourceMethod.scope.problemReporter().nullAnnotationIsRedundant(sourceMethod, -1/*signifies method return*/);
}
@@ -2017,9 +2017,9 @@ public boolean redeclaresPublicObjectMethod(Scope scope) {
MethodBinding [] methods = javaLangObject.getMethods(this.selector);
for (int i = 0, length = methods == null ? 0 : methods.length; i < length; i++) {
final MethodBinding method = methods[i];
- if (!method.isPublic() || method.isStatic() || method.parameters.length != this.parameters.length)
+ if (!method.isPublic() || method.isStatic() || method.parameters.length != this.parameters.length)
continue;
- if (MethodVerifier.doesMethodOverride(this, method, scope.environment()))
+ if (MethodVerifier.doesMethodOverride(this, method, scope.environment()))
return true;
}
return false;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
index 0a694bbdb..f685b4b4a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
@@ -245,7 +245,7 @@ private void checkAndSetModifiersForMethod(final MethodBinding methodBinding) {
}
if (reportIllegalModifierCombination) {
problemReporter().illegalModifierCombinationForInterfaceMethod((AbstractMethodDeclaration) this.referenceContext);
- }
+ }
if (sourceLevel >= ClassFileConstants.JDK9 && (methodBinding.modifiers & ClassFileConstants.AccPrivate) != 0) {
int remaining = realModifiers & ~expectedModifiers;
if (remaining == 0) { // check for the combination of allowed modifiers with private
@@ -274,7 +274,7 @@ private void checkAndSetModifiersForMethod(final MethodBinding methodBinding) {
LocalTypeBinding local = (LocalTypeBinding) declaringClass;
TypeReference ref = local.scope.referenceContext.allocation.type;
if (ref != null && (ref.bits & ASTNode.IsDiamond) != 0) {
- //
+ //
if ((realModifiers & (ClassFileConstants.AccPrivate | ClassFileConstants.AccStatic )) == 0) {
methodBinding.tagBits |= TagBits.AnnotationOverride;
}
@@ -320,13 +320,13 @@ private void checkAndSetModifiersForMethod(final MethodBinding methodBinding) {
if (!methodBinding.declaringClass.isAbstract())
//{ObjectTeams: set a re-checker since method abstractness might go during callout transformation.
/* orig:
- problemReporter().abstractMethodInAbstractClass((SourceTypeBinding) declaringClass, (AbstractMethodDeclaration) this.referenceContext);
+ problemReporter().abstractMethodInAbstractClass((SourceTypeBinding) declaringClass, (AbstractMethodDeclaration) this.referenceContext);
:giro */
problemReporter().setRechecker(new IProblemRechecker() { @Override
public boolean shouldBeReported(IrritantSet[] foundIrritants) {
return methodBinding.isAbstract();
}})
- .abstractMethodInAbstractClass((SourceTypeBinding) declaringClass, (AbstractMethodDeclaration) this.referenceContext);
+ .abstractMethodInAbstractClass((SourceTypeBinding) declaringClass, (AbstractMethodDeclaration) this.referenceContext);
//JH & MW & SH}
}
@@ -409,7 +409,7 @@ public void computeLocalVariablePositions(int initOffset, CodeStream codeStream)
// record user-defined argument for attribute generation
codeStream.record(local);
-
+
// assign variable position
local.resolvedPosition = this.offset;
@@ -751,14 +751,14 @@ public Binding checkRedundantDefaultNullness(int nullBits, int sourceStart) {
AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.referenceContext;
return method.isMappingWrapper._callin();
}
-
+
public CallinCalloutScope getDeclaringMappingScope() {
AbstractMethodDeclaration method = referenceMethod();
TypeDeclaration type = referenceType();
if (method == null || type == null)
return null;
if (type.callinCallouts != null) {
- for (AbstractMethodMappingDeclaration mapping : type.callinCallouts)
+ for (AbstractMethodMappingDeclaration mapping : type.callinCallouts)
if (mapping.isCallout() && mapping.roleMethodSpec.resolvedMethod == method.binding)
return mapping.scope;
}
@@ -772,7 +772,7 @@ public Binding checkRedundantDefaultNullness(int nullBits, int sourceStart) {
for (AbstractMethodDeclaration wrapper : callinMapping.wrappers)
if (wrapper == method)
return mapping.scope;
- }
+ }
}
return null;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java
index c645e1435..290fd6858 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java
@@ -78,7 +78,7 @@ public abstract class MethodVerifier extends ImplicitNullAnnotationVerifier {
SourceTypeBinding type;
HashtableOfObject inheritedMethods;
HashtableOfObject currentMethods;
- /**
+ /**
* Methods that are to be considered inherited even though they are overridden somewhere in the
* hierarchy - notably for bridge method generation
*/
@@ -496,7 +496,7 @@ void checkForRedundantSuperinterfaces(ReferenceBinding superclass, ReferenceBind
if (superInterfaces == Binding.NO_SUPERINTERFACES) return;
//{ObjectTeams: implicit inheritance among roles is not visible at AST level
- if (this.type.isRole())
+ if (this.type.isRole())
return;
// TODO: should do this check during copyinheritance.TypeLevel!
// SH}
@@ -602,7 +602,7 @@ void checkInheritedMethods(MethodBinding[] methods, int length, boolean[] isOver
3. if concrete method exists, check to see if its return type is compatible with all others
if it is then check concrete method against abstract methods
if its not, then find most specific abstract method & report abstract method must be implemented since concrete method is insufficient
- if no most specific return type abstract method exists, then report incompatible return type with all inherited methods
+ if no most specific return type abstract method exists, then report incompatible return type with all inherited methods
*/
MethodBinding concreteMethod = this.type.isInterface() || methods[0].isAbstract() ? null : methods[0];
@@ -827,14 +827,14 @@ void computeInheritedMethods(ReferenceBinding superclass, ReferenceBinding[] sup
}
if (superIfcList.size() == 0) return;
-
+
if (superIfcList.size() == 1) {
superInterfaces = new ReferenceBinding[] { (ReferenceBinding) superIfcList.get(0) };
} else {
superInterfaces = (ReferenceBinding[]) superIfcList.toArray(new ReferenceBinding[superIfcList.size()]);
superInterfaces = Sorting.sortTypes(superInterfaces);
}
-
+
SimpleSet skip = findSuperinterfaceCollisions(superclass, superInterfaces);
int len = superInterfaces.length;
for (int i = len-1; i >= 0; i--) {
@@ -846,7 +846,7 @@ void computeInheritedMethods(ReferenceBinding superclass, ReferenceBinding[] sup
nextMethod : for (int m = methods.length; --m >= 0;) { // Interface methods are all abstract public
MethodBinding inheritedMethod = methods[m];
//{ObjectTeams:
- if ( inheritedMethod.original().problemId() == ProblemReasons.NotVisible
+ if ( inheritedMethod.original().problemId() == ProblemReasons.NotVisible
&& MethodModel.isRoleMethodInheritedFromNonPublicRegular(inheritedMethod))
continue nextMethod;
// SH}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
index f3a660f3f..7dd60eedf 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
@@ -159,7 +159,7 @@ void checkForBridgeMethod(MethodBinding currentMethod, MethodBinding inheritedMe
if (thisMethod.areParameterErasuresEqual(bridge) && TypeBinding.equalsEquals(thisMethod.returnType.erasure(), bridge.returnType.erasure())) {
// use inherited method for problem reporting.
problemReporter(thisMethod).methodNameClash(thisMethod, inheritedMethod.declaringClass.isRawType() ? inheritedMethod : inheritedMethod.original(), ProblemSeverities.Error);
- return;
+ return;
}
}
}
@@ -341,8 +341,8 @@ void checkInheritedMethods(MethodBinding[] methods, int length, boolean[] isOver
// (Not asking ParameterizedGenericMethodBinding.isRawMethod(),
// because that is true only for methods of a RawTypeBinding,
// but here we look for rawness regarding the method's type variables).
- if (TypeBinding.equalsEquals(concreteMethod.declaringClass, methods[i].declaringClass)
- && concreteMethod.typeVariables.length != methods[i].typeVariables.length)
+ if (TypeBinding.equalsEquals(concreteMethod.declaringClass, methods[i].declaringClass)
+ && concreteMethod.typeVariables.length != methods[i].typeVariables.length)
{
if (concreteMethod.typeVariables == Binding.NO_TYPE_VARIABLES
&& concreteMethod.original() == methods[i])
@@ -380,7 +380,7 @@ void checkInheritedMethods(MethodBinding[] methods, int length, boolean[] isOver
}
boolean checkInheritedDefaultMethods(MethodBinding[] methods, boolean[] isOverridden, int length) {
// JLS8 9.4.1.3 (interface) and 8.4.8.4 (class):
- // default method clashes with other inherited method which is override-equivalent
+ // default method clashes with other inherited method which is override-equivalent
if (length < 2) return true;
boolean ok = true;
findDefaultMethod: for (int i=0; i<length; i++) {
@@ -388,7 +388,7 @@ boolean checkInheritedDefaultMethods(MethodBinding[] methods, boolean[] isOverri
findEquivalent: for (int j=0; j<length; j++) {
if (j == i || isOverridden[j]) continue findEquivalent;
if (isMethodSubsignature(methods[i], methods[j])) {
- if (!doesMethodOverride(methods[i], methods[j]) && !doesMethodOverride(methods[j], methods[i])) {
+ if (!doesMethodOverride(methods[i], methods[j]) && !doesMethodOverride(methods[j], methods[i])) {
problemReporter().inheritedDefaultMethodConflictsWithOtherInherited(this.type, methods[i], methods[j]);
ok = false;
continue findDefaultMethod;
@@ -423,7 +423,7 @@ void checkAgainstInheritedMethods(MethodBinding currentMethod, MethodBinding[] m
{
super.checkAgainstInheritedMethods(currentMethod, methods, length, allInheritedMethods);
CompilerOptions options = this.environment.globalOptions;
- if (options.isAnnotationBasedNullAnalysisEnabled
+ if (options.isAnnotationBasedNullAnalysisEnabled
&& (currentMethod.tagBits & TagBits.IsNullnessKnown) == 0)
{
// if annotations are inherited these have been checked during STB.resolveTypesFor() (for methods explicit in this.type)
@@ -439,7 +439,7 @@ void checkAgainstInheritedMethods(MethodBinding currentMethod, MethodBinding[] m
}
@Override
-void checkNullSpecInheritance(MethodBinding currentMethod, AbstractMethodDeclaration srcMethod,
+void checkNullSpecInheritance(MethodBinding currentMethod, AbstractMethodDeclaration srcMethod,
boolean hasReturnNonNullDefault, ParameterNonNullDefaultProvider hasParameterNonNullDefault, boolean complain, MethodBinding inheritedMethod, MethodBinding[] allInherited, Scope scope, InheritedNonNullnessInfo[] inheritedNonNullnessInfos)
{
complain &= !currentMethod.isConstructor();
@@ -449,8 +449,8 @@ void checkNullSpecInheritance(MethodBinding currentMethod, AbstractMethodDeclara
return;
}
// in this context currentMethod can be inherited, too. Recurse if needed.
- if (TypeBinding.notEquals(currentMethod.declaringClass, this.type)
- && (currentMethod.tagBits & TagBits.IsNullnessKnown) == 0)
+ if (TypeBinding.notEquals(currentMethod.declaringClass, this.type)
+ && (currentMethod.tagBits & TagBits.IsNullnessKnown) == 0)
{
this.buddyImplicitNullAnnotationsVerifier.checkImplicitNullAnnotations(currentMethod, srcMethod, complain, scope);
}
@@ -460,7 +460,7 @@ void checkNullSpecInheritance(MethodBinding currentMethod, AbstractMethodDeclara
void reportRawReferences() {
CompilerOptions compilerOptions = this.type.scope.compilerOptions();
if (compilerOptions.sourceLevel < ClassFileConstants.JDK1_5 // shouldn't whine at all
- || compilerOptions.reportUnavoidableGenericTypeProblems) { // must have already whined
+ || compilerOptions.reportUnavoidableGenericTypeProblems) { // must have already whined
return;
}
/* Code below is only for a method that does not override/implement a super type method. If it were to,
@@ -505,7 +505,7 @@ void reportRawReferences() {
public void reportRawReferences(MethodBinding currentMethod, MethodBinding inheritedMethod) {
CompilerOptions compilerOptions = this.type.scope.compilerOptions();
if (compilerOptions.sourceLevel < ClassFileConstants.JDK1_5 // shouldn't whine at all
- || compilerOptions.reportUnavoidableGenericTypeProblems) { // must have already whined
+ || compilerOptions.reportUnavoidableGenericTypeProblems) { // must have already whined
return;
}
AbstractMethodDeclaration methodDecl = currentMethod.sourceMethod();
@@ -534,7 +534,7 @@ public void reportRawReferences(MethodBinding currentMethod, MethodBinding inher
final TypeBinding methodType = currentMethod.returnType;
if (methodType.leafComponentType().isRawType()) {
if (inheritedMethodType.leafComponentType().isRawType()) {
- //
+ //
} else {
if ((returnType.bits & ASTNode.IgnoreRawTypeCheck) == 0
&& compilerOptions.getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore) {
@@ -557,7 +557,7 @@ void checkMethods() {
MethodBinding[] inherited = (MethodBinding[]) this.inheritedMethods.valueTable[s];
// ensure that if we have a concrete method this shows up at position [0]:
inherited = Sorting.concreteFirst(inherited, inherited.length);
-
+
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660, if current type is exposed,
// inherited methods of super classes are too. current != null case handled below.
if (current == null && !isOrEnclosedByPrivateType) {
@@ -661,7 +661,7 @@ void checkMethods() {
// (and perform some side effects : bridge methods & use flags)
for (int i = 0; i < inheritedLength; i++) {
MethodBinding matchMethod = foundMatch[i];
-
+
if (matchMethod == null && current != null && this.type.isPublic()) { // current == null case handled already.
MethodBinding inheritedMethod = inherited[i];
if (inheritedMethod.isPublic() && (!inheritedMethod.declaringClass.isInterface() && !inheritedMethod.declaringClass.isPublic())) {
@@ -671,7 +671,7 @@ void checkMethods() {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660, if current type is exposed,
// inherited methods of super classes are too. current == null case handled already.
if (!isOrEnclosedByPrivateType && matchMethod == null && current != null) {
- inherited[i].original().modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
+ inherited[i].original().modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
}
MethodBinding inheritedMethod = inherited[i];
for (int j = i + 1; j < inheritedLength; j++) {
@@ -713,7 +713,7 @@ void checkMethods() {
skip[j] = true;
} else if ((replaceMatch = findReplacedMethod(otherInheritedMethod, inheritedMethod)) != null) {
matchingInherited[++index] = replaceMatch;
- skip[j] = true;
+ skip[j] = true;
} else if (matchMethod == null) {
// none replaced by the other, check these methods against each other now:
checkInheritedMethods(inheritedMethod, otherInheritedMethod);
@@ -742,7 +742,7 @@ void checkMethods() {
matchingIsOverridden = isOverridden;
matchingIsInherited = isInherited;
}
-
+
checkInheritedMethods(matchingInherited, length, matchingIsOverridden, matchingIsInherited); // pass in the length of matching
}
else if (mustImplementAbstractMethods && matchingInherited[0].isAbstract() && matchMethod == null)
@@ -773,7 +773,7 @@ boolean isSkippableOrOverridden(MethodBinding specific, MethodBinding general, b
isOverridden[idx] = true;
return true;
}
- } else if (specificIsInterface == generalIsInterface) {
+ } else if (specificIsInterface == generalIsInterface) {
if (specific.declaringClass.isCompatibleWith(general.declaringClass) && isMethodSubsignature(specific, general)) {
skip[idx] = true;
isOverridden[idx] = true;
@@ -784,17 +784,17 @@ boolean isSkippableOrOverridden(MethodBinding specific, MethodBinding general, b
}
/* 'general' is considered as replaced by 'specific' if
* - 'specific' is "at least as concrete as" 'general'
- * - 'specific' has a signature that is a subsignature of the substituted signature of 'general' (as seen from specific's declaring class)
+ * - 'specific' has a signature that is a subsignature of the substituted signature of 'general' (as seen from specific's declaring class)
* - default methods should also be considered replaced by class methods that meet the signature that is a subsignature criteria.
*/
MethodBinding findReplacedMethod(MethodBinding specific, MethodBinding general) {
MethodBinding generalSubstitute = computeSubstituteMethod(general, specific);
- if (generalSubstitute != null
- && (!specific.isAbstract() || general.isAbstract() || (general.isDefaultMethod() && specific.declaringClass.isClass())) // if (abstract(specific) => abstract(general)) check if 'specific' overrides 'general'
- && isSubstituteParameterSubsignature(specific, generalSubstitute))
+ if (generalSubstitute != null
+ && (!specific.isAbstract() || general.isAbstract() || (general.isDefaultMethod() && specific.declaringClass.isClass())) // if (abstract(specific) => abstract(general)) check if 'specific' overrides 'general'
+ && isSubstituteParameterSubsignature(specific, generalSubstitute))
{
return generalSubstitute;
- }
+ }
return null;
}
@@ -880,7 +880,7 @@ void checkTypeVariableMethods(TypeParameter typeParameter) {
}
if (interfaceMethod != null && implementation != null && !implementation.isAbstract() && !isAsVisible(implementation, interfaceMethod))
problemReporter().inheritedMethodReducesVisibility(typeParameter, implementation, new MethodBinding [] {interfaceMethod});
-
+
if (areReturnTypesCompatible(first, match)) continue;
// unrelated interfaces - check to see if return types are compatible
if (first.declaringClass.isInterface() && match.declaringClass.isInterface() && areReturnTypesCompatible(match, first))
@@ -901,7 +901,7 @@ boolean detectInheritedNameClash(MethodBinding inherited, MethodBinding otherInh
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=322001
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=323693
// When reporting a name clash between two inherited methods, we should not look for a
- // signature clash, but instead should be looking for method descriptor clash.
+ // signature clash, but instead should be looking for method descriptor clash.
if (TypeBinding.notEquals(inherited.returnType.erasure(), otherInherited.returnType.erasure()))
return false;
// skip it if otherInherited is defined by a subtype of inherited's declaringClass or vice versa.
@@ -932,10 +932,10 @@ boolean detectNameClash(MethodBinding current, MethodBinding inherited, boolean
// For a user method, see if current class overrides the inherited method. If it does,
// then any grievance we may have ought to be against the current class's method and
// NOT against any super implementations. https://bugs.eclipse.org/bugs/show_bug.cgi?id=293615
-
+
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=315978 : we now defer this rather expensive
// check to just before reporting (the incorrect) name clash. In the event there is no name
- // clash to report to begin with (the common case), no penalty needs to be paid.
+ // clash to report to begin with (the common case), no penalty needs to be paid.
MethodBinding[] currentNamesakes = (MethodBinding[]) this.currentMethods.get(inherited.selector);
if (currentNamesakes.length > 1) { // we know it ought to at least one and that current is NOT the override
for (int i = 0, length = currentNamesakes.length; i < length; i++) {
@@ -1113,7 +1113,7 @@ void verify() {
this.type.detectAnnotationCycle();
super.verify();
-
+
reportRawReferences();
for (int i = this.type.typeVariables.length; --i >= 0;) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java
index 741b9ef05..a145a4763 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java
@@ -7,10 +7,10 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
- *
+ *
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.lookup;
@@ -197,7 +197,7 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
this.environment = new LookupEnvironment(existingEnvironment.root, this);
this.declaredPackages = new HashtableOfPackage<PlainPackageBinding>(5);
}
-
+
public PlainPackageBinding[] getExports() {
completeIfNeeded(UpdateKind.PACKAGE);
return this.exportedPackages;
@@ -207,7 +207,7 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
if (this.exportRestrictions != null) {
SimpleSetOfCharArray set = this.exportRestrictions.get(pack);
if (set != null) {
- char[][] names = new char[set.elementSize][];
+ char[][] names = new char[set.elementSize][];
set.asArray(names);
return CharOperation.charArrayToStringArray(names);
}
@@ -223,7 +223,7 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
if (this.openRestrictions != null) {
SimpleSetOfCharArray set = this.openRestrictions.get(pack);
if (set != null) {
- char[][] names = new char[set.elementSize][];
+ char[][] names = new char[set.elementSize][];
set.asArray(names);
return CharOperation.charArrayToStringArray(names);
}
@@ -244,11 +244,11 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
completeIfNeeded(UpdateKind.MODULE);
return this.requiresTransitive;
}
-
+
public TypeBinding[] getUses() {
return this.uses;
}
-
+
public TypeBinding[] getServices() {
return this.services;
}
@@ -456,7 +456,7 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
* All required modules include modules explicitly specified as required in the module declaration
* as well as implicit dependencies - those specified as ' requires transitive ' by one of the
* dependencies
- *
+ *
* @return
* An array of all required modules
*/
@@ -470,9 +470,9 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
}
ModuleBinding javaBase = this.environment.javaBaseModule();
// add java.base?
- if (!CharOperation.equals(this.moduleName, TypeConstants.JAVA_BASE) // ... not if this *is* java.base
+ if (!CharOperation.equals(this.moduleName, TypeConstants.JAVA_BASE) // ... not if this *is* java.base
&& javaBase != null // ... nor when java.base is absent
- && javaBase != this.environment.UnNamedModule) // ..... or faked by the unnamed module
+ && javaBase != this.environment.UnNamedModule) // ..... or faked by the unnamed module
{
allRequires.add(javaBase);
}
@@ -538,14 +538,14 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
/**
* Return a package binding if there exists a package named name in this module's context and it can be seen by this module.
- * A package can be seen by this module if it is declared in this module or any other module read by this module
+ * A package can be seen by this module if it is declared in this module or any other module read by this module
* (JLS 7.4.3 for packages based on JLS 7.3 for compilation units).
* Package exports are not considered for visibility check (only when checking "uniquely visible" (JLS 7.4.3)).
* <p>
* The returned package may be a {@link SplitPackageBinding}, if more than one package of the given name is visible.
* </p>
* <p>
- * When asked via the unnamed module or an automatic module all other named modules are considered visible.
+ * When asked via the unnamed module or an automatic module all other named modules are considered visible.
* </p>
*/
public PackageBinding getTopLevelPackage(char[] name) {
@@ -611,11 +611,11 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
if (this.environment.nameEnvironment.isPackage(parentName, name))
binding = this.createDeclaredPackage(subPkgCompoundName, parent);
}
-
+
binding = combineWithPackagesFromOtherRelevantModules(binding, subPkgCompoundName, declaringModuleNames);
assert binding == null || binding instanceof PlainPackageBinding || binding.enclosingModule == this;
-
+
if (binding == null || !binding.isValidBinding()) {
if (parent != null) {
if (binding == null) {
@@ -656,7 +656,7 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
// check each sub package
for (int i = 1; i < qualifiedPackageName.length; i++) {
- PackageBinding binding = getVisiblePackage(parent, qualifiedPackageName[i]);
+ PackageBinding binding = getVisiblePackage(parent, qualifiedPackageName[i]);
if (binding == null) {
return null;
}
@@ -691,9 +691,9 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
* Check if the given package is accessible by this module. True when the package is declared in
* this module or exported by some required module to this module.
* See {@link #isPackageExportedTo(PackageBinding, ModuleBinding)}
- *
+ *
* @param pkg
- *
+ *
* @return True, if the package is accessible by this module, false otherwise
*/
public boolean canAccess(PackageBinding pkg) {
@@ -857,7 +857,7 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
return this.defaultNullness;
}
SimpleLookupTable storedAnnotations(boolean forceInitialize, boolean forceStore) {
-
+
if (forceInitialize && this.storedAnnotations == null) {
if (!this.environment.globalOptions.storeAnnotations && !forceStore)
return null; // not supported during this compile
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NestedTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NestedTypeBinding.java
index d10043f9f..38dc25f88 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NestedTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NestedTypeBinding.java
@@ -14,7 +14,7 @@
* Stephan Herrmann - Contributions for
* Bug 365662 - [compiler][null] warn on contradictory and redundant null annotations
* Bug 429958 - [1.8][null] evaluate new DefaultLocation attribute of @NonNullByDefault
- * Bug 435805 - [1.8][compiler][null] Java 8 compiler does not recognize declaration style null annotations
+ * Bug 435805 - [1.8][compiler][null] Java 8 compiler does not recognize declaration style null annotations
* Keigo Imai - Contribution for bug 388903 - Cannot extend inner class as an anonymous class when it extends the outer class
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.lookup;
@@ -50,9 +50,9 @@ public NestedTypeBinding(NestedTypeBinding prototype) {
* Answer the new argument or the existing argument if one already existed.
*/
public SyntheticArgumentBinding addSyntheticArgument(LocalVariableBinding actualOuterLocalVariable) {
-
+
if (!isPrototype()) throw new IllegalStateException();
-
+
SyntheticArgumentBinding synthLocal = null;
if (this.outerLocalVariables == null) {
@@ -165,7 +165,7 @@ public int getOuterLocalVariablesSlotSize() {
default :
this.outerLocalVariablesSlotSize ++;
break;
- }
+ }
}
}
return this.outerLocalVariablesSlotSize;
@@ -185,28 +185,28 @@ public SyntheticArgumentBinding getSyntheticArgument(LocalVariableBinding actual
/* Answer the synthetic argument for <targetEnclosingType> or null if one does not exist.
*/
public SyntheticArgumentBinding getSyntheticArgument(ReferenceBinding targetEnclosingType, boolean onlyExactMatch, boolean scopeIsConstructorCall) {
-
+
if (!isPrototype()) throw new IllegalStateException();
-
+
if (this.enclosingInstances == null) return null; // is null if no enclosing instances are known
-
+
// exact match
-
- // firstly, during allocation, check and use the leftmost one (if possible)
+
+ // firstly, during allocation, check and use the leftmost one (if possible)
// to handle cases involving two instances of same type, such as
// class X {
// class Inner extends X {}
// void f(){
- // new X().new Inner(){}
+ // new X().new Inner(){}
// // here the result of (new X()) is passed as the first (synthetic) arg for ctor of new Inner(){}
- // // (and (this) as the second, of course)
+ // // (and (this) as the second, of course)
// }
// }
if (scopeIsConstructorCall && this.enclosingInstances.length > 0)
- if (TypeBinding.equalsEquals(this.enclosingInstances[0].type, targetEnclosingType))
+ if (TypeBinding.equalsEquals(this.enclosingInstances[0].type, targetEnclosingType))
if (this.enclosingInstances[0].actualOuterLocalVariable == null)
return this.enclosingInstances[0];
-
+
// then check other possibility
for (int i = this.enclosingInstances.length; --i >= 0;)
if (TypeBinding.equalsEquals(this.enclosingInstances[i].type, targetEnclosingType))
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NullTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NullTypeBinding.java
index dca633b6d..bee6817ee 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NullTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NullTypeBinding.java
@@ -21,17 +21,17 @@ public class NullTypeBinding extends BaseTypeBinding {
NullTypeBinding() {
super(TypeIds.T_null, TypeConstants.NULL, new char[] { 'N' }); // N stands for null even if it is never internally used);
}
-
+
@Override
public TypeBinding clone(TypeBinding enclosingType) {
return this; // enforce solitude.
}
-
+
@Override
public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
return; // reject misguided attempt.
}
-
+
@Override
public TypeBinding unannotated() {
return this;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java
index 971a6d80a..5e9094796 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java
@@ -72,15 +72,15 @@ public PackageBinding(char[][] compoundName, PackageBinding parent, LookupEnviro
this.environment = environment;
this.knownTypes = null; // initialized if used... class counts can be very large 300-600
this.knownPackages = new HashtableOfPackage<PackageBinding>(3); // sub-package counts are typically 0-3
-
+
if (compoundName != CharOperation.NO_CHAR_CHAR)
checkIfNullAnnotationPackage();
-
+
if (enclosingModule != null)
this.enclosingModule = enclosingModule;
else if (parent != null)
this.enclosingModule = parent.enclosingModule; // stop-gap for any remaining calls that don't provide an enclosingModule (they should)
-
+
if (this.enclosingModule == null)
throw new IllegalStateException("Package should have an enclosing module"); //$NON-NLS-1$
}
@@ -456,7 +456,7 @@ public String toString() {
* be stripped and one less check during retrieval.
*/
public static class TeamPackageBinding extends PlainPackageBinding {
-
+
/**
* @param compoundName
* @param parent
@@ -473,7 +473,7 @@ public String toString() {
parent.addPackage(this, enclosingModule);
enclosingModule.declaredPackages.put(CharOperation.concatWith(compoundName, '.'), this);
}
-
+
/** For nested role files the compoundName may contain '$' and '__OT__' delimitors.
* Delete '__OT__' and split at '$' into a more fine grained compound name.
* @param compoundName
@@ -485,19 +485,19 @@ public String toString() {
for (int i = 0; i < compoundName.length; i++)
count += CharOperation.occurencesOf('$', compoundName[i]);
char[][] result = new char[count][];
-
+
int resultIdx = 0;
for (int i = 0; i < compoundName.length; i++) {
int currentPos = 0;
while (true) {
int prevPos = currentPos;
currentPos = CharOperation.indexOf('$', compoundName[i], prevPos);
-
+
char[] element = CharOperation.subarray(compoundName[i], prevPos, currentPos); // split at '$'
if (RoleSplitter.isClassPartName(element))
element = RoleSplitter.getInterfacePartName(element); // strip '__OT__'
result[resultIdx++] = element;
-
+
if (currentPos == -1)
break;
currentPos++;
@@ -505,7 +505,7 @@ public String toString() {
}
return result;
}
-
+
@Override
void addType(ReferenceBinding element) {
if (this.knownTypes == null)
@@ -513,7 +513,7 @@ public String toString() {
char[][] elementCompoundName = CharOperation.splitOn('$', element.compoundName[element.compoundName.length - 1]);
this.knownTypes.put(elementCompoundName[elementCompoundName.length-1], element);
}
-
+
/** Similar to PackageBinding.getType(), except that we allow nested types,
* which we search in the parent package.
*/
@@ -535,7 +535,7 @@ public String toString() {
return null;
}
}
-
+
if (binding == LookupEnvironment.TheNotFoundType)
return null;
if (binding instanceof UnresolvedReferenceBinding)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java
index ecd234fa3..e6b066cf4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Technical University Berlin - extended API and implementation
@@ -70,7 +70,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
* <p>
* In 1.8+ if the expected type is not yet available due to this call being an argument to an outer call which is not overload-resolved yet,
* the returned method binding will be a PolyParameterizedGenericMethodBinding.
- * </p>
+ * </p>
*/
public static MethodBinding computeCompatibleMethod(MethodBinding originalMethod, TypeBinding[] arguments, Scope scope, InvocationSite invocationSite)
{
@@ -145,7 +145,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
if (expectedType != null && !originalMethod.returnType.mentionsAny(originalMethod.parameters, -1)) {
TypeBinding uncaptured = methodSubstitute.returnType.uncapture(scope);
if (!methodSubstitute.returnType.isCompatibleWith(expectedType) &&
- expectedType.isCompatibleWith(uncaptured)) {
+ expectedType.isCompatibleWith(uncaptured)) {
InferenceContext oldContext = inferenceContext;
inferenceContext = new InferenceContext(originalMethod);
// Include additional constraint pertaining to the expected type
@@ -162,7 +162,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
inferenceContext = oldContext;
}
}
- }
+ }
}
}
}
@@ -184,17 +184,17 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
for (int i = 0, length = typeVariables.length; i < length; i++) {
TypeVariableBinding typeVariable = typeVariables[i];
TypeBinding substitute = methodSubstitute.typeArguments[i]; // retain for diagnostics
- /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=375394, To avoid spurious bounds check failures due to circularity in formal bounds,
+ /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=375394, To avoid spurious bounds check failures due to circularity in formal bounds,
we should eliminate only the lingering embedded type variable references after substitution, not alien type variable references
that constitute the inference per se.
- */
+ */
TypeBinding substituteForChecks;
if (substitute instanceof TypeVariableBinding) {
substituteForChecks = substitute;
} else {
substituteForChecks = Scope.substitute(new LingeringTypeVariableEliminator(typeVariables, null, scope), substitute); // while using this for bounds check
}
-
+
if (uncheckedArguments != null && uncheckedArguments[i] == null) continue; // only bound check if inferred through 15.12.2.6
//{ObjectTeams: methods with generic declared lifting need to be checked in knowledge of the actual receiver type:
ReferenceBinding actualReceiverRefType = null;
@@ -229,13 +229,13 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
}
public static MethodBinding computeCompatibleMethod18(MethodBinding originalMethod, TypeBinding[] arguments, final Scope scope, InvocationSite invocationSite) {
-
+
TypeVariableBinding[] typeVariables = originalMethod.typeVariables;
if (invocationSite.checkingPotentialCompatibility()) {
// Not interested in a solution, only that there could potentially be one.
return scope.environment().createParameterizedGenericMethod(originalMethod, typeVariables);
}
-
+
ParameterizedGenericMethodBinding methodSubstitute = null;
InferenceContext18 infCtx18 = invocationSite.freshInferenceContext(scope);
if (infCtx18 == null)
@@ -245,7 +245,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
boolean invocationTypeInferred = false;
boolean requireBoxing = false;
boolean allArgumentsAreProper = true;
-
+
// See if we should start in loose inference mode.
TypeBinding [] argumentsCopy = new TypeBinding[arguments.length];
for (int i = 0, length = arguments.length, parametersLength = parameters.length ; i < length; i++) {
@@ -259,8 +259,8 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
argumentsCopy[i] = argument;
}
}
- arguments = argumentsCopy; // either way, this allows the engine to update arguments without harming the callers.
-
+ arguments = argumentsCopy; // either way, this allows the engine to update arguments without harming the callers.
+
LookupEnvironment environment = scope.environment();
InferenceContext18 previousContext = environment.currentInferenceContext;
if (previousContext == null)
@@ -269,7 +269,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
BoundSet provisionalResult = null;
BoundSet result = null;
// ---- 18.5.1 (Applicability): ----
- final boolean isPolyExpression = invocationSite instanceof Expression && ((Expression) invocationSite).isTrulyExpression() &&
+ final boolean isPolyExpression = invocationSite instanceof Expression && ((Expression) invocationSite).isTrulyExpression() &&
((Expression)invocationSite).isPolyExpression(originalMethod);
boolean isDiamond = isPolyExpression && originalMethod.isConstructor();
if (arguments.length == parameters.length) {
@@ -309,7 +309,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
if (solutions != null) {
//{ObjectTeams: validate matching team anchors:
// TODO: could this be integrated with TypeVariableBinding.boundCheck(Substitution, TypeBinding, ReferenceBinding, Scope)
- // which already uses Substitutation.substituteAnchor(ITeamAnchor,int) internally?
+ // which already uses Substitutation.substituteAnchor(ITeamAnchor,int) internally?
for (int i = 0; i < solutions.length; i++) {
if (solutions[i] instanceof DependentTypeBinding
&& typeVariables[i].anchors != null
@@ -345,7 +345,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
((ReferenceExpression) invocationSite).registerInferenceContext(methodSubstitute, infCtx18); // keep context so we can finish later
}
}
- return methodSubstitute;
+ return methodSubstitute;
}
}
return null;
@@ -357,7 +357,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
environment.currentInferenceContext = previousContext;
}
}
-
+
MethodBinding boundCheck18(Scope scope, TypeBinding[] arguments, InvocationSite site) {
Substitution substitution = this;
ParameterizedGenericMethodBinding methodSubstitute = this;
@@ -366,17 +366,17 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
for (int i = 0, length = originalTypeVariables.length; i < length; i++) {
TypeVariableBinding typeVariable = originalTypeVariables[i];
TypeBinding substitute = methodSubstitute.typeArguments[i]; // retain for diagnostics
- /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=375394, To avoid spurious bounds check failures due to circularity in formal bounds,
+ /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=375394, To avoid spurious bounds check failures due to circularity in formal bounds,
we should eliminate only the lingering embedded type variable references after substitution, not alien type variable references
that constitute the inference per se.
- */
+ */
TypeBinding substituteForChecks;
if (substitute instanceof TypeVariableBinding) {
substituteForChecks = substitute;
} else {
substituteForChecks = Scope.substitute(new LingeringTypeVariableEliminator(originalTypeVariables, null, scope), substitute); // while using this for bounds check
}
-
+
//{ObjectTeams: methods with generic declared lifting need to be checked in knowledge of the actual receiver type:
ReferenceBinding actualReceiverRefType = null;
if (site instanceof MessageSend) {
@@ -678,7 +678,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
TypeBinding getErasure18_5_2(TypeBinding type, LookupEnvironment env, boolean substitute) {
// opportunistic interpretation of (JLS 18.5.2):
- // "If unchecked conversion was necessary ..., then ...
+ // "If unchecked conversion was necessary ..., then ...
// the return type and thrown types of the invocation type of m are given by
// the erasure of the return type and thrown types of m's type."
if (substitute)
@@ -797,7 +797,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
are inferred to be the glb of the published bounds - as there can recursion in the formal bounds, the
inferred bounds would no longer be glb.
*/
-
+
this.typeArguments = Scope.substitute(this, this.typeArguments);
// adjust method types to reflect latest inference
@@ -838,7 +838,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=347600 && https://bugs.eclipse.org/bugs/show_bug.cgi?id=242159
Sometimes due to recursion/circularity in formal bounds, even *published bounds* fail bound check. We need to
- break the circularity/self reference in order not to be overly strict during type equivalence checks.
+ break the circularity/self reference in order not to be overly strict during type equivalence checks.
See also http://bugs.sun.com/view_bug.do?bug_id=6932571
*/
private static class LingeringTypeVariableEliminator implements Substitution {
@@ -846,7 +846,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
final private TypeVariableBinding [] variables;
final private TypeBinding [] substitutes; // when null, substitute type variables by unbounded wildcard
final private Scope scope;
-
+
/**
* @param variables
* @param substitutes when null, substitute type variable by unbounded wildcard
@@ -864,7 +864,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
return typeVariable;
}
if (this.substitutes != null) {
- return Scope.substitute(new LingeringTypeVariableEliminator(this.variables, null, this.scope), this.substitutes[typeVariable.rank]);
+ return Scope.substitute(new LingeringTypeVariableEliminator(this.variables, null, this.scope), this.substitutes[typeVariable.rank]);
}
ReferenceBinding genericType = (ReferenceBinding) (typeVariable.declaringElement instanceof ReferenceBinding ? typeVariable.declaringElement : null);
return this.scope.environment().createWildcard(genericType, typeVariable.rank, null, null, Wildcard.UNBOUND, typeVariable.getTypeAnnotations());
@@ -915,7 +915,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
* Check if the given variable was the result of substituting a variable from the original method.
* If so answer the corresponding variable of the original method.
* @param specificVariable a type variable from this method's scope.
- * @return either a type variable from the original method or the input specificVariable
+ * @return either a type variable from the original method or the input specificVariable
*/
public TypeVariableBinding reverseSubstitute(TypeVariableBinding specificVariable) {
int length = this.typeArguments.length;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java
index 76b75348e..67bccb774 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Technical University Berlin - extended API and implementation
@@ -61,7 +61,7 @@ public class ParameterizedMethodBinding extends MethodBinding {
final int length = originalVariables.length;
//{ObjectTeams: along the tsuper-link staticness is ignored as methods can still be overridden:
/* orig:
- final boolean isStatic = originalMethod.isStatic();
+ final boolean isStatic = originalMethod.isStatic();
:giro */
final boolean isStatic = originalMethod.isStatic() && !RoleModel.hasTagBit(parameterizedDeclaringClass, RoleModel.IsViewedAsTSuper);
// SH}
@@ -376,8 +376,8 @@ public class ParameterizedMethodBinding extends MethodBinding {
public MethodBinding original() {
return this.originalMethod.original();
}
-
-
+
+
@Override
public MethodBinding shallowOriginal() {
return this.originalMethod;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
index caa8c0903..72e161e9f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
@@ -97,9 +97,9 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
//{ObjectTeams:
this(type, arguments, null, enclosingType, environment);
}
-
+
public ParameterizedTypeBinding(ReferenceBinding type, TypeBinding[] arguments, ITeamAnchor teamAnchor, ReferenceBinding enclosingType, LookupEnvironment environment){
-// orig:
+// orig:
this.environment = environment;
this.enclosingType = enclosingType; // never unresolved, but if type is an unresolved nested type, enclosingType is null here but set later in swapUnresolved.
if (!type.hasEnclosingInstanceContext() && arguments == null && !(this instanceof RawTypeBinding))
@@ -144,7 +144,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
ReferenceBinding realClass = super.getRealClass();
if (TypeBinding.equalsEquals(realClass, this))
return this; // no further wrapping if this _is_ the class part
- return this.environment.createParameterizedType(realClass, this.arguments, this.enclosingType());
+ return this.environment.createParameterizedType(realClass, this.arguments, this.enclosingType());
}
// FIXME(SH): this method causes regressions (still looks consistent, though):
// @Override
@@ -152,7 +152,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
// ReferenceBinding realType = super.getRealType();
// if (realType == this || isRawType())
// return this; // no further wrapping if this _is_ the ifc part
-// return this.environment.createParameterizedType(realType, this.arguments, realType.enclosingType());
+// return this.environment.createParameterizedType(realType, this.arguments, realType.enclosingType());
// }
/** {@inheritDoc} */
@Override
@@ -210,7 +210,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
ASTNode cud = compilationUnitScope.referenceContext;
long sourceLevel = this.environment.globalOptions.sourceLevel;
final boolean needUniqueCapture = sourceLevel >= ClassFileConstants.JDK1_8;
-
+
for (int i = 0; i < length; i++) {
TypeBinding argument = originalArguments[i];
if (argument.kind() == Binding.WILDCARD_TYPE) { // no capture for intersection types
@@ -219,8 +219,8 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
capturedArguments[i] = wildcard.bound;
else if (needUniqueCapture)
capturedArguments[i] = this.environment.createCapturedWildcard(wildcard, contextType, start, end, cud, compilationUnitScope.nextCaptureID());
- else
- capturedArguments[i] = new CaptureBinding(wildcard, contextType, start, end, cud, compilationUnitScope.nextCaptureID());
+ else
+ capturedArguments[i] = new CaptureBinding(wildcard, contextType, start, end, cud, compilationUnitScope.nextCaptureID());
} else {
capturedArguments[i] = argument;
}
@@ -441,7 +441,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
public char[] constantPoolName() {
return this.type.constantPoolName(); // erasure
}
-
+
@Override
public TypeBinding clone(TypeBinding outerType) {
return new ParameterizedTypeBinding(this.type, this.arguments, (ReferenceBinding) outerType, this.environment);
@@ -457,7 +457,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
public String debugName() {
if (this.hasTypeAnnotations())
return annotatedDebugName();
- StringBuffer nameBuffer = new StringBuffer(10);
+ StringBuffer nameBuffer = new StringBuffer(10);
if (this.type instanceof UnresolvedReferenceBinding) {
nameBuffer.append(this.type);
} else {
@@ -473,7 +473,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
}
return nameBuffer.toString();
}
-
+
@Override
public String annotatedDebugName() {
StringBuffer nameBuffer = new StringBuffer(super.annotatedDebugName());
@@ -521,11 +521,11 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
public ReferenceBinding upwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) {
TypeBinding[] typeVariables = this.arguments;
if (typeVariables == null) return this; // How would that be possible?
-
+
TypeBinding[] a_i_primes = new TypeBinding[typeVariables.length];
for (int i = 0, length = typeVariables.length; i < length; i++) {
TypeBinding a_i = typeVariables[i];
-
+
// If Ai does not mention any restricted type variable, then Ai' = Ai.
int typeVariableKind = a_i.kind();
if (! a_i.mentionsAny(mentionedTypeVariables, -1)) {
@@ -537,7 +537,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
TypeVariableBinding[] g_vars = this.type.typeVariables();
if (g_vars == null || g_vars.length == 0) return this; // Careful - could be a MissingTypeBinding here
TypeBinding b_i = g_vars[i].upperBound();
-
+
// If U is not Object,
// and if either
// * the declared bound of the ith parameter of G, Bi, mentions a type parameter of G, or
@@ -557,10 +557,10 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
a_i_primes[i] = this.environment().createWildcard(genericType(), i, null, null, Wildcard.UNBOUND);
}
}
- } else {
+ } else {
WildcardBinding wildcard = (WildcardBinding)a_i;
if (wildcard.boundKind() == Wildcard.EXTENDS) {
- // If Ai is an upper-bounded wildcard that mentions a restricted type variable,
+ // If Ai is an upper-bounded wildcard that mentions a restricted type variable,
// then let U be the upward projection of the wildcard bound.
TypeBinding u = wildcard.bound().upwardsProjection(scope, mentionedTypeVariables);
// Ai' is a wildcard ? extends U.
@@ -584,18 +584,18 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
public ReferenceBinding downwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) {
TypeBinding[] typeVariables = this.arguments;
if (typeVariables == null) return this; // How would that be possible?
-
+
TypeBinding[] a_i_primes = new TypeBinding[typeVariables.length];
for (int i = 0, length = typeVariables.length; i < length; i++) {
TypeBinding a_i = typeVariables[i];
-
+
// If Ai does not mention any restricted type variable, then Ai' = Ai.
int typeVariableKind = a_i.kind();
if (! a_i.mentionsAny(mentionedTypeVariables, -1)) {
a_i_primes[i] = a_i;
} else if (typeVariableKind != Binding.WILDCARD_TYPE) {
return null;
- } else {
+ } else {
WildcardBinding wildcard = (WildcardBinding)a_i;
if (wildcard.boundKind() == Wildcard.EXTENDS) {
// Ai is an upper-bounded wildcard that mentions a restricted type variable,
@@ -621,7 +621,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
}
return this.environment.createParameterizedType(this.type, a_i_primes, this.enclosingType);
}
-
+
/**
* @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#fieldCount()
*/
@@ -763,7 +763,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
}
return match;
}
-
+
/**
* @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#getExactMethod(char[], TypeBinding[],CompilationUnitScope)
*/
@@ -843,7 +843,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
fields(); // ensure fields have been initialized... must create all at once unlike methods
return ReferenceBinding.binarySearch(fieldName, this.fields);
}
-
+
/**
* @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#getMethods(char[])
*/
@@ -1032,7 +1032,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
return null;
}
// SH}
-
+
@Override
public boolean isBoundParameterizedType() {
return (this.tagBits & TagBits.IsBoundParameterizedType) != 0;
@@ -1052,7 +1052,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
case Binding.PARAMETERIZED_TYPE :
ParameterizedTypeBinding otherParamType = (ParameterizedTypeBinding) otherType;
- if (TypeBinding.notEquals(this.type, otherParamType.type))
+ if (TypeBinding.notEquals(this.type, otherParamType.type))
return false;
if (!isStatic()) { // static member types do not compare their enclosing
ReferenceBinding enclosing = enclosingType();
@@ -1084,11 +1084,11 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
return TypeBinding.equalsEquals(erasure(), otherType.erasure());
}
/* With the hybrid 1.4/1.5+ projects modes, while establishing type equivalence, we need to
- be prepared for a type such as Map appearing in one of three forms: As (a) a ParameterizedTypeBinding
- e.g Map<String, String>, (b) as RawTypeBinding Map#RAW and finally (c) as a BinaryTypeBinding
+ be prepared for a type such as Map appearing in one of three forms: As (a) a ParameterizedTypeBinding
+ e.g Map<String, String>, (b) as RawTypeBinding Map#RAW and finally (c) as a BinaryTypeBinding
When the usage of a type lacks type parameters, whether we land up with the raw form or not depends
on whether the underlying type was "seen to be" a generic type in the particular build environment or
- not. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=328827
+ not. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=328827
*/
if (TypeBinding.equalsEquals(erasure(), otherType)) {
return true;
@@ -1128,7 +1128,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
TypeBinding newArg = oldArg.substituteInferenceVariable(var, substituteType);
if (TypeBinding.notEquals(newArg, oldArg)) {
if (newArgs == null)
- System.arraycopy(this.arguments, 0, newArgs = new TypeBinding[length], 0, length);
+ System.arraycopy(this.arguments, 0, newArgs = new TypeBinding[length], 0, length);
newArgs[i] = newArg;
}
}
@@ -1246,7 +1246,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
if (j < this.methods.length && this.methods[j].original() == originalMethods[i])
newMethods[i] = this.methods[j++];
else
- newMethods[i] = createParameterizedMethod(originalMethods[i]);
+ newMethods[i] = createParameterizedMethod(originalMethods[i]);
}
return this.methods = newMethods;
}
@@ -1412,7 +1412,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
Just as with bounds check below, incremental build will propagate the change and
detect problems in source.
*/
-
+
// // arity check
// TypeVariableBinding[] refTypeVariables = resolvedType.typeVariables();
// if (refTypeVariables == Binding.NO_TYPE_VARIABLES) { // check generic
@@ -1592,7 +1592,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
}
TypeBinding substitute = currentType.arguments[originalVariable.rank];
return originalVariable.combineTypeAnnotations(substitute);
- }
+ }
}
// recurse on enclosing type, as it may hold more substitutions to perform
if (currentType.isStatic()) break;
@@ -1622,7 +1622,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
if (genericSuperclass == null) return null; // e.g. interfaces
this.superclass = (ReferenceBinding) Scope.substitute(this, genericSuperclass);
this.typeBits |= (this.superclass.typeBits & TypeIds.InheritableBits);
- if ((this.typeBits & (TypeIds.BitAutoCloseable|TypeIds.BitCloseable)) != 0) // avoid the side-effects of hasTypeBit()!
+ if ((this.typeBits & (TypeIds.BitAutoCloseable|TypeIds.BitCloseable)) != 0) // avoid the side-effects of hasTypeBit()!
this.typeBits |= applyCloseableClassWhitelists(this.environment.globalOptions);
}
return this.superclass;
@@ -1640,7 +1640,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
if (this.superInterfaces != null) {
for (int i = this.superInterfaces.length; --i >= 0;) {
this.typeBits |= (this.superInterfaces[i].typeBits & TypeIds.InheritableBits);
- if ((this.typeBits & (TypeIds.BitAutoCloseable|TypeIds.BitCloseable)) != 0) // avoid the side-effects of hasTypeBit()!
+ if ((this.typeBits & (TypeIds.BitAutoCloseable|TypeIds.BitCloseable)) != 0) // avoid the side-effects of hasTypeBit()!
this.typeBits |= applyCloseableInterfaceWhitelists();
}
}
@@ -1779,12 +1779,12 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
}
return Binding.NO_TYPE_VARIABLES;
}
-
+
@Override
public TypeBinding[] typeArguments() {
return this.arguments;
}
-
+
@Override
public FieldBinding[] unResolvedFields() {
return this.fields;
@@ -1802,7 +1802,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
TypeVariableBinding [] typeParameters = this.type.typeVariables();
for (int j = 0, length = typeParameters.length; j < length; j++) {
if (!typeParameters[j].boundCheck(declaringType, types[j], scope, null).isOKbyJLS())
- return new MethodBinding[] { new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType) };
+ return new MethodBinding[] { new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType) };
}
return declaringType.getInterfaceAbstractContracts(scope, replaceWildcards, filterDefaultMethods);
}
@@ -1813,7 +1813,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
@Override
public MethodBinding getSingleAbstractMethod(final Scope scope, boolean replaceWildcards) {
return getSingleAbstractMethod(scope, replaceWildcards, -1, -1 /* do not capture */);
- }
+ }
public MethodBinding getSingleAbstractMethod(final Scope scope, boolean replaceWildcards, int start, int end) {
int index = replaceWildcards ? end < 0 ? 0 : 1 : 2; // capturePosition >= 0 IFF replaceWildcard == true
if (this.singleAbstractMethod != null) {
@@ -1828,9 +1828,9 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
MethodBinding theAbstractMethod = genericType.getSingleAbstractMethod(scope, replaceWildcards);
if (theAbstractMethod == null || !theAbstractMethod.isValidBinding())
return this.singleAbstractMethod[index] = theAbstractMethod;
-
+
ParameterizedTypeBinding declaringType = null;
- TypeBinding [] types = this.arguments;
+ TypeBinding [] types = this.arguments;
if (replaceWildcards) {
types = getNonWildcardParameterization(scope);
if (types == null)
@@ -1838,7 +1838,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
} else if (types == null) {
types = NO_TYPES;
}
- if (end >= 0) {
+ if (end >= 0) {
// caller is going to require the sam's parameters to be treated as argument expressions, post substitution capture will lose identity, where substitution results in fan out
// capture first and then substitute.
for (int i = 0, length = types.length; i < length; i++) {
@@ -1849,7 +1849,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
TypeVariableBinding [] typeParameters = genericType.typeVariables();
for (int i = 0, length = typeParameters.length; i < length; i++) {
if (!typeParameters[i].boundCheck(declaringType, types[i], scope, null).isOKbyJLS())
- return this.singleAbstractMethod[index] = new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType);
+ return this.singleAbstractMethod[index] = new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType);
}
ReferenceBinding substitutedDeclaringType = (ReferenceBinding) declaringType.findSuperTypeOriginatingFrom(theAbstractMethod.declaringClass);
MethodBinding [] choices = substitutedDeclaringType.getMethods(theAbstractMethod.selector);
@@ -1965,7 +1965,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
} else {
newArguments[i] = arg.maybeWrapRoleType(typedNode, updater);
}
-
+
// must avoid nulls in arguments (no longer observed in otjld-tests):
if (newArguments[i] == null) {
@@ -1980,7 +1980,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
return this;
// yes, we have a modification
- return this.environment.createParameterizedType(this.type, newArguments, this.enclosingType());
+ return this.environment.createParameterizedType(this.type, newArguments, this.enclosingType());
}
// SH}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolyParameterizedGenericMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolyParameterizedGenericMethodBinding.java
index 238f2f542..a1ddaa8d6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolyParameterizedGenericMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolyParameterizedGenericMethodBinding.java
@@ -15,12 +15,12 @@ package org.eclipse.jdt.internal.compiler.lookup;
public class PolyParameterizedGenericMethodBinding extends ParameterizedGenericMethodBinding { // confused citizen.
- private ParameterizedGenericMethodBinding wrappedBinding;
+ private ParameterizedGenericMethodBinding wrappedBinding;
public PolyParameterizedGenericMethodBinding(ParameterizedGenericMethodBinding applicableMethod) {
super(applicableMethod.originalMethod, applicableMethod.typeArguments, applicableMethod.environment, applicableMethod.inferredWithUncheckedConversion, false, applicableMethod.targetType);
this.wrappedBinding = applicableMethod;
}
-
+
@Override
public boolean equals(Object other) {
if (other instanceof PolyParameterizedGenericMethodBinding) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolyTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolyTypeBinding.java
index 5736e99ae..dfe3acec7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolyTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolyTypeBinding.java
@@ -23,11 +23,11 @@ public class PolyTypeBinding extends TypeBinding {
Expression expression;
boolean vanillaCompatibilty = true;
-
+
public PolyTypeBinding(Expression expression) {
this.expression = expression;
}
-
+
@Override
public char[] constantPoolName() {
throw new UnsupportedOperationException(); // should never reach code generation
@@ -42,7 +42,7 @@ public class PolyTypeBinding extends TypeBinding {
public boolean isCompatibleWith(TypeBinding left, Scope scope) {
return this.vanillaCompatibilty ? this.expression.isCompatibleWith(left, scope) : this.expression.isBoxingCompatibleWith(left, scope);
}
-
+
@Override
public boolean isPotentiallyCompatibleWith(TypeBinding targetType, Scope scope) {
return this.expression.isPotentiallyCompatibleWith(targetType, scope);
@@ -52,7 +52,7 @@ public class PolyTypeBinding extends TypeBinding {
public boolean isPolyType() {
return true;
}
-
+
@Override
public boolean isFunctionalType() {
return this.expression.isFunctionalType();
@@ -83,13 +83,13 @@ public class PolyTypeBinding extends TypeBinding {
public boolean sIsMoreSpecific(TypeBinding s, TypeBinding t, Scope scope) {
return this.expression.sIsMoreSpecific(s, t, scope);
}
-
+
@Override
public String toString() {
StringBuffer buffer = new StringBuffer("PolyTypeBinding for: "); //$NON-NLS-1$
return this.expression.printExpression(0, buffer).toString();
}
-
+
@Override
public int kind() {
return Binding.POLY_TYPE;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolymorphicMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolymorphicMethodBinding.java
index 578e13839..d8c7e10dc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolymorphicMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolymorphicMethodBinding.java
@@ -31,7 +31,7 @@ public class PolymorphicMethodBinding extends MethodBinding {
this.polymorphicMethod = polymorphicMethod;
this.tagBits = polymorphicMethod.tagBits;
}
-
+
public PolymorphicMethodBinding(MethodBinding polymorphicMethod, TypeBinding returnType, TypeBinding[] parameterTypes) {
super(
polymorphicMethod.modifiers,
@@ -48,7 +48,7 @@ public class PolymorphicMethodBinding extends MethodBinding {
public MethodBinding original() {
return this.polymorphicMethod;
}
-
+
@Override
public boolean isPolymorphic() {
return true;
@@ -78,7 +78,7 @@ public class PolymorphicMethodBinding extends MethodBinding {
// all arguments match
return true;
}
-
+
/*
* Even if polymorphic methods are varargs method, we don't want them to be treated as varargs method
*/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
index f06959247..d77b06b13 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
@@ -92,7 +92,7 @@ public class RawTypeBinding extends ParameterizedTypeBinding {
sig.getChars(0, sigLength, uniqueKey, 0);
return uniqueKey;
}
-
+
@Override
public TypeBinding clone(TypeBinding outerType) {
return new RawTypeBinding(this.actualType(), (ReferenceBinding) outerType, this.environment);
@@ -239,17 +239,17 @@ public class RawTypeBinding extends ParameterizedTypeBinding {
}
this.arguments = typeArguments;
}
-
+
@Override
public ParameterizedTypeBinding capture(Scope scope, int start, int end) {
return this;
}
- @Override
+ @Override
public TypeBinding uncapture(Scope scope) {
return this;
}
-
+
@Override
//{ObjectTeams:
protected
@@ -272,7 +272,7 @@ public class RawTypeBinding extends ParameterizedTypeBinding {
MethodBinding theAbstractMethod = genericType.getSingleAbstractMethod(scope, replaceWildcards);
if (theAbstractMethod == null || !theAbstractMethod.isValidBinding())
return this.singleAbstractMethod[index] = theAbstractMethod;
-
+
ReferenceBinding declaringType = (ReferenceBinding) scope.environment().convertToRawType(genericType, true);
declaringType = (ReferenceBinding) declaringType.findSuperTypeOriginatingFrom(theAbstractMethod.declaringClass);
MethodBinding [] choices = declaringType.getMethods(theAbstractMethod.selector);
@@ -315,7 +315,7 @@ public class RawTypeBinding extends ParameterizedTypeBinding {
}
return shortReadableName;
}
-
+
//{ObjectTeams:
@Override
protected
@@ -333,11 +333,11 @@ public class RawTypeBinding extends ParameterizedTypeBinding {
public ReferenceBinding downwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) {
return this;
}
-
+
@Override
public ReferenceBinding enclosingType() {
// ParameterizedTypeBinding earlier always had a resolved enclosed type, but now it does on-demand resolving.
- // Behaviour for RawTypeBinding should be unchanged.
+ // Behaviour for RawTypeBinding should be unchanged.
return this.enclosingType;
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReductionResult.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReductionResult.java
index 1c157dba6..c99f2f85e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReductionResult.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReductionResult.java
@@ -26,14 +26,14 @@ public abstract class ReductionResult {
@Override
public String toString() { return "TRUE"; } //$NON-NLS-1$
};
- protected static final ConstraintTypeFormula FALSE = new ConstraintTypeFormula() {
- /* empty body just to make abstract class instantiable */
+ protected static final ConstraintTypeFormula FALSE = new ConstraintTypeFormula() {
+ /* empty body just to make abstract class instantiable */
@Override
public Object reduce(InferenceContext18 context) { return this; }
@Override
public String toString() { return "FALSE"; } //$NON-NLS-1$
};
-
+
// Relation kinds, mimic an enum:
protected static final int COMPATIBLE = 1;
protected static final int SUBTYPE = 2;
@@ -43,7 +43,7 @@ public abstract class ReductionResult {
protected static final int CAPTURE = 6;
static final int EXCEPTIONS_CONTAINED = 7;
protected static final int POTENTIALLY_COMPATIBLE = 8;
-
+
protected TypeBinding right; // note that the LHS differs between sub-classes.
protected int relation;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
index 60e58c48f..e09e727b3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
@@ -543,7 +543,7 @@ public boolean canBeSeenBy(ReferenceBinding receiverType, ReferenceBinding invoc
do {
if (currentType.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
if (TypeBinding.equalsEquals(originalDeclaringClass, currentType.erasure().original())) return true;
- } else {
+ } else {
if (TypeBinding.equalsEquals(originalDeclaringClass, currentType.original())) return true;
}
PackageBinding currentPackage = currentType.fPackage;
@@ -642,7 +642,7 @@ public char[] computeGenericTypeSignature(TypeVariableBinding[] typeVariables) {
}
public void computeId() {
- // note that more (configurable) ids are assigned from PackageBinding#checkIfNullAnnotationType()
+ // note that more (configurable) ids are assigned from PackageBinding#checkIfNullAnnotationType()
// try to avoid multiple checks against a package/type name
switch (this.compoundName.length) {
@@ -671,7 +671,7 @@ public void computeId() {
case 3: // only one type in this group, yet:
if (CharOperation.equals(TypeConstants.ORG_JUNIT_ASSERT, this.compoundName))
this.id = TypeIds.T_OrgJunitAssert;
- return;
+ return;
case 4:
if (!CharOperation.equals(TypeConstants.JAVA, packageName))
return;
@@ -691,7 +691,7 @@ public void computeId() {
default: return;
}
// ... at this point we know it's java.*.*
-
+
packageName = this.compoundName[1];
if (packageName.length == 0) return; // just to be safe
char[] typeName = this.compoundName[2];
@@ -704,7 +704,7 @@ public void computeId() {
switch (typeName[0]) {
case 'C' :
if (CharOperation.equals(typeName, TypeConstants.JAVA_IO_CLOSEABLE[2]))
- this.typeBits |= TypeIds.BitCloseable; // don't assign id, only typeBit (for analysis of resource leaks)
+ this.typeBits |= TypeIds.BitCloseable; // don't assign id, only typeBit (for analysis of resource leaks)
return;
case 'E' :
if (CharOperation.equals(typeName, TypeConstants.JAVA_IO_EXTERNALIZABLE[2]))
@@ -736,7 +736,7 @@ public void computeId() {
if (CharOperation.equals(typeName, TypeConstants.JAVA_UTIL_COLLECTION[2])) {
this.id = TypeIds.T_JavaUtilCollection;
this.typeBits |= TypeIds.BitCollection;
- }
+ }
return;
case 'I' :
if (CharOperation.equals(typeName, TypeConstants.JAVA_UTIL_ITERATOR[2]))
@@ -746,7 +746,7 @@ public void computeId() {
if (CharOperation.equals(typeName, TypeConstants.JAVA_UTIL_LIST[2])) {
this.id = TypeIds.T_JavaUtilList;
this.typeBits |= TypeIds.BitList;
- }
+ }
return;
case 'M' :
if (CharOperation.equals(typeName, TypeConstants.JAVA_UTIL_MAP[2])) {
@@ -772,7 +772,7 @@ public void computeId() {
case 13 :
if (CharOperation.equals(typeName, TypeConstants.JAVA_LANG_AUTOCLOSEABLE[2])) {
this.id = TypeIds.T_JavaLangAutoCloseable;
- this.typeBits |= TypeIds.BitAutoCloseable;
+ this.typeBits |= TypeIds.BitAutoCloseable;
}
return;
case 14:
@@ -1026,13 +1026,13 @@ public void computeId() {
return;
packageName = this.compoundName[1];
if (packageName.length == 0) return; // just to be safe
-
+
if (CharOperation.equals(TypeConstants.LANG, packageName)) {
packageName = this.compoundName[2];
if (packageName.length == 0) return; // just to be safe
switch (packageName[0]) {
case 'i' :
- if (CharOperation.equals(packageName, TypeConstants.INVOKE)) {
+ if (CharOperation.equals(packageName, TypeConstants.INVOKE)) {
typeName = this.compoundName[3];
if (typeName.length == 0) return; // just to be safe
switch (typeName[0]) {
@@ -1063,7 +1063,7 @@ public void computeId() {
if (packageName.length == 0) return; // just to be safe
switch (packageName[0]) {
case 'c' :
- if (CharOperation.equals(packageName, TypeConstants.CORE)) {
+ if (CharOperation.equals(packageName, TypeConstants.CORE)) {
typeName = this.compoundName[3];
if (typeName.length == 0) return; // just to be safe
switch (typeName[0]) {
@@ -1321,7 +1321,7 @@ public ReferenceBinding getMemberTypeRecurse(char[] typeName) {
/**
* Search the given sourceName in the list of sorted member types.
- *
+ *
* Neither the array of sortedMemberTypes nor the given sourceName may be null.
*/
static int binarySearch(char[] sourceName, ReferenceBinding[] sortedMemberTypes) {
@@ -1742,7 +1742,7 @@ public ReferenceBinding getRealClass() {
}
return this;
}
-/**
+/**
* Return a version of other that has the same type arguments as this.
*/
public ReferenceBinding transferTypeArguments(ReferenceBinding other) {
@@ -1798,8 +1798,8 @@ public boolean isCompatibleWith(TypeBinding otherType, boolean useObjectShortcut
this.compatibleCache.put(otherType, Boolean.TRUE);
return true;
}
- if (captureScope == null
- && this instanceof TypeVariableBinding
+ if (captureScope == null
+ && this instanceof TypeVariableBinding
&& ((TypeVariableBinding)this).firstBound instanceof ParameterizedTypeBinding) {
// see https://bugs.eclipse.org/395002#c9
// in this case a subsequent check with captureScope != null may actually get
@@ -1876,7 +1876,7 @@ private boolean isCompatibleWith0(TypeBinding otherType, boolean useObjectShortc
case Binding.GENERIC_TYPE :
case Binding.PARAMETERIZED_TYPE :
case Binding.RAW_TYPE :
- if (TypeBinding.equalsEquals(erasure(), otherType.erasure()))
+ if (TypeBinding.equalsEquals(erasure(), otherType.erasure()))
return false; // should have passed equivalence check
// above if same erasure
}
@@ -1932,11 +1932,11 @@ public boolean isSubtypeOf(TypeBinding other, boolean simulatingBugJDK8026527) {
return false;
if (TypeBinding.equalsEquals(candidate, other))
return true;
-
+
// T<Ai...> <: T#RAW:
if (other.isRawType() && TypeBinding.equalsEquals(candidate.erasure(), other.erasure()))
return true;
-
+
TypeBinding[] sis = other.typeArguments();
TypeBinding[] tis = candidate.typeArguments();
if (tis == null || sis == null)
@@ -2004,7 +2004,7 @@ public boolean isHierarchyBeingConnected() {
return (this.tagBits & TagBits.EndHierarchyCheck) == 0 && (this.tagBits & TagBits.BeginHierarchyCheck) != 0;
}
/**
- * Returns true if the type hierarchy is being connected "actively" i.e not paused momentatrily,
+ * Returns true if the type hierarchy is being connected "actively" i.e not paused momentatrily,
* while resolving type arguments. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=294057
*/
public boolean isHierarchyBeingActivelyConnected() {
@@ -2392,7 +2392,7 @@ public char[] shortReadableName(boolean showGenerics) /*Object*/ {
if ((typeVars = typeVariables()) != Binding.NO_TYPE_VARIABLES) {
:giro */
if ((typeVars = typeVariables()) != Binding.NO_TYPE_VARIABLES || valueParams != Binding.NO_SYNTH_ARGUMENTS) {
-// orig:
+// orig:
StringBuffer nameBuffer = new StringBuffer(10);
nameBuffer.append(shortReadableName).append('<');
// :giro
@@ -2457,7 +2457,7 @@ public char[] internalName() {
* Perform an upwards type projection as per JLS 4.10.5
* @param scope Relevant scope for evaluating type projection
* @param mentionedTypeVariables Filter for mentioned type variabled
- * @returns Upwards type projection of 'this', or null if downwards projection is undefined
+ * @returns Upwards type projection of 'this', or null if downwards projection is undefined
*/
@Override
public ReferenceBinding upwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) {
@@ -2468,7 +2468,7 @@ public ReferenceBinding upwardsProjection(Scope scope, TypeBinding[] mentionedTy
* Perform a downwards type projection as per JLS 4.10.5
* @param scope Relevant scope for evaluating type projection
* @param mentionedTypeVariables Filter for mentioned type variabled
- * @returns Downwards type projection of 'this', or null if downwards projection is undefined
+ * @returns Downwards type projection of 'this', or null if downwards projection is undefined
*/
@Override
public ReferenceBinding downwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) {
@@ -2618,7 +2618,7 @@ protected int applyCloseableInterfaceWhitelists() {
return 0;
}
-//{ObjectTeams: support for checking substitution of a value parameter
+//{ObjectTeams: support for checking substitution of a value parameter
public VariableBinding valueParamSynthArgAt(int typeParamPosition) {
SyntheticArgumentBinding[] args = valueParamSynthArgs();
if (args.length > typeParamPosition)
@@ -2628,16 +2628,16 @@ public VariableBinding valueParamSynthArgAt(int typeParamPosition) {
// SH}
protected MethodBinding [] getInterfaceAbstractContracts(Scope scope, boolean replaceWildcards, boolean filterDefaultMethods) throws InvalidInputException {
-
+
if (!isInterface() || !isValidBinding()) {
throw new InvalidInputException("Not a functional interface"); //$NON-NLS-1$
}
-
+
MethodBinding [] methods = methods();
MethodBinding [] contracts = new MethodBinding[0];
int contractsCount = 0;
int contractsLength = 0;
-
+
ReferenceBinding [] superInterfaces = superInterfaces();
for (int i = 0, length = superInterfaces.length; i < length; i++) {
// filterDefaultMethods=false => keep default methods needed to filter out any abstract methods they may override:
@@ -2654,9 +2654,9 @@ protected MethodBinding [] getInterfaceAbstractContracts(Scope scope, boolean re
LookupEnvironment environment = scope.environment();
for (int i = 0, length = methods == null ? 0 : methods.length; i < length; i++) {
final MethodBinding method = methods[i];
- if (method == null || method.isStatic() || method.redeclaresPublicObjectMethod(scope) || method.isPrivate())
+ if (method == null || method.isStatic() || method.redeclaresPublicObjectMethod(scope) || method.isPrivate())
continue;
- if (!method.isValidBinding())
+ if (!method.isValidBinding())
throw new InvalidInputException("Not a functional interface"); //$NON-NLS-1$
for (int j = 0; j < contractsCount;) {
if ( contracts[j] != null && MethodVerifier.doesMethodOverride(method, contracts[j], environment)) {
@@ -2693,7 +2693,7 @@ protected MethodBinding [] getInterfaceAbstractContracts(Scope scope, boolean re
// abstract method from one super type overridden by other super interface ==> contracts[j] = null;
if (j < contractsCount) {
System.arraycopy(contracts, j+1, contracts, j, contractsCount - j);
- }
+ }
j--;
if (j < i)
i--;
@@ -2705,8 +2705,8 @@ protected MethodBinding [] getInterfaceAbstractContracts(Scope scope, boolean re
// remove default method after it has eliminated any matching abstract methods from contracts
if (i < contractsCount) {
System.arraycopy(contracts, i+1, contracts, i, contractsCount - i);
- }
- i--;
+ }
+ i--;
}
}
if (contractsCount < contractsLength) {
@@ -2716,7 +2716,7 @@ protected MethodBinding [] getInterfaceAbstractContracts(Scope scope, boolean re
}
@Override
public MethodBinding getSingleAbstractMethod(Scope scope, boolean replaceWildcards) {
-
+
int index = replaceWildcards ? 0 : 1;
if (this.singleAbstractMethod != null) {
if (this.singleAbstractMethod[index] != null)
@@ -2751,12 +2751,12 @@ public MethodBinding getSingleAbstractMethod(Scope scope, boolean replaceWildcar
}
if (methods.length == 1)
return this.singleAbstractMethod[index] = methods[0];
-
+
final LookupEnvironment environment = scope.environment();
boolean genericMethodSeen = false;
int length = methods.length;
boolean analyseNullAnnotations = environment.globalOptions.isAnnotationBasedNullAnalysisEnabled;
-
+
next:for (int i = length - 1; i >= 0; --i) {
MethodBinding method = methods[i], otherMethod = null;
if (method.typeVariables != Binding.NO_TYPE_VARIABLES)
@@ -2768,13 +2768,13 @@ public MethodBinding getSingleAbstractMethod(Scope scope, boolean replaceWildcar
otherMethod = methods[j];
if (otherMethod.typeVariables != Binding.NO_TYPE_VARIABLES)
genericMethodSeen = true;
-
+
if (genericMethodSeen) { // adapt type parameters.
otherMethod = MethodVerifier.computeSubstituteMethod(otherMethod, method, environment);
if (otherMethod == null)
continue next;
}
- if (!MethodVerifier.isSubstituteParameterSubsignature(method, otherMethod, environment) || !MethodVerifier.areReturnTypesCompatible(method, otherMethod, environment))
+ if (!MethodVerifier.isSubstituteParameterSubsignature(method, otherMethod, environment) || !MethodVerifier.areReturnTypesCompatible(method, otherMethod, environment))
continue next;
if (analyseNullAnnotations) {
returnType = NullAnnotationMatching.strongerType(returnType, otherMethod.returnType, environment);
@@ -2788,7 +2788,7 @@ public MethodBinding getSingleAbstractMethod(Scope scope, boolean replaceWildcar
boolean shouldEraseThrows = theAbstractMethod.typeVariables == Binding.NO_TYPE_VARIABLES && genericMethodSeen;
boolean shouldAdaptThrows = theAbstractMethod.typeVariables != Binding.NO_TYPE_VARIABLES;
final int typeVariableLength = theAbstractMethod.typeVariables.length;
-
+
none:for (i = 0; i < length; i++) {
method = methods[i];
ReferenceBinding[] methodThrownExceptions = method.thrownExceptions;
@@ -2813,10 +2813,10 @@ public MethodBinding getSingleAbstractMethod(Scope scope, boolean replaceWildcar
int otherMethodExceptionsLength = otherMethodThrownExceptions == null ? 0 : otherMethodThrownExceptions.length;
if (otherMethodExceptionsLength == 0) break none;
if (shouldAdaptThrows && otherMethod != theAbstractMethod) {
- System.arraycopy(otherMethodThrownExceptions,
- 0,
- otherMethodThrownExceptions = new ReferenceBinding[otherMethodExceptionsLength],
- 0,
+ System.arraycopy(otherMethodThrownExceptions,
+ 0,
+ otherMethodThrownExceptions = new ReferenceBinding[otherMethodExceptionsLength],
+ 0,
otherMethodExceptionsLength);
for (int tv = 0; tv < typeVariableLength; tv++) {
if (otherMethodThrownExceptions[tv] instanceof TypeVariableBinding) {
@@ -2843,11 +2843,11 @@ public MethodBinding getSingleAbstractMethod(Scope scope, boolean replaceWildcar
if (exceptionsCount != exceptionsLength) {
System.arraycopy(exceptions, 0, exceptions = new ReferenceBinding[exceptionsCount], 0, exceptionsCount);
}
- this.singleAbstractMethod[index] = new MethodBinding(theAbstractMethod.modifiers | ClassFileConstants.AccSynthetic,
- theAbstractMethod.selector,
- returnType,
- parameters,
- exceptions,
+ this.singleAbstractMethod[index] = new MethodBinding(theAbstractMethod.modifiers | ClassFileConstants.AccSynthetic,
+ theAbstractMethod.selector,
+ returnType,
+ parameters,
+ exceptions,
theAbstractMethod.declaringClass);
this.singleAbstractMethod[index].typeVariables = theAbstractMethod.typeVariables;
return this.singleAbstractMethod[index];
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
index 5ae6e7ef4..c1556aca0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
@@ -43,7 +43,7 @@
* Bug 427628 - [1.8] regression : The method * is ambiguous for the type *
* Bug 428352 - [1.8][compiler] Resolution errors don't always surface
* Bug 428366 - [1.8] [compiler] The method valueAt(ObservableList<Object>, int) is ambiguous for the type Bindings
- * Bug 424728 - [1.8][null] Unexpected error: The nullness annotation 'XXXX' is not applicable at this location
+ * Bug 424728 - [1.8][null] Unexpected error: The nullness annotation 'XXXX' is not applicable at this location
* Bug 428811 - [1.8][compiler] Type witness unnecessarily required
* Bug 429424 - [1.8][inference] Problem inferring type of method's parameter
* Bug 429958 - [1.8][null] evaluate new DefaultLocation attribute of @NonNullByDefault
@@ -145,7 +145,7 @@ public abstract class Scope {
public int kind() {
throw new IllegalStateException();
}
-
+
@Override
public char[] readableName() {
throw new IllegalStateException();
@@ -174,7 +174,7 @@ public abstract class Scope {
public int kind;
public Scope parent;
-
+
private static class NullDefaultRange {
final int start, end;
int value;
@@ -349,7 +349,7 @@ public abstract class Scope {
}
}
return originalType;
- }
+ }
public static TypeBinding getBaseType(char[] name) {
// list should be optimized (with most often used first)
@@ -495,7 +495,7 @@ public abstract class Scope {
continue; // assume we already have an error here
// Skip the following check if inference variables or CaptureBinding18 are involved,
// hopefully during inference a contradictory glb will simply not produce a solution
- // (should essentially be detected beforehand in CaptureBinding18.setUpperBounds()):
+ // (should essentially be detected beforehand in CaptureBinding18.setUpperBounds()):
if (!narrowType.isProperType(false) || !wideType.isProperType(false))
continue;
int numTypeArgs = wideType.arguments.length;
@@ -507,9 +507,9 @@ public abstract class Scope {
ReferenceBinding wideOriginal = (ReferenceBinding) wideType.original();
TypeBinding substitutedWideType =
environment.createParameterizedType(wideOriginal, bounds, wideOriginal.enclosingType());
- // if the narrow type is compatible with the substituted wide type, we keep silent,
+ // if the narrow type is compatible with the substituted wide type, we keep silent,
// substituting type variables with proper types can still satisfy all constraints,
- // otherwise ...
+ // otherwise ...
if (!narrowType.isCompatibleWith(substitutedWideType, scope)) {
// ... parameterized types are incompatible due to incompatible type arguments => unsatisfiable
return null;
@@ -576,9 +576,9 @@ public abstract class Scope {
* In raw mode (see {@link Substitution#isRawSubstitution()}),
* all parameterized types are converted to raw types.
* Cf. 4.8: "The type of a constructor (8.8), instance method (8.4, 9.4),
- * or non-static field (8.3) M of a raw type C that is not inherited from its
+ * or non-static field (8.3) M of a raw type C that is not inherited from its
* superclasses or superinterfaces is the raw type that corresponds to the erasure
- * of its type in the generic declaration corresponding to C."
+ * of its type in the generic declaration corresponding to C."
*/
public static TypeBinding substitute(Substitution substitution, TypeBinding originalType) {
return defaultSubstitutor.substitute(substitution, originalType);
@@ -592,7 +592,7 @@ public abstract class Scope {
return defaultSubstitutor.substitute(substitution, originalTypes);
}
- /** Bridge to non-static implementation in {@link Substitutor}, to make methods overridable. */
+ /** Bridge to non-static implementation in {@link Substitutor}, to make methods overridable. */
private static Substitutor defaultSubstitutor = new Substitutor();
public static class Substitutor {
/**
@@ -626,9 +626,9 @@ public abstract class Scope {
* In raw mode (see {@link Substitution#isRawSubstitution()}),
* all parameterized types are converted to raw types.
* Cf. 4.8: "The type of a constructor (8.8), instance method (8.4, 9.4),
- * or non-static field (8.3) M of a raw type C that is not inherited from its
+ * or non-static field (8.3) M of a raw type C that is not inherited from its
* superclasses or superinterfaces is the raw type that corresponds to the erasure
- * of its type in the generic declaration corresponding to C."
+ * of its type in the generic declaration corresponding to C."
*/
public TypeBinding substitute(Substitution substitution, TypeBinding originalType) {
if (originalType == null) return null;
@@ -638,10 +638,10 @@ public abstract class Scope {
// SH}
switch (originalType.kind()) {
-
+
case Binding.TYPE_PARAMETER:
return substitution.substitute((TypeVariableBinding) originalType);
-
+
case Binding.PARAMETERIZED_TYPE:
ParameterizedTypeBinding originalParameterizedType = (ParameterizedTypeBinding) originalType;
ReferenceBinding originalEnclosing = originalType.enclosingType();
@@ -672,7 +672,7 @@ public abstract class Scope {
originalParameterizedType.genericType(), substitutedArguments, substitutedEnclosing, originalType.getTypeAnnotations());
}
break;
-
+
case Binding.ARRAY_TYPE:
ArrayBinding originalArrayType = (ArrayBinding) originalType;
TypeBinding originalLeafComponentType = originalArrayType.leafComponentType;
@@ -681,7 +681,7 @@ public abstract class Scope {
return originalArrayType.environment.createArrayType(substitute.leafComponentType(), substitute.dimensions() + originalType.dimensions(), originalType.getTypeAnnotations());
}
break;
-
+
case Binding.WILDCARD_TYPE:
case Binding.INTERSECTION_TYPE:
WildcardBinding wildcard = (WildcardBinding) originalType;
@@ -711,7 +711,7 @@ public abstract class Scope {
}
return wildcard.environment.createWildcard(wildcard.genericType, wildcard.rank, substitutedBound, substitutedOtherBounds, wildcard.boundKind, wildcard.getTypeAnnotations());
}
- }
+ }
break;
case Binding.INTERSECTION_TYPE18:
@@ -732,7 +732,7 @@ public abstract class Scope {
if (isMemberTypeOfRaw(originalType, substitutedEnclosing))
return substitution.environment().createRawType(originalReferenceType, substitutedEnclosing, originalType.getTypeAnnotations());
}
-
+
// treat as if parameterized with its type variables (non generic type gets 'null' arguments)
if (substitutedEnclosing != originalEnclosing && originalReferenceType.hasEnclosingInstanceContext()) { //$IDENTITY-COMPARISON$
return substitution.isRawSubstitution()
@@ -745,12 +745,12 @@ public abstract class Scope {
originalEnclosing = originalType.enclosingType();
substitutedEnclosing = originalEnclosing;
if (originalEnclosing != null) {
- substitutedEnclosing = (ReferenceBinding) (originalType.isStatic() ? substitution.environment().convertToRawType(originalEnclosing, true) :
+ substitutedEnclosing = (ReferenceBinding) (originalType.isStatic() ? substitution.environment().convertToRawType(originalEnclosing, true) :
(ReferenceBinding) substitute(substitution, originalEnclosing));
if (isMemberTypeOfRaw(originalType, substitutedEnclosing))
return substitution.environment().createRawType(originalReferenceType, substitutedEnclosing, originalType.getTypeAnnotations());
}
-
+
if (substitution.isRawSubstitution()) {
return substitution.environment().createRawType(originalReferenceType, substitutedEnclosing, originalType.getTypeAnnotations());
}
@@ -761,20 +761,20 @@ public abstract class Scope {
}
return originalType;
}
-
+
private static boolean isMemberTypeOfRaw(TypeBinding originalType, ReferenceBinding substitutedEnclosing) {
// 4.8:
// "a raw type is defined to be one of:
// ...
- // * A non-static member type of a raw type R that is not
+ // * A non-static member type of a raw type R that is not
// inherited from a superclass or superinterface of R."
-
+
// Due to staticness, e.g., Map.Entry<String,Object> is *not* considered as a raw type
-
- return (substitutedEnclosing != null && substitutedEnclosing.isRawType())
+
+ return (substitutedEnclosing != null && substitutedEnclosing.isRawType())
&& ((originalType instanceof ReferenceBinding) && !((ReferenceBinding)originalType).isStatic());
}
-
+
/**
* Returns an array of types, where original types got substituted given a substitution.
* Only allocate an array if anything is different.
@@ -832,7 +832,7 @@ public abstract class Scope {
public boolean isLambdaScope() {
return false;
}
-
+
public boolean isLambdaSubscope() {
for (Scope scope = this; scope != null; scope = scope.parent) {
switch (scope.kind) {
@@ -863,11 +863,11 @@ public abstract class Scope {
* Internal use only
* Given a method, returns null if arguments cannot be converted to parameters.
* Will answer a substituted method in case the method was generic and type inference got triggered;
- * in case the method was originally compatible, then simply answer it back.
+ * in case the method was originally compatible, then simply answer it back.
*/
protected final MethodBinding computeCompatibleMethod(MethodBinding method, TypeBinding[] arguments, InvocationSite invocationSite) {
return computeCompatibleMethod(method, arguments, invocationSite, false);
- }
+ }
/**
* Internal use only
* Given a method, returns null if arguments cannot be converted to parameters.
@@ -946,7 +946,7 @@ public abstract class Scope {
}
return method;
}
- // if method is generic and type arguments have been supplied, only then answer a problem
+ // if method is generic and type arguments have been supplied, only then answer a problem
// of ParameterizedMethodTypeMismatch, else a non-generic method was invoked using type arguments
// in which case this problem category will be bogus
if (genericTypeArguments != null && typeVariables != Binding.NO_TYPE_VARIABLES)
@@ -1155,7 +1155,7 @@ public abstract class Scope {
//{ObjectTeams: TypeValueParameter has no 'binding':
if (!(typeParameters[i] instanceof TypeValueParameter))
// SH}
- typeParameters[i].binding.updateTagBits(); // <T extends List<U>, @NonNull U> --> tag T as having null type annotations
+ typeParameters[i].binding.updateTagBits(); // <T extends List<U>, @NonNull U> --> tag T as having null type annotations
return noProblems;
}
@@ -1262,13 +1262,13 @@ public abstract class Scope {
}
return null; // may answer null if no method around
}
-
+
public final MethodScope enclosingLambdaScope() {
Scope scope = this;
while ((scope = scope.parent) != null) {
if (scope instanceof MethodScope) {
MethodScope methodScope = (MethodScope) scope;
- if (methodScope.referenceContext instanceof LambdaExpression)
+ if (methodScope.referenceContext instanceof LambdaExpression)
return methodScope;
}
}
@@ -1325,9 +1325,9 @@ public abstract class Scope {
return ((CompilationUnitScope) unitScope).environment;
}
- /* Abstract method lookup (since maybe missing default abstract methods). "Default abstract methods" are methods that used to be emitted into
+ /* Abstract method lookup (since maybe missing default abstract methods). "Default abstract methods" are methods that used to be emitted into
abstract classes for unimplemented interface methods at JDK 1.1 time frame. See SourceTypeBinding.addDefaultAbstractMethods()
- See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=174588 for details of problem addressed here. Problem was in the method call in the
+ See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=174588 for details of problem addressed here. Problem was in the method call in the
*abstract* class. Unless the interface methods are looked up, we will emit code that results in infinite recursion.
*/
protected MethodBinding findDefaultAbstractMethod(
@@ -1347,13 +1347,13 @@ public abstract class Scope {
findMethodInSuperInterfaces(currentType, selector, found, visitedTypes, invocationSite);
currentType = currentType.superclass();
}
-
+
int candidatesCount = concreteMatches == null ? 0 : concreteMatches.length;
int foundSize = found.size;
MethodBinding[] candidates = new MethodBinding[foundSize - startFoundSize + candidatesCount];
if (concreteMatches != null)
System.arraycopy(concreteMatches, 0, candidates, 0, candidatesCount);
-
+
MethodBinding problemMethod = null;
if (foundSize > startFoundSize) {
// argument type compatibility check
@@ -1798,14 +1798,14 @@ public abstract class Scope {
}
}
return method;
- }
-
+ }
+
public MethodBinding findMethod0(ReferenceBinding receiverType, char[] selector, TypeBinding[] argumentTypes, InvocationSite invocationSite, boolean inStaticContext) {
//{ObjectTeams: access to private method from "within" (need class part)?
if ( RoleTypeBinding.isRoleWithoutExplicitAnchor(receiverType)
|| (receiverType.isRole() && invocationSite.isTypeAccess()))
{
- ReferenceBinding enclosingType = this.enclosingSourceType();
+ ReferenceBinding enclosingType = this.enclosingSourceType();
if (isMethodMappingWrapper()) {
// retrieve the actual enclosing type of the mapping declaration:
for (ReferenceBinding declaringRole : MethodModel.getRoleHandledByThisWrapperMethod(methodScope().referenceMethod())) {
@@ -1964,7 +1964,7 @@ public abstract class Scope {
MethodBinding classMethod = (MethodBinding) found.elementAt(i);
if (!classMethod.isAbstract()) { // this check shouldn't matter, but to compatible with javac...
MethodBinding substitute = verifier.computeSubstituteMethod(original, classMethod);
- if (substitute != null && verifier.isSubstituteParameterSubsignature(classMethod, substitute))
+ if (substitute != null && verifier.isSubstituteParameterSubsignature(classMethod, substitute))
return new ProblemMethodBinding(interfaceMethod, selector, argumentTypes, ProblemReasons.ApplicableMethodOverriddenByInapplicable);
}
}
@@ -2040,7 +2040,7 @@ public abstract class Scope {
}
// SH}
}
-
+
switch (visiblesCount) {
case 0 :
MethodBinding interfaceMethod =
@@ -2527,24 +2527,24 @@ public abstract class Scope {
class MethodClashException extends RuntimeException {
private static final long serialVersionUID = -7996779527641476028L;
}
-
+
// For exact method references. 15.13.1
private MethodBinding getExactMethod(TypeBinding receiverType, TypeBinding type, char[] selector, InvocationSite invocationSite, MethodBinding candidate) {
if (type == null)
return null;
-
+
TypeBinding [] superInterfaces = type.superInterfaces();
TypeBinding [] typePlusSupertypes = new TypeBinding[2 + superInterfaces.length];
typePlusSupertypes[0] = type;
typePlusSupertypes[1] = type.superclass();
if (superInterfaces.length != 0)
System.arraycopy(superInterfaces, 0, typePlusSupertypes, 2, superInterfaces.length);
-
+
CompilationUnitScope unitScope = compilationUnitScope();
unitScope.recordTypeReference(type);
type = type.capture(this, invocationSite.sourceStart(), invocationSite.sourceEnd());
-
+
for (int i = 0, typesLength = typePlusSupertypes.length; i < typesLength; i++) {
MethodBinding[] methods = i == 0 ? type.getMethods(selector) : new MethodBinding [] { getExactMethod(receiverType, typePlusSupertypes[i], selector, invocationSite, candidate) };
for (int j = 0, length = methods.length; j < length; j++) {
@@ -2559,11 +2559,11 @@ public abstract class Scope {
} else {
candidate = currentMethod;
}
- }
+ }
}
return candidate;
}
-
+
// For exact method references. 15.13.1
public MethodBinding getExactMethod(TypeBinding receiverType, char[] selector, InvocationSite invocationSite) {
if (receiverType == null || !receiverType.isValidBinding() || receiverType.isBaseType())
@@ -2574,7 +2574,7 @@ public abstract class Scope {
return null;
currentType = getJavaLangObject();
}
-
+
MethodBinding exactMethod = null;
try {
exactMethod = getExactMethod(receiverType, currentType, selector, invocationSite, null);
@@ -2583,12 +2583,12 @@ public abstract class Scope {
}
if (exactMethod == null || !exactMethod.canBeSeenBy(invocationSite, this))
return null;
-
+
final TypeBinding[] typeArguments = invocationSite.genericTypeArguments();
TypeVariableBinding[] typeVariables = exactMethod.typeVariables();
if (exactMethod.isVarargs() || (typeVariables != Binding.NO_TYPE_VARIABLES && (typeArguments == null || typeArguments.length != typeVariables.length)))
return null;
-
+
if (receiverType.isArrayType()) {
if (CharOperation.equals(selector, TypeConstants.CLONE))
return ((ArrayBinding) receiverType).getCloneMethod(exactMethod);
@@ -2601,13 +2601,13 @@ public abstract class Scope {
{
return environment().createGetClassMethod(receiverType, exactMethod, this);
}
-
- if (typeVariables != Binding.NO_TYPE_VARIABLES)
+
+ if (typeVariables != Binding.NO_TYPE_VARIABLES)
return environment().createParameterizedGenericMethod(exactMethod, typeArguments);
-
+
return exactMethod;
}
-
+
// For exact constructor references. 15.13.1
public MethodBinding getExactConstructor(TypeBinding receiverType, InvocationSite invocationSite) {
if (receiverType == null || !receiverType.isValidBinding() || !receiverType.canBeInstantiated() || receiverType.isBaseType())
@@ -3138,7 +3138,7 @@ public abstract class Scope {
unitScope.recordQualifiedReference(TypeConstants.JAVA_LANG_INVOKE_LAMBDAMETAFACTORY);
return unitScope.environment.getResolvedJavaBaseType(TypeConstants.JAVA_LANG_INVOKE_LAMBDAMETAFACTORY, this);
}
-
+
public final ReferenceBinding getJavaLangInvokeSerializedLambda() {
CompilationUnitScope unitScope = compilationUnitScope();
unitScope.recordQualifiedReference(TypeConstants.JAVA_LANG_INVOKE_SERIALIZEDLAMBDA);
@@ -3180,13 +3180,13 @@ public abstract class Scope {
unitScope.recordQualifiedReference(TypeConstants.JAVA_LANG_THROWABLE);
return unitScope.environment.getResolvedJavaBaseType(TypeConstants.JAVA_LANG_THROWABLE, this);
}
-
+
public final ReferenceBinding getJavaLangIllegalArgumentException() {
CompilationUnitScope unitScope = compilationUnitScope();
unitScope.recordQualifiedReference(TypeConstants.JAVA_LANG_ILLEGALARGUMENTEXCEPTION);
return unitScope.environment.getResolvedJavaBaseType(TypeConstants.JAVA_LANG_ILLEGALARGUMENTEXCEPTION, this);
}
-
+
public final ReferenceBinding getJavaUtilIterator() {
CompilationUnitScope unitScope = compilationUnitScope();
unitScope.recordQualifiedReference(TypeConstants.JAVA_UTIL_ITERATOR);
@@ -3368,7 +3368,7 @@ public abstract class Scope {
Binding problemType(char[][] compoundName, int currentIndex, Binding previousProblem) {
if (previousProblem != null && previousProblem.problemId() != ProblemReasons.NotFound)
return previousProblem;
-
+
LookupEnvironment environment = environment();
if (environment.useModuleSystem && module() != environment.UnNamedModule) {
// try if the UnNamedModule can see the type:
@@ -3376,14 +3376,14 @@ public abstract class Scope {
if (notAccessibleType != null && notAccessibleType.isValidBinding())
return new ProblemReferenceBinding(compoundName, notAccessibleType, ProblemReasons.NotAccessible);
}
- return previousProblem != null
+ return previousProblem != null
? previousProblem
: new ProblemReferenceBinding(CharOperation.subarray(compoundName, 0, currentIndex), null, ProblemReasons.NotFound);
}
/* Answer the package from the compoundName or null if it begins with a type.
* Intended to be used while resolving a package name only.
- *
+ *
* Internal use only
*/
public final Binding getOnlyPackage(char[][] compoundName) {
@@ -3761,7 +3761,7 @@ public abstract class Scope {
}
}
}
- // In this location we had a fix for
+ // In this location we had a fix for
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=318401
// However, as of today (4.3M6 candidate) this fix seems unnecessary, while causing StackOverflowError in
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401271
@@ -4010,7 +4010,7 @@ public abstract class Scope {
if (two.declaringClass.isRawType()) continue next;
TypeBinding leafComponentType = two.original().parameters[i].leafComponentType();
- TypeBinding originalTwoParam = applyErasure ? leafComponentType.erasure() : leafComponentType;
+ TypeBinding originalTwoParam = applyErasure ? leafComponentType.erasure() : leafComponentType;
switch (originalTwoParam.kind()) {
case Binding.TYPE_PARAMETER :
if (((TypeVariableBinding) originalTwoParam).hasOnlyRawBounds())
@@ -4053,7 +4053,7 @@ public abstract class Scope {
}
if (one.isVarargs() && two.isVarargs()) {
- if (CompilerOptions.tolerateIllegalAmbiguousVarargsInvocation && this.compilerOptions().complianceLevel < ClassFileConstants.JDK1_7 &&
+ if (CompilerOptions.tolerateIllegalAmbiguousVarargsInvocation && this.compilerOptions().complianceLevel < ClassFileConstants.JDK1_7 &&
oneParamsLength > twoParamsLength) {
// special case when autoboxing makes (int, int...) better than (Object...) but not (int...) or (Integer, int...)
if (((ArrayBinding) twoParams[twoParamsLength - 1]).elementsType().id != TypeIds.T_JavaLangObject)
@@ -4069,7 +4069,7 @@ public abstract class Scope {
}
return false;
}
-
+
public boolean isBoxingCompatibleWith(TypeBinding expressionType, TypeBinding targetType) {
LookupEnvironment environment = environment();
if (environment.globalOptions.sourceLevel < ClassFileConstants.JDK1_5 || expressionType.isBaseType() == targetType.isBaseType())
@@ -4508,7 +4508,7 @@ public abstract class Scope {
} while (scope != null);
return null;
}
-
+
public final MethodScope namedMethodScope() {
Scope scope = this;
do {
@@ -4888,7 +4888,7 @@ public abstract class Scope {
Config.removeOrRestore(oldConfig, this);
}
// SH}
-
+
if (compatibleCount == 0) {
return new ProblemMethodBinding(visible[0].selector, argumentTypes, ProblemReasons.NotFound);
} else if (compatibleCount == 1) {
@@ -4901,16 +4901,16 @@ public abstract class Scope {
System.arraycopy(visible, 0, visible = new MethodBinding[visibleSize = compatibleCount], 0, compatibleCount);
System.arraycopy(compatibilityLevels, 0, compatibilityLevels = new int[compatibleCount], 0, compatibleCount);
}
-
-
+
+
MethodBinding[] moreSpecific = new MethodBinding[visibleSize];
if (isJdk18) {
// 15.12.2.5 Choosing the Most Specific Method
int count = 0;
-
+
nextJ: for (int j = 0; j < visibleSize; j++) {
MethodBinding mbj = visible[j].genericMethod();
- final TypeBinding[] mbjParameters = mbj.parameters;
+ final TypeBinding[] mbjParameters = mbj.parameters;
int levelj = compatibilityLevels[j];
nextK: for (int k = 0; k < visibleSize; k++) {
if (j == k) continue;
@@ -4922,18 +4922,18 @@ public abstract class Scope {
continue nextJ; // j cannot be more specific
}
//{ObjectTeams: one more reason for preferring one over the other:
- if (useTranslation[j] != useTranslation[k]) {
+ if (useTranslation[j] != useTranslation[k]) {
if (useTranslation[k])
continue nextK; // j is more specific than k
- else
- continue nextJ; // j cannot be more specific
+ else
+ continue nextJ; // j cannot be more specific
}
// SH}
MethodBinding mbk = visible[k].genericMethod();
final TypeBinding[] mbkParameters = mbk.parameters;
// TODO: should the following line also find diamond-typeVariables?
if (((invocationSite instanceof Invocation) || (invocationSite instanceof ReferenceExpression))
- && mbk.typeVariables() != Binding.NO_TYPE_VARIABLES)
+ && mbk.typeVariables() != Binding.NO_TYPE_VARIABLES)
{
// 18.5.4 More Specific Method Inference
Expression[] expressions = null;
@@ -4949,8 +4949,8 @@ public abstract class Scope {
} else {
for (int i = 0, length = argumentTypes.length; i < length; i++) {
TypeBinding argumentType = argumentTypes[i];
- TypeBinding s = InferenceContext18.getParameter(mbjParameters, i, levelj == VARARGS_COMPATIBLE);
- TypeBinding t = InferenceContext18.getParameter(mbkParameters, i, levelk == VARARGS_COMPATIBLE);
+ TypeBinding s = InferenceContext18.getParameter(mbjParameters, i, levelj == VARARGS_COMPATIBLE);
+ TypeBinding t = InferenceContext18.getParameter(mbkParameters, i, levelk == VARARGS_COMPATIBLE);
if (TypeBinding.equalsEquals(s, t))
continue;
if (!argumentType.sIsMoreSpecific(s,t, this)) {
@@ -4980,8 +4980,8 @@ public abstract class Scope {
}
} else {
- // JLS7 implementation
-
+ // JLS7 implementation
+
InvocationSite tieBreakInvocationSite = new InvocationSite() {
@Override
public TypeBinding[] genericTypeArguments() { return null; } // ignore genericTypeArgs
@@ -5025,7 +5025,7 @@ public abstract class Scope {
for (int j = 0; j < visibleSize; j++) {
if (i == j || compatibilityLevels[j] != level) continue;
//{ObjectTeams:
- if (!useTranslation[i] && useTranslation[j])
+ if (!useTranslation[i] && useTranslation[j])
continue;
// SH}
MethodBinding next = visible[j];
@@ -5034,7 +5034,7 @@ public abstract class Scope {
compatibilityLevels[j] = -1;
continue;
}
-
+
MethodBinding methodToTest = next;
if (next instanceof ParameterizedGenericMethodBinding) {
ParameterizedGenericMethodBinding pNext = (ParameterizedGenericMethodBinding) next;
@@ -5144,7 +5144,7 @@ public abstract class Scope {
if (next.original().typeVariables != Binding.NO_TYPE_VARIABLES) {
if (original.returnType.erasure().findSuperTypeOriginatingFrom(original2.returnType.erasure()) == null)
continue nextSpecific;
- } else if (!current.returnType.isCompatibleWith(next.returnType)) {
+ } else if (!current.returnType.isCompatibleWith(next.returnType)) {
continue nextSpecific;
}
// continue with original 15.12.2.5
@@ -5213,7 +5213,7 @@ public abstract class Scope {
if (i == j) continue;
if (TypeBinding.equalsEquals(currentException, allExceptions[j])) {
// duplicate same exception
- if (i < j)
+ if (i < j)
break; // take only the first occurrence
else
continue currents; // skip
@@ -5253,7 +5253,7 @@ public abstract class Scope {
} while (scope != null);
return lastMethodScope; // may answer null if no method around
}
-
+
// Version that just answers based on inference kind (at 1.8+) when available.
public int parameterCompatibilityLevel(MethodBinding method, TypeBinding[] arguments, InvocationSite site) {
if (method.problemId() == ProblemReasons.InvocationTypeInferenceFailure) {
@@ -5278,7 +5278,7 @@ public abstract class Scope {
}
/* 1.8+ Post inference compatibility check policy: For non-functional-type arguments, trust inference. For functional type arguments apply compatibility checks after inference
has completed to ensure arguments that were not pertinent to applicability which have only seen potential compatibility checks are actually compatible.
- */
+ */
if (site instanceof Invocation && context != null && context.stepCompleted >= InferenceContext18.TYPE_INFERRED) {
for (int i = 0, length = arguments.length; i < length; i++) {
TypeBinding argument = arguments[i];
@@ -5311,7 +5311,7 @@ public abstract class Scope {
public int parameterCompatibilityLevel(MethodBinding method, TypeBinding[] arguments) {
return parameterCompatibilityLevel(method, arguments, false);
- }
+ }
public int parameterCompatibilityLevel(MethodBinding method, TypeBinding[] arguments, boolean tiebreakingVarargsMethods) {
TypeBinding[] parameters = method.parameters;
int paramLength = parameters.length;
@@ -5398,16 +5398,16 @@ public abstract class Scope {
}
public int parameterCompatibilityLevel(TypeBinding arg, TypeBinding param) {
-
+
if (TypeBinding.equalsEquals(arg, param))
return COMPATIBLE;
-
+
if (arg == null || param == null)
return NOT_COMPATIBLE;
if (arg.isCompatibleWith(param, this))
return COMPATIBLE;
-
+
if (arg.kind() == Binding.POLY_TYPE || (arg.isBaseType() != param.isBaseType())) {
TypeBinding convertedType = environment().computeBoxingType(arg);
if (TypeBinding.equalsEquals(convertedType, param) || convertedType.isCompatibleWith(param, this))
@@ -5415,7 +5415,7 @@ public abstract class Scope {
}
return NOT_COMPATIBLE;
}
-
+
private int parameterCompatibilityLevel(TypeBinding arg, TypeBinding param, LookupEnvironment env, boolean tieBreakingVarargsMethods, MethodBinding method) {
// only called if env.options.sourceLevel >= ClassFileConstants.JDK1_5
if (arg == null || param == null)
@@ -5551,7 +5551,7 @@ public abstract class Scope {
} while ((current = current.parent) != null);
return null;
}
-
+
/**
* Returns the nearest original reference context, starting from current scope.
* If starting on a class, it will return current class. If starting on unitScope, returns unit.
@@ -5568,7 +5568,7 @@ public abstract class Scope {
expression = expression.original;
return expression;
}
- return context;
+ return context;
case CLASS_SCOPE :
return ((ClassScope) current).referenceContext;
case COMPILATION_UNIT_SCOPE :
@@ -5606,7 +5606,7 @@ public abstract class Scope {
could be found. This method is modeled after Scope.getConstructor and Scope.getMethod.
*/
public MethodBinding getStaticFactory (ParameterizedTypeBinding allocationType, ReferenceBinding originalEnclosingType, TypeBinding[] argumentTypes, final InvocationSite allocationSite) {
-
+
// allocationType is the diamond type. originalEnclosingType is the real enclosing type ==> may be parameterized, parameterized with own type variables, raw, just plain type or null.
int classTypeVariablesArity = 0;
TypeVariableBinding[] classTypeVariables = Binding.NO_TYPE_VARIABLES;
@@ -5619,14 +5619,14 @@ public abstract class Scope {
System.arraycopy(classTypeVariables, 0, classTypeVariables = new TypeVariableBinding[classTypeVariablesArity + length], 0, classTypeVariablesArity);
System.arraycopy(typeVariables, 0, classTypeVariables, classTypeVariablesArity, length);
classTypeVariablesArity += length;
- }
+ }
if (currentType.isStatic()) // any enclosing types cannot be parameterized, if generic treat as raw.
break;
currentType = currentType.enclosingType();
}
boolean isInterface = allocationType.isInterface();
ReferenceBinding typeToSearch = isInterface ? getJavaLangObject() : allocationType;
-
+
MethodBinding[] methods = typeToSearch.getMethods(TypeConstants.INIT, argumentTypes.length);
MethodBinding [] staticFactories = new MethodBinding[methods.length];
int sfi = 0;
@@ -5634,13 +5634,13 @@ public abstract class Scope {
MethodBinding method = methods[i];
if (!method.canBeSeenBy(allocationSite, this))
continue;
-
+
int paramLength = method.parameters.length;
boolean isVarArgs = method.isVarargs();
if (argumentTypes.length != paramLength)
if (!isVarArgs || argumentTypes.length < paramLength - 1)
continue; // incompatible
-
+
TypeVariableBinding[] methodTypeVariables = method.typeVariables();
int methodTypeVariablesArity = methodTypeVariables.length;
final int factoryArity = classTypeVariablesArity + methodTypeVariablesArity;
@@ -5649,7 +5649,7 @@ public abstract class Scope {
MethodBinding staticFactory = new SyntheticFactoryMethodBinding(targetMethod, environment, originalEnclosingType);
staticFactory.typeVariables = new TypeVariableBinding[factoryArity];
final SimpleLookupTable map = new SimpleLookupTable(factoryArity);
-
+
// Rename each type variable T of the type to T' or T'' or T''' based on the enclosing level to avoid a clash.
String prime = ""; //$NON-NLS-1$
Binding declaringElement = null;
@@ -5666,7 +5666,7 @@ public abstract class Scope {
// Rename each type variable U of method
prime += "'"; //$NON-NLS-1$
for (int j = classTypeVariablesArity, k = 0; j < factoryArity; j++, k++) {
- map.put(methodTypeVariables[k].unannotated(),
+ map.put(methodTypeVariables[k].unannotated(),
(staticFactory.typeVariables[j] = new TypeVariableBinding(CharOperation.concat(methodTypeVariables[k].sourceName, prime.toCharArray()),
staticFactory, j, environment)));
@@ -5699,7 +5699,7 @@ public abstract class Scope {
for (int j = 0; j < factoryArity; j++) {
TypeVariableBinding originalVariable = j < classTypeVariablesArity ? classTypeVariables[j] : methodTypeVariables[j - classTypeVariablesArity];
TypeVariableBinding substitutedVariable = (TypeVariableBinding) map.get(originalVariable.unannotated());
-
+
TypeBinding substitutedSuperclass = Scope.substitute(substitution, originalVariable.superclass);
ReferenceBinding[] substitutedInterfaces = Scope.substitute(substitution, originalVariable.superInterfaces);
if (originalVariable.firstBound != null) {
@@ -5730,7 +5730,7 @@ public abstract class Scope {
staticFactory.returnType = environment.createParameterizedType(genericType, Scope.substitute(substitution, genericType.typeVariables()), originalEnclosingType);
staticFactory.parameters = Scope.substitute(substitution, method.parameters);
staticFactory.thrownExceptions = Scope.substitute(substitution, method.thrownExceptions);
- if (staticFactory.thrownExceptions == null) {
+ if (staticFactory.thrownExceptions == null) {
staticFactory.thrownExceptions = Binding.NO_EXCEPTIONS;
}
staticFactories[sfi++] = new ParameterizedMethodBinding((ParameterizedTypeBinding) environment.convertToParameterizedType(isInterface ? allocationType : staticFactory.declaringClass),
@@ -5770,7 +5770,7 @@ public abstract class Scope {
} else {
nullAnnotationTagBit = tagBits & (TagBits.AnnotationNullMASK);
}
-
+
if (nullAnnotationTagBit != 0) {
if (type != null && type.isBaseType()) {
// type annotations are *always* illegal for 'void' (already reported)
@@ -5787,7 +5787,7 @@ public abstract class Scope {
* Record a NNBD annotation applying to a given source range within the current scope
* @param target the annotated element
* @param value bitset describing the default nullness (see Binding.NullnessDefaultMASK)
- * @param annotation the NNBD annotation
+ * @param annotation the NNBD annotation
* @param scopeStart start of the source range affected by the default
* @param scopeEnd end of the source range affected by the default
* @return <code>true</code> if the annotation was newly recorded, <code>false</code> if a corresponding entry already existed.
@@ -5796,7 +5796,7 @@ public abstract class Scope {
ReferenceContext context = referenceContext();
if (context instanceof LambdaExpression && context != ((LambdaExpression) context).original)
return false; // Do not record from copies. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=441929
-
+
if (this.nullDefaultRanges == null) {
this.nullDefaultRanges=new ArrayList<>(3);
}
@@ -5820,7 +5820,7 @@ public abstract class Scope {
* @param nullBits locally defined nullness default, see Binding.NullnessDefaultMASK
* @param sourceStart
* @return enclosing binding that already has a matching NonNullByDefault annotation,
- * or the special binding {@link #NOT_REDUNDANT}, indicating that a different enclosing nullness default was found,
+ * or the special binding {@link #NOT_REDUNDANT}, indicating that a different enclosing nullness default was found,
* or null to indicate that no enclosing nullness default was found.
*/
public Binding checkRedundantDefaultNullness(int nullBits, int sourceStart) {
@@ -5889,7 +5889,7 @@ public abstract class Scope {
}
return resolutionScope;
}
- // Some entity in the receiver scope is referencing instance data of enclosing type. Tag all intervening methods as instance methods.
+ // Some entity in the receiver scope is referencing instance data of enclosing type. Tag all intervening methods as instance methods.
public void tagAsAccessingEnclosingInstanceStateOf(ReferenceBinding enclosingType, boolean typeVariableAccess) {
MethodScope methodScope = methodScope();
if (methodScope != null && methodScope.referenceContext instanceof TypeDeclaration) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceModuleBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceModuleBinding.java
index 76d92b283..f3c93ae7f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceModuleBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceModuleBinding.java
@@ -46,7 +46,7 @@ public class SourceModuleBinding extends ModuleBinding {
this.requires = merge(this.requires, requires, javaBase, ModuleBinding[]::new);
this.requiresTransitive = merge(this.requiresTransitive, requiresTransitive, null, ModuleBinding[]::new);
}
-
+
public void setUses(TypeBinding[] uses) {
this.uses = merge(this.uses, uses, null, TypeBinding[]::new);
}
@@ -56,13 +56,13 @@ public class SourceModuleBinding extends ModuleBinding {
resolveTypes();
return super.getUses();
}
-
+
@Override
public TypeBinding[] getServices() {
resolveTypes();
return super.getServices();
}
-
+
@Override
public TypeBinding[] getImplementations(TypeBinding binding) {
resolveTypes();
@@ -103,7 +103,7 @@ public class SourceModuleBinding extends ModuleBinding {
System.arraycopy(two, 0, result, len0+len1, len2);
return result;
}
-
+
@Override
Stream<ModuleBinding> getRequiredModules(boolean transitiveOnly) {
// don't rely on "if (this.requires == NO_MODULES)" - could have been modified by completeIfNeeded()
@@ -157,7 +157,7 @@ public class SourceModuleBinding extends ModuleBinding {
@Override
SimpleLookupTable storedAnnotations(boolean forceInitialize, boolean forceStore) {
if (this.scope != null) { // scope null when no annotation cached, and module got processed fully (159631)
- SimpleLookupTable annotationTable = super.storedAnnotations(forceInitialize, forceStore);
+ SimpleLookupTable annotationTable = super.storedAnnotations(forceInitialize, forceStore);
if (annotationTable != null)
this.scope.referenceCompilationUnit().compilationResult.hasAnnotations = true;
return annotationTable;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
index 3625f7ac8..1ff49a565 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
@@ -194,7 +194,7 @@ public class SourceTypeBinding extends ReferenceBinding {
protected SourceTypeBinding() { super(); this.prototype = this; } // default ctor for Singleton membertypes NoBaseclass, ProblemBaseclass
//Markus Witte}
-
+
private SimpleLookupTable storedAnnotations = null; // keys are this ReferenceBinding & its fields and methods, value is an AnnotationHolder
public int defaultNullness;
@@ -203,7 +203,7 @@ public class SourceTypeBinding extends ReferenceBinding {
private ReferenceBinding containerAnnotationType = null;
public ExternalAnnotationProvider externalAnnotationProvider;
-
+
private SourceTypeBinding nestHost;
public HashSet<SourceTypeBinding> nestMembers;
@@ -241,11 +241,11 @@ public SourceTypeBinding(char[][] compoundName, PackageBinding fPackage, ClassSc
public SourceTypeBinding(SourceTypeBinding prototype) {
super(prototype);
-
+
this.prototype = prototype.prototype;
this.prototype.tagBits |= TagBits.HasAnnotatedVariants;
this.tagBits &= ~TagBits.HasAnnotatedVariants;
-
+
this.superclass = prototype.superclass;
this.superInterfaces = prototype.superInterfaces;
this.fields = prototype.fields;
@@ -264,7 +264,7 @@ public SourceTypeBinding(SourceTypeBinding prototype) {
this.containerAnnotationType = prototype.containerAnnotationType;
this.tagBits |= TagBits.HasUnresolvedMemberTypes; // see memberTypes()
this.isRecordDeclaration = this.prototype.isRecordDeclaration;
-
+
//{ObjectTeams: team?
if (prototype._teamModel != null)
setTeamModel(new TeamModel(this));
@@ -272,9 +272,9 @@ public SourceTypeBinding(SourceTypeBinding prototype) {
}
private void addDefaultAbstractMethods() {
-
+
if (!isPrototype()) throw new IllegalStateException();
-
+
if ((this.tagBits & TagBits.KnowsDefaultAbstractMethods) != 0) return;
this.tagBits |= TagBits.KnowsDefaultAbstractMethods;
@@ -353,9 +353,9 @@ private void addDefaultAbstractMethods() {
* Answer the new field or the existing field if one already existed.
*/
public FieldBinding addSyntheticFieldForInnerclass(LocalVariableBinding actualOuterLocalVariable) {
-
+
if (!isPrototype()) throw new IllegalStateException();
-
+
if (this.synthetics == null)
this.synthetics = new HashMap[MAX_SYNTHETICS];
if (this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)
@@ -402,9 +402,9 @@ public FieldBinding addSyntheticFieldForInnerclass(LocalVariableBinding actualOu
* Answer the new field or the existing field if one already existed.
*/
public FieldBinding addSyntheticFieldForInnerclass(ReferenceBinding enclosingType) {
-
+
if (!isPrototype()) throw new IllegalStateException();
-
+
if (this.synthetics == null)
this.synthetics = new HashMap[MAX_SYNTHETICS];
if (this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)
@@ -523,9 +523,9 @@ final public void computeValueParameterSlotSizes() {
* Answer the new field or the existing field if one already existed.
*/
public FieldBinding addSyntheticFieldForClassLiteral(TypeBinding targetType, BlockScope blockScope) {
-
+
if (!isPrototype()) throw new IllegalStateException();
-
+
if (this.synthetics == null)
this.synthetics = new HashMap[MAX_SYNTHETICS];
if (this.synthetics[SourceTypeBinding.CLASS_LITERAL_EMUL] == null)
@@ -565,9 +565,9 @@ public FieldBinding addSyntheticFieldForClassLiteral(TypeBinding targetType, Blo
* Answer the new field or the existing field if one already existed.
*/
public FieldBinding addSyntheticFieldForAssert(BlockScope blockScope) {
-
+
if (!isPrototype()) throw new IllegalStateException();
-
+
if (this.synthetics == null)
this.synthetics = new HashMap[MAX_SYNTHETICS];
if (this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)
@@ -854,7 +854,7 @@ public SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin,
this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5);
SyntheticMethodBinding accessMethod = new SyntheticMethodBinding(this, begin, end);
- SyntheticMethodBinding[] accessors = new SyntheticMethodBinding[2];
+ SyntheticMethodBinding[] accessors = new SyntheticMethodBinding[2];
this.synthetics[SourceTypeBinding.METHOD_EMUL].put(accessMethod.selector, accessors);
accessors[0] = accessMethod;
return accessMethod;
@@ -865,7 +865,7 @@ public SyntheticMethodBinding addSyntheticMethod(LambdaExpression lambda) {
this.synthetics = new HashMap[MAX_SYNTHETICS];
if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5);
-
+
SyntheticMethodBinding lambdaMethod = null;
SyntheticMethodBinding[] lambdaMethods = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(lambda);
if (lambdaMethods == null) {
@@ -875,18 +875,18 @@ public SyntheticMethodBinding addSyntheticMethod(LambdaExpression lambda) {
} else {
lambdaMethod = lambdaMethods[0];
}
-
+
// Create a $deserializeLambda$ method if necessary, one is shared amongst all lambdas
if (lambda.isSerializable) {
addDeserializeLambdaMethod();
}
-
+
return lambdaMethod;
}
/*
* Add a synthetic method for the reference expression as a place holder for code generation
- * only if the reference expression's target is serializable
- *
+ * only if the reference expression's target is serializable
+ *
*/
public SyntheticMethodBinding addSyntheticMethod(ReferenceExpression ref) {
if (!isPrototype()) throw new IllegalStateException();
@@ -896,7 +896,7 @@ public SyntheticMethodBinding addSyntheticMethod(ReferenceExpression ref) {
this.synthetics = new HashMap[MAX_SYNTHETICS];
if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5);
-
+
SyntheticMethodBinding lambdaMethod = null;
SyntheticMethodBinding[] lambdaMethods = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(ref);
if (lambdaMethods == null) {
@@ -908,7 +908,7 @@ public SyntheticMethodBinding addSyntheticMethod(ReferenceExpression ref) {
}
// Create a $deserializeLambda$ method, one is shared amongst all lambdas
- addDeserializeLambdaMethod();
+ addDeserializeLambdaMethod();
return lambdaMethod;
}
private void addDeserializeLambdaMethod() {
@@ -982,7 +982,7 @@ public SyntheticMethodBinding addSyntheticBaseCallSurrogate(MethodBinding callin
accessors[1] = accessMethod;
}
}
- return accessMethod;
+ return accessMethod;
}
// bridges towards a private role method
public SyntheticMethodBinding addSyntheticRoleMethodBridge(SourceTypeBinding declaringRole, ReferenceBinding originalRole, MethodBinding targetMethod, int bridgeKind) {
@@ -997,7 +997,7 @@ public SyntheticMethodBinding addSyntheticRoleMethodBridge(SourceTypeBinding dec
accessMethod = new SyntheticRoleBridgeMethodBinding(declaringRole, originalRole, targetMethod, bridgeKind);
this.synthetics[SourceTypeBinding.ROLE_BRIDGE].put(targetMethod, accessMethod);
}
- return accessMethod;
+ return accessMethod;
}
// and retrieve an existing accessor:
public SyntheticMethodBinding findOuterRoleMethodSyntheticAccessor(MethodBinding targetMethod) {
@@ -1007,7 +1007,7 @@ public SyntheticMethodBinding findOuterRoleMethodSyntheticAccessor(MethodBinding
if (accessor != null) {
if (accessor.isStatic() && isRole())
return ((SourceTypeBinding)enclosingType()).findOuterRoleMethodSyntheticAccessor(accessor);
- else
+ else
return accessor;
}
}
@@ -1378,14 +1378,14 @@ private void internalFaultInTypeForFieldsAndMethods() {
// NOTE: the type of each field of a source type is resolved when needed
@Override
public FieldBinding[] fields() {
-
+
if (!isPrototype()) {
if ((this.tagBits & TagBits.AreFieldsComplete) != 0)
return this.fields;
this.tagBits |= TagBits.AreFieldsComplete;
return this.fields = this.prototype.fields();
}
-
+
if ((this.tagBits & TagBits.AreFieldsComplete) != 0)
return this.fields;
@@ -1402,11 +1402,11 @@ public FieldBinding[] fields() {
FieldBinding[] fieldsSnapshot = this.fields;
for (int i = 0, length = fieldsSnapshot.length; i < length; i++) {
//{ObjectTeams: check discouraged field in @Instantation(ALWAYS) roles:
- if ( this.scope != null
- && (this.tagBits & TagBits.AnnotationInstantiation) != 0
+ if ( this.scope != null
+ && (this.tagBits & TagBits.AnnotationInstantiation) != 0
&& !fieldsSnapshot[i].isStatic())
this.scope.problemReporter().fieldInRoleWithInstantiationPolicy(this, fieldsSnapshot[i]);
-
+
// after compilation is finished we have no scope, can't resolve any better
// resolveTypeFor would NPE!
if ( this.model!=null
@@ -1452,7 +1452,7 @@ public FieldBinding[] fields() {
public char[] genericTypeSignature() {
if (!isPrototype())
return this.prototype.genericTypeSignature();
-
+
if (this.genericReferenceTypeSignature == null)
this.genericReferenceTypeSignature = computeGenericTypeSignature(this.typeVariables);
return this.genericReferenceTypeSignature;
@@ -1464,7 +1464,7 @@ public char[] genericTypeSignature() {
public char[] genericSignature() {
if (!isPrototype())
return this.prototype.genericSignature();
-
+
StringBuffer sig = null;
if (this.typeVariables != Binding.NO_TYPE_VARIABLES) {
sig = new StringBuffer(10);
@@ -1494,7 +1494,7 @@ public char[] genericSignature() {
/**
* Compute the tagbits for standard annotations. For source types, these could require
* lazily resolving corresponding annotation nodes, in case of forward references.
- * For type use bindings, this method still returns the tagbits corresponding to the type
+ * For type use bindings, this method still returns the tagbits corresponding to the type
* declaration binding.
* @see org.eclipse.jdt.internal.compiler.lookup.Binding#getAnnotationTagBits()
*/
@@ -1502,7 +1502,7 @@ public char[] genericSignature() {
public long getAnnotationTagBits() {
if (!isPrototype())
return this.prototype.getAnnotationTagBits();
-
+
if ((this.tagBits & TagBits.AnnotationResolved) == 0 && this.scope != null) {
if ((this.tagBits & TagBits.EndHierarchyCheck) == 0) {
CompilationUnitScope pkgCUS = this.scope.compilationUnitScope();
@@ -1527,7 +1527,7 @@ private void initAnnotationTagBits() {
ASTNode.resolveAnnotations(typeDecl.staticInitializerScope, typeDecl.annotations, this);
} finally {
typeDecl.staticInitializerScope.insideTypeAnnotation = old;
-//{ObjectTeams: @Instantation can only be applied to role classes
+//{ObjectTeams: @Instantation can only be applied to role classes
if ( (this.tagBits & TagBits.AnnotationInstantiation) != 0
&& (!isRole() || isInterface()))
this.scope.problemReporter().instantiationAnnotationInNonRole(typeDecl);
@@ -1539,7 +1539,7 @@ private void initAnnotationTagBits() {
public MethodBinding[] getDefaultAbstractMethods() {
if (!isPrototype())
return this.prototype.getDefaultAbstractMethods();
-
+
int count = 0;
for (int i = this.methods.length; --i >= 0;)
if (this.methods[i].isDefaultAbstract())
@@ -1558,7 +1558,7 @@ public MethodBinding[] getDefaultAbstractMethods() {
public MethodBinding getExactConstructor(TypeBinding[] argumentTypes) {
if (!isPrototype())
return this.prototype.getExactConstructor(argumentTypes);
-
+
int argCount = argumentTypes.length;
if ((this.tagBits & TagBits.AreMethodsComplete) != 0) { // have resolved all arg types & return type of the methods
long range;
@@ -1614,7 +1614,7 @@ public MethodBinding getExactConstructor(TypeBinding[] argumentTypes) {
public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) {
if (!isPrototype())
return this.prototype.getExactMethod(selector, argumentTypes, refScope);
-
+
// sender from refScope calls recordTypeReference(this)
int argCount = argumentTypes.length;
boolean foundNothing = true;
@@ -1711,7 +1711,7 @@ public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes
//NOTE: the type of a field of a source type is resolved when needed
@Override
public FieldBinding getField(char[] fieldName, boolean needResolve) {
-
+
if (!isPrototype())
return this.prototype.getField(fieldName, needResolve);
//{ObjectTeams: could be called before fields are present
@@ -1720,7 +1720,7 @@ public FieldBinding getField(char[] fieldName, boolean needResolve) {
if (this.fields == Binding.UNINITIALIZED_FIELDS)
return null;
// SH}
-
+
if ((this.tagBits & TagBits.AreFieldsComplete) != 0)
return ReferenceBinding.binarySearch(fieldName, this.fields);
@@ -1803,7 +1803,7 @@ public FieldBinding getField(char[] fieldName, boolean needResolve) {
public MethodBinding[] getMethods(char[] selector) {
if (!isPrototype())
return this.prototype.getMethods(selector);
-
+
if ((this.tagBits & TagBits.AreMethodsComplete) != 0) {
long range;
if ((range = ReferenceBinding.binarySearch(selector, this.methods)) >= 0) {
@@ -2109,7 +2109,7 @@ void initializeForStaticImports() {
@Override
int getNullDefault() {
-
+
if (!isPrototype()) {
return this.prototype.getNullDefault();
}
@@ -2133,7 +2133,7 @@ int getNullDefault() {
public boolean isEquivalentTo(TypeBinding otherType) {
if (!isPrototype())
return this.prototype.isEquivalentTo(otherType);
-
+
if (TypeBinding.equalsEquals(this, otherType)) return true;
if (otherType == null) return false;
switch(otherType.kind()) {
@@ -2200,7 +2200,7 @@ public boolean isTaggedRepeatable() { // tagged but not necessarily repeatable.
@Override
public boolean canBeSeenBy(Scope sco) {
SourceTypeBinding invocationType = sco.enclosingSourceType();
- if (TypeBinding.equalsEquals(invocationType, this))
+ if (TypeBinding.equalsEquals(invocationType, this))
return true;
return ((this.environment.canTypeBeAccessed(this, sco)) &&
super.canBeSeenBy(sco));
@@ -2294,14 +2294,14 @@ private int getImplicitMethod(char[] name) {
// NOTE: the return type, arg & exception types of each method of a source type are resolved when needed
@Override
public MethodBinding[] methods() {
-
+
if (!isPrototype()) {
if ((this.tagBits & TagBits.AreMethodsComplete) != 0)
return this.methods;
this.tagBits |= TagBits.AreMethodsComplete;
return this.methods = this.prototype.methods();
}
-
+
if ((this.tagBits & TagBits.AreMethodsComplete) != 0)
return this.methods;
@@ -2381,7 +2381,7 @@ public MethodBinding[] methods() {
if (complyTo15OrAbove) {
if (method.areParameterErasuresEqual(method2)) {
- // we now ignore return types in 1.7 when detecting duplicates, just as we did before 1.5
+ // we now ignore return types in 1.7 when detecting duplicates, just as we did before 1.5
// Only in 1.6, we have to make sure even return types are different
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=317719
if (compliance16 && method.returnType != null && method2.returnType != null) {
@@ -2443,7 +2443,7 @@ public MethodBinding[] methods() {
break;
}
}
-
+
}
if (index >= 0) {
// erasure of neither is equal to signature of other
@@ -2569,7 +2569,7 @@ public MethodBinding[] methods() {
}
private void checkRecordCanonicalConstructor(MethodBinding explicitCanonicalConstructor) {
-
+
AbstractMethodDeclaration methodDecl = explicitCanonicalConstructor.sourceMethod();
if (!explicitCanonicalConstructor.isPublic())
this.scope.problemReporter().recordCanonicalConstructorNotPublic(methodDecl);
@@ -2627,9 +2627,9 @@ public boolean isRecord() {
@Override
public ReferenceBinding containerAnnotationType() {
-
+
if (!isPrototype()) throw new IllegalStateException();
-
+
if (this.containerAnnotationType instanceof UnresolvedReferenceBinding) {
this.containerAnnotationType = (ReferenceBinding)BinaryTypeBinding.resolveType(this.containerAnnotationType, this.scope.environment(), false);
}
@@ -2637,7 +2637,7 @@ public ReferenceBinding containerAnnotationType() {
}
public FieldBinding resolveTypeFor(FieldBinding field) {
-
+
if (!isPrototype())
return this.prototype.resolveTypeFor(field);
@@ -2731,7 +2731,7 @@ public FieldBinding resolveTypeFor(FieldBinding field) {
if (fieldDecls[f].getKind() != AbstractVariableDeclaration.ENUM_CONSTANT) {
if (fieldDecls[f].type == null) // should not happen for non-enum types
throw new InternalCompilerError("Field "+fieldDecls[f]+" has no type in "+this);
-
+
field.copyInheritanceSrc = fieldDecls[f].copyInheritanceSrc;
field.maybeSetFieldTypeAnchorAttribute();
// anchored to tthis?
@@ -2743,9 +2743,9 @@ public FieldBinding resolveTypeFor(FieldBinding field) {
}
}
// need role field bridges?
- if ( isRole()
- && ((field.modifiers & ClassFileConstants.AccPrivate) != 0)
- && !CharOperation.prefixEquals(IOTConstants.OT_DOLLAR_NAME, field.name))
+ if ( isRole()
+ && ((field.modifiers & ClassFileConstants.AccPrivate) != 0)
+ && !CharOperation.prefixEquals(IOTConstants.OT_DOLLAR_NAME, field.name))
{
MethodBinding inner;
ReferenceBinding originalRole = field.declaringClass;
@@ -2798,7 +2798,7 @@ private MethodBinding resolveTypesWithSuspendedTempErrorHandlingPolicy(MethodBin
// SH}
if (!isPrototype())
return this.prototype.resolveTypesFor(method);
-
+
if ((method.modifiers & ExtraCompilerModifiers.AccUnresolved) == 0)
return method;
//{ObjectTeams: in state final we lost the scope, cannot use code below any more.
@@ -2889,7 +2889,7 @@ private MethodBinding resolveTypesWithSuspendedTempErrorHandlingPolicy(MethodBin
if (count < size)
System.arraycopy(method.thrownExceptions, 0, method.thrownExceptions = new ReferenceBinding[count], 0, count);
}
-
+
if (methodDecl.receiver != null) {
method.receiver = methodDecl.receiver.type.resolveType(methodDecl.scope, true /* check bounds*/);
}
@@ -2937,14 +2937,14 @@ private MethodBinding resolveTypesWithSuspendedTempErrorHandlingPolicy(MethodBin
// check if this argument was checked early as a type anchor for another argument:
try {
ASTNode.handleNonNullByDefault(methodDecl.scope, arg.annotations, arg);
- parameterType =
- (anchorFlags[i] && arg.type.resolvedType.isValidBinding()) ?
+ parameterType =
+ (anchorFlags[i] && arg.type.resolvedType.isValidBinding()) ?
arg.type.resolvedType :
arg.type.resolveType(methodDecl.scope, true /* check bounds*/);
// orig:
// parameterType = arg.type.resolveType(methodDecl.scope, true /* check bounds*/);
} finally {
- if (deferRawTypeCheck) {
+ if (deferRawTypeCheck) {
arg.type.bits &= ~ASTNode.IgnoreRawTypeCheck;
}
}
@@ -2978,12 +2978,12 @@ private MethodBinding resolveTypesWithSuspendedTempErrorHandlingPolicy(MethodBin
if (parameterType != null && !parameterType.isValidBinding() && ((parameterType.tagBits & TagBits.HasMissingType) == 0))
foundArgProblem = true;
// SH}
-
+
if (parameterType == null) {
foundArgProblem = true;
} else if (parameterType == TypeBinding.VOID) {
- if (this.isRecordDeclaration &&
- methodDecl instanceof ConstructorDeclaration &&
+ if (this.isRecordDeclaration &&
+ methodDecl instanceof ConstructorDeclaration &&
((methodDecl.bits & ASTNode.IsImplicit) != 0)) {
// do nothing - already raised for record component.
} else
@@ -2999,7 +2999,7 @@ private MethodBinding resolveTypesWithSuspendedTempErrorHandlingPolicy(MethodBin
newParameters[i] = parameterType;
if (checkAPIleak)
methodDecl.scope.detectAPILeaks(arg.type, parameterType);
-//{ObjectTeams: don't overwrite existing binding (only fill in detail)
+//{ObjectTeams: don't overwrite existing binding (only fill in detail)
// Note: possibly a binding has been created along this call chain:
// TypeParameter.connectTypeAnchors() -> TypeAnchorReference.[resolveType()->findVariable()] -> RoleTypeCreator.resolveTypeAnchoredToArgument() -> Argument.bind()
if (arg.binding != null)
@@ -3020,7 +3020,7 @@ private MethodBinding resolveTypesWithSuspendedTempErrorHandlingPolicy(MethodBin
if ((method.tagBits & TagBits.AnnotationSafeVarargs) != 0) {
if (!method.isVarargs()) {
methodDecl.scope.problemReporter().safeVarargsOnFixedArityMethod(method);
- } else if (!method.isStatic() && !method.isFinal() && !method.isConstructor()
+ } else if (!method.isStatic() && !method.isFinal() && !method.isConstructor()
&& !(sourceLevel >= ClassFileConstants.JDK9 && method.isPrivate())) {
methodDecl.scope.problemReporter().safeVarargsOnNonFinalInstanceMethod(method);
}
@@ -3055,7 +3055,7 @@ private MethodBinding resolveTypesWithSuspendedTempErrorHandlingPolicy(MethodBin
try {
methodType = returnType.resolveType(methodDecl.scope, true /* check bounds*/);
} finally {
- if (deferRawTypeCheck) {
+ if (deferRawTypeCheck) {
returnType.bits &= ~ASTNode.IgnoreRawTypeCheck;
}
}
@@ -3155,7 +3155,7 @@ private MethodBinding resolveTypesWithSuspendedTempErrorHandlingPolicy(MethodBin
}
//{ObjectTeams: need role method bridges?
int abstractStatic = ClassFileConstants.AccAbstract | ClassFileConstants.AccStatic;
- if ( isRole()
+ if ( isRole()
&& ( (method.modifiers & ClassFileConstants.AccPrivate) != 0
|| ((method.modifiers & abstractStatic) == abstractStatic) && !method.declaringClass.isInterface())
&& !CharOperation.prefixEquals(IOTConstants.OT_DOLLAR_NAME, method.selector)
@@ -3187,7 +3187,7 @@ private static void rejectTypeAnnotatedVoidMethod(AbstractMethodDeclaration meth
}
private void createArgumentBindings(MethodBinding method, CompilerOptions compilerOptions) {
-
+
if (!isPrototype()) throw new IllegalStateException();
if (compilerOptions.isAnnotationBasedNullAnalysisEnabled)
getNullDefault(); // ensure initialized
@@ -3204,9 +3204,9 @@ private void createArgumentBindings(MethodBinding method, CompilerOptions compil
}
public void evaluateNullAnnotations() {
-
+
if (!isPrototype()) throw new IllegalStateException();
-
+
if (this.nullnessDefaultInitialized > 0 || !this.scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled)
return;
@@ -3279,9 +3279,9 @@ private void maybeMarkTypeParametersNonNull() {
@Override
boolean hasNonNullDefaultFor(int location, int sourceStart) {
-
+
if (!isPrototype()) throw new IllegalStateException();
-
+
if (this.scope == null) {
return (this.defaultNullness & location) != 0;
}
@@ -3345,7 +3345,7 @@ public void tagAsHavingDefectiveContainerType() {
// Propagate writes to all annotated variants so the clones evolve along.
public FieldBinding [] setFields(FieldBinding[] fields) {
-
+
if (!isPrototype())
return this.prototype.setFields(fields);
@@ -3371,7 +3371,7 @@ public FieldBinding [] setFields(FieldBinding[] fields) {
// We need to specialize member types, can't just propagate. Can't specialize here, clones could created post setMemberTypes()
public ReferenceBinding [] setMemberTypes(ReferenceBinding[] memberTypes) {
-
+
if (!isPrototype())
return this.prototype.setMemberTypes(memberTypes);
//{ObjectTeams: for post-hoc addition need to clear this flag:
@@ -3394,10 +3394,10 @@ public ReferenceBinding [] setMemberTypes(ReferenceBinding[] memberTypes) {
// Propagate writes to all annotated variants so the clones evolve along.
public MethodBinding [] setMethods(MethodBinding[] methods) {
-
+
if (!isPrototype())
return this.prototype.setMethods(methods);
-
+
if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
TypeBinding [] annotatedTypes = this.scope.environment().getAnnotatedTypes(this);
for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
@@ -3423,10 +3423,10 @@ public MethodBinding [] setMethods(MethodBinding[] methods) {
// Propagate writes to all annotated variants so the clones evolve along.
public ReferenceBinding setSuperClass(ReferenceBinding superClass) {
-
+
if (!isPrototype())
return this.prototype.setSuperClass(superClass);
-
+
if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
TypeBinding [] annotatedTypes = this.scope.environment().getAnnotatedTypes(this);
for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
@@ -3439,10 +3439,10 @@ public ReferenceBinding setSuperClass(ReferenceBinding superClass) {
// Propagate writes to all annotated variants so the clones evolve along.
public ReferenceBinding [] setSuperInterfaces(ReferenceBinding [] superInterfaces) {
-
+
if (!isPrototype())
return this.prototype.setSuperInterfaces(superInterfaces);
-
+
if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
TypeBinding [] annotatedTypes = this.scope.environment().getAnnotatedTypes(this);
for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
@@ -3455,10 +3455,10 @@ public ReferenceBinding [] setSuperInterfaces(ReferenceBinding [] superInterface
// Propagate writes to all annotated variants so the clones evolve along.
public TypeVariableBinding [] setTypeVariables(TypeVariableBinding [] typeVariables) {
-
+
if (!isPrototype())
return this.prototype.setTypeVariables(typeVariables);
-
+
if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
TypeBinding [] annotatedTypes = this.scope.environment().getAnnotatedTypes(this);
for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
@@ -3645,8 +3645,8 @@ public void resolveGeneratedMethod(AbstractMethodDeclaration methodDeclaration,
// manually detect overriding, if we're past the MethodVerifier:
if (StateHelper.hasState(this, ITranslationStates.STATE_METHODS_VERIFIED))
if (methodBinding != null && methodBinding.isValidBinding() && TypeBinding.notEquals(methodBinding.declaringClass, this))
- methodDeclaration.binding.modifiers |= methodBinding.declaringClass.isInterface()
- ? ExtraCompilerModifiers.AccImplementing
+ methodDeclaration.binding.modifiers |= methodBinding.declaringClass.isInterface()
+ ? ExtraCompilerModifiers.AccImplementing
: ExtraCompilerModifiers.AccOverriding;
methodDeclaration.resolve(this.scope);
}
@@ -3703,13 +3703,13 @@ public ReferenceBinding[] superInterfaces() {
}
public SyntheticMethodBinding[] syntheticMethods() {
-
+
if (!isPrototype()) throw new IllegalStateException();
-
+
//{ObjectTeams: two different kinds of synthetics:
/* orig:
- if (this.synthetics == null
- || this.synthetics[SourceTypeBinding.METHOD_EMUL] == null
+ if (this.synthetics == null
+ || this.synthetics[SourceTypeBinding.METHOD_EMUL] == null
|| this.synthetics[SourceTypeBinding.METHOD_EMUL].size() == 0) {
return null;
}
@@ -3720,7 +3720,7 @@ public SyntheticMethodBinding[] syntheticMethods() {
if (this.synthetics == null) return null;
int index = 0;
SyntheticMethodBinding[] bindings = new SyntheticMethodBinding[1];
- if (this.synthetics[SourceTypeBinding.METHOD_EMUL] != null && this.synthetics[METHOD_EMUL].size() > 0)
+ if (this.synthetics[SourceTypeBinding.METHOD_EMUL] != null && this.synthetics[METHOD_EMUL].size() > 0)
{
//orig:
Iterator methodArrayIterator = this.synthetics[SourceTypeBinding.METHOD_EMUL].values().iterator();
@@ -3731,14 +3731,14 @@ public SyntheticMethodBinding[] syntheticMethods() {
if (index+1 > bindings.length) {
System.arraycopy(bindings, 0, (bindings = new SyntheticMethodBinding[index + 1]), 0, index);
}
- bindings[index++] = methodAccessors[i];
+ bindings[index++] = methodAccessors[i];
}
}
}
// :giro
}
// more synthetics to generate:
- if (this.synthetics[SourceTypeBinding.ROLE_BRIDGE] != null && this.synthetics[SourceTypeBinding.ROLE_BRIDGE].size() > 0)
+ if (this.synthetics[SourceTypeBinding.ROLE_BRIDGE] != null && this.synthetics[SourceTypeBinding.ROLE_BRIDGE].size() > 0)
{
Iterator methodArrayIterator = this.synthetics[SourceTypeBinding.ROLE_BRIDGE].values().iterator();
while (methodArrayIterator.hasNext()) {
@@ -3747,7 +3747,7 @@ public SyntheticMethodBinding[] syntheticMethods() {
if (index+1 > bindings.length) {
System.arraycopy(bindings, 0, (bindings = new SyntheticMethodBinding[index + 1]), 0, index);
}
- bindings[index++] = methodAccessor;
+ bindings[index++] = methodAccessor;
}
}
}
@@ -3767,9 +3767,9 @@ public SyntheticMethodBinding[] syntheticMethods() {
* Answer the collection of synthetic fields to append into the classfile
*/
public FieldBinding[] syntheticFields() {
-
+
if (!isPrototype()) throw new IllegalStateException();
-
+
if (this.synthetics == null) return null;
int fieldSize = this.synthetics[SourceTypeBinding.FIELD_EMUL] == null ? 0 : this.synthetics[SourceTypeBinding.FIELD_EMUL].size();
int literalSize = this.synthetics[SourceTypeBinding.CLASS_LITERAL_EMUL] == null ? 0 :this.synthetics[SourceTypeBinding.CLASS_LITERAL_EMUL].size();
@@ -3800,7 +3800,7 @@ public String toString() {
if (this.hasTypeAnnotations()) {
return annotatedDebugName();
}
-
+
StringBuffer buffer = new StringBuffer(30);
buffer.append("(id="); //$NON-NLS-1$
if (this.id == TypeIds.NoId)
@@ -3909,9 +3909,9 @@ public TypeVariableBinding[] typeVariables() {
return this.typeVariables != null ? this.typeVariables : Binding.NO_TYPE_VARIABLES;
}
void verifyMethods(MethodVerifier verifier) {
-
+
if (!isPrototype()) throw new IllegalStateException();
-
+
//{ObjectTeams: shortcut for predefined confined types (override final methods???)
if (TypeAnalyzer.isTopConfined(this))
return;
@@ -3971,7 +3971,7 @@ public void tagIndirectlyAccessibleMembers() {
if (!this.memberTypes[i].isPrivate())
this.memberTypes[i].modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
}
- if (this.superclass.isPrivate())
+ if (this.superclass.isPrivate())
if (this.superclass instanceof SourceTypeBinding) // should always be true because private super type can only be accessed in same CU
((SourceTypeBinding) this.superclass).tagIndirectlyAccessibleMembers();
}
@@ -4015,7 +4015,7 @@ public boolean isNestmateOf(SourceTypeBinding other) {
SourceTypeBinding otherHost = other.getNestHost();
return TypeBinding.equalsEquals(this, other) ||
- TypeBinding.equalsEquals(this.nestHost == null ? this : this.nestHost,
+ TypeBinding.equalsEquals(this.nestHost == null ? this : this.nestHost,
otherHost == null ? other : otherHost);
}
public void addNestMember(SourceTypeBinding member) {
@@ -4034,7 +4034,7 @@ public List<String> getNestMembers() {
.collect(Collectors.toList());
return list;
}
-/* Get the field bindings in the order of record component declaration
+/* Get the field bindings in the order of record component declaration
* should be called only after a called to fields() */
public FieldBinding[] getRecordComponents() {
return this.recordComponents;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SplitPackageBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SplitPackageBinding.java
index f35964546..d14f2d4aa 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SplitPackageBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SplitPackageBinding.java
@@ -22,7 +22,7 @@ import org.eclipse.jdt.core.compiler.CharOperation;
public class SplitPackageBinding extends PackageBinding {
Set<ModuleBinding> declaringModules;
public Set<PlainPackageBinding> incarnations;
-
+
/**
* Combine two potential package bindings, answering either the better of those if the other has a problem,
* or combine both into a split package.
@@ -119,7 +119,7 @@ public class SplitPackageBinding extends PackageBinding {
}
return childPackage;
}
-
+
@Override
ModuleBinding[] getDeclaringModules() {
return this.declaringModules.toArray(new ModuleBinding[this.declaringModules.size()]);
@@ -135,12 +135,12 @@ public class SplitPackageBinding extends PackageBinding {
for (PackageBinding incarnation : this.incarnations) {
PackageBinding package0 = incarnation.getPackage0(name);
if (package0 == null)
- return null; // if any incarnation lacks cached info, a full findPackage will be necessary
+ return null; // if any incarnation lacks cached info, a full findPackage will be necessary
candidate = combine(package0, candidate, this.enclosingModule);
}
if (candidate != null)
this.knownPackages.put(name, candidate);
-
+
return candidate;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticFactoryMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticFactoryMethodBinding.java
index b17afb0a7..de075b8fc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticFactoryMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticFactoryMethodBinding.java
@@ -23,7 +23,7 @@ public class SyntheticFactoryMethodBinding extends MethodBinding {
private MethodBinding staticFactoryFor;
private LookupEnvironment environment;
private ReferenceBinding enclosingType;
-
+
public SyntheticFactoryMethodBinding(MethodBinding method, LookupEnvironment environment, ReferenceBinding enclosingType) {
super(method.modifiers | ClassFileConstants.AccStatic, TypeConstants.SYNTHETIC_STATIC_FACTORY,
null, null, null, method.declaringClass);
@@ -31,14 +31,14 @@ public class SyntheticFactoryMethodBinding extends MethodBinding {
this.staticFactoryFor = method;
this.enclosingType = enclosingType;
}
-
+
public MethodBinding getConstructor() {
return this.staticFactoryFor;
}
-
+
/** Apply the given type arguments on the (declaring class of the) actual constructor being represented by this factory method and
- if method type arguments is not empty materialize the parameterized generic constructor
- * @param targetType
+ if method type arguments is not empty materialize the parameterized generic constructor
+ * @param targetType
*/
public ParameterizedMethodBinding applyTypeArgumentsOnConstructor(TypeBinding[] typeArguments, TypeBinding[] constructorTypeArguments, boolean inferredWithUncheckedConversion, TypeBinding targetType) {
ReferenceBinding parameterizedType = typeArguments == null
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java
index 7ecee27ec..6baec6d36 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java
@@ -50,9 +50,9 @@ public class SyntheticMethodBinding extends MethodBinding {
public MethodBinding targetMethod; // method or constructor
public TypeBinding targetEnumType; // enum type
public LambdaExpression lambda;
-
+
/** Switch (one from many) linked to the switch table */
- public SwitchStatement switchStatement;
+ public SwitchStatement switchStatement;
/**
* Method reference expression whose target FI is Serializable. Should be set when
* purpose is {@link #SerializableMethodReference}
@@ -415,7 +415,7 @@ public class SyntheticMethodBinding extends MethodBinding {
this.modifiers |= ClassFileConstants.AccStrictfp;
}
}
-
+
/**
* Construct $deserializeLambda$ method
*/
@@ -432,7 +432,7 @@ public class SyntheticMethodBinding extends MethodBinding {
int methodId = knownAccessMethods == null ? 0 : knownAccessMethods.length;
this.index = methodId;
}
-
+
/**
* Construct enum special methods: values or valueOf methods
*/
@@ -442,7 +442,7 @@ public class SyntheticMethodBinding extends MethodBinding {
this.index = knownAccessMethods == null ? 0 : knownAccessMethods.length;
StringBuffer buffer = new StringBuffer();
buffer.append(TypeConstants.SYNTHETIC_ENUM_CONSTANT_INITIALIZATION_METHOD_PREFIX).append(this.index);
- this.selector = String.valueOf(buffer).toCharArray();
+ this.selector = String.valueOf(buffer).toCharArray();
this.modifiers = ClassFileConstants.AccPrivate | ClassFileConstants.AccStatic;
this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
this.purpose = SyntheticMethodBinding.TooManyEnumsConstants;
@@ -536,7 +536,7 @@ public class SyntheticMethodBinding extends MethodBinding {
this.modifiers = ClassFileConstants.AccSynthetic | ClassFileConstants.AccPrivate | ClassFileConstants.AccStatic;
this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
this.returnType = publicConstructor.declaringClass;
-
+
int realParametersLength = privateConstructor.parameters.length;
int enclosingInstancesLength = enclosingInstances.length;
int parametersLength = enclosingInstancesLength + realParametersLength;
@@ -544,7 +544,7 @@ public class SyntheticMethodBinding extends MethodBinding {
System.arraycopy(enclosingInstances, 0, this.parameters, 0, enclosingInstancesLength);
System.arraycopy(privateConstructor.parameters, 0, this.parameters, enclosingInstancesLength, realParametersLength);
this.fakePaddedParameters = publicConstructor.parameters.length - realParametersLength;
-
+
this.thrownExceptions = publicConstructor.thrownExceptions;
this.purpose = SyntheticMethodBinding.FactoryMethod;
this.targetMethod = publicConstructor;
@@ -718,12 +718,12 @@ public class SyntheticMethodBinding extends MethodBinding {
this.purpose = isSuperAccess ? SyntheticMethodBinding.SuperMethodAccess : SyntheticMethodBinding.MethodAccess;
//{ObjectTeams: is accessed role method also static?
- if (accessedMethod.needsSyntheticEnclosingTeamInstance()) {
+ if (accessedMethod.needsSyntheticEnclosingTeamInstance()) {
this.parameters = new TypeBinding[accessedMethod.parameters.length + 2];
this.parameters[0] = TypeBinding.INT; // dummy
this.parameters[1] = declaringSourceType.enclosingType(); // synth team arg
System.arraycopy(accessedMethod.parameters, 0, this.parameters, 2, accessedMethod.parameters.length);
- } else
+ } else
// SH}
if (accessedMethod.isStatic() || (isSuperAccess && receiverType.isInterface())) {
this.parameters = accessedMethod.parameters;
@@ -779,7 +779,7 @@ public class SyntheticMethodBinding extends MethodBinding {
protected boolean isConstructorRelated() {
return this.purpose == SyntheticMethodBinding.ConstructorAccess;
}
-
+
@Override
public LambdaExpression sourceLambda() {
return this.lambda;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TagBits.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TagBits.java
index e39fe212a..a4389d252 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TagBits.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TagBits.java
@@ -45,13 +45,13 @@ public interface TagBits {
// for method
long HasUncheckedTypeArgumentForBoundCheck = ASTNode.Bit9;
-
+
// local variable
long ForcedToBeRawType = ASTNode.Bit10;
// set when method has argument(s) that couldn't be resolved
long HasUnresolvedArguments = ASTNode.Bit10;
-
+
// for the type cycle hierarchy check used by ClassScope
long BeginHierarchyCheck = ASTNode.Bit9; // type
long EndHierarchyCheck = ASTNode.Bit10; // type
@@ -64,7 +64,7 @@ public interface TagBits {
long IsArgument = ASTNode.Bit11; // local
long ClearPrivateModifier = ASTNode.Bit10; // constructor binding
-
+
// for java 7 - this bit is also set if the variable is explicitly or implicitly final
long IsEffectivelyFinal = ASTNode.Bit12; // local
long MultiCatchParameter = ASTNode.Bit13; // local
@@ -73,7 +73,7 @@ public interface TagBits {
// for java 14 Records Canonical constructor (preview)
long IsCanonicalConstructor = ASTNode.Bit12; // constructor
long isImplicit = ASTNode.Bit13; // constructor and method
-
+
// have implicit null annotations been collected (inherited(?) & default)?
long IsNullnessKnown = ASTNode.Bit13; // method
@@ -97,7 +97,7 @@ public interface TagBits {
// set for parameterized type NOT of the form X<?,?>
long IsBoundParameterizedType = ASTNode.Bit24; // PTB only.
-
+
long HasAnnotatedVariants = ASTNode.Bit24; // TVB, STB
// used by BinaryTypeBinding
@@ -193,13 +193,13 @@ public interface TagBits {
| AnnotationNonNullByDefault
| AnnotationNullUnspecifiedByDefault
| AnnotationRepeatable;
-
+
long AnnotationNullMASK = AnnotationNullable | AnnotationNonNull;
/** @since 3.10 marks a type that has a nullness annotation directly or on a detail (array dimension/type argument). */
long HasNullTypeAnnotation = ASTNode.Bit21;
long HasTypeAnnotations = ASTNode.Bit22;
-
+
long DefaultValueResolved = ASTNode.Bit60L;
// set when type contains non-private constructor(s)
@@ -211,6 +211,6 @@ public interface TagBits {
// parameter/return incompatibility btw base-role?
long HasMappingIncompatibility = ASTNode.Bit64L; // for method mapping bindings
-
+
// SH}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java
index 5e2f9bc53..545b37426 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java
@@ -74,7 +74,7 @@ abstract public class TypeBinding extends Binding {
public long tagBits = 0; // See values in the interface TagBits below
protected AnnotationBinding [] typeAnnotations = Binding.NO_ANNOTATIONS;
-
+
// jsr 308
public static final ReferenceBinding TYPE_USE_BINDING = new ReferenceBinding() { /* used for type annotation resolution. */
{ this.id = TypeIds.T_undefined; }
@@ -83,7 +83,7 @@ abstract public class TypeBinding extends Binding {
@Override
public boolean hasTypeBit(int bit) { return false; }
};
-
+
/** Base type definitions */
public final static BaseTypeBinding INT = new BaseTypeBinding(
TypeIds.T_int, TypeConstants.INT, new char[] { 'I' });
@@ -117,7 +117,7 @@ abstract public class TypeBinding extends Binding {
public TypeBinding() {
super();
}
-
+
public TypeBinding(TypeBinding prototype) { // faithfully copy most instance state - clone operation should specialize/override suitably.
this.id = prototype.id;
this.tagBits = prototype.tagBits & ~TagBits.AnnotationNullMASK;
@@ -245,7 +245,7 @@ public void collectSubstitutes(Scope scope, TypeBinding actualType, InferenceCon
/** Virtual copy constructor: a copy is made of the receiver's entire instance state and then suitably
parameterized by the arguments to the clone operation as seen fit by each type. Parameters may not
make sense for every type in the hierarchy, in which case they are silently ignored. A type may
- choose to retain a copy of the prototype for reference.
+ choose to retain a copy of the prototype for reference.
*/
public TypeBinding clone(TypeBinding enclosingType) {
throw new IllegalStateException("TypeBinding#clone() should have been overridden"); //$NON-NLS-1$
@@ -294,7 +294,7 @@ public TypeBinding erasure() {
* Perform an upwards type projection as per JLS 4.10.5
* @param scope Relevant scope for evaluating type projection
* @param mentionedTypeVariables Filter for mentioned type variabled
- * @returns Upwards type projection of 'this', or null if downwards projection is undefined
+ * @returns Upwards type projection of 'this', or null if downwards projection is undefined
*/
public TypeBinding upwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) {
return this;
@@ -304,7 +304,7 @@ public TypeBinding upwardsProjection(Scope scope, TypeBinding[] mentionedTypeVar
* Perform a downwards type projection as per JLS 4.10.5
* @param scope Relevant scope for evaluating type projection
* @param mentionedTypeVariables Filter for mentioned type variabled
- * @returns Downwards type projection of 'this', or null if downwards projection is undefined
+ * @returns Downwards type projection of 'this', or null if downwards projection is undefined
*/
public TypeBinding downwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) {
return this;
@@ -498,11 +498,11 @@ public TypeBinding findSuperTypeOriginatingFrom(TypeBinding otherType) {
* Returns the type to use for generic cast, or null if none required
*/
public TypeBinding genericCast(TypeBinding targetType) {
- if (TypeBinding.equalsEquals(this, targetType))
+ if (TypeBinding.equalsEquals(this, targetType))
return null;
TypeBinding targetErasure = targetType.erasure();
// type var get replaced by upper bound
- if (erasure().findSuperTypeOriginatingFrom(targetErasure) != null)
+ if (erasure().findSuperTypeOriginatingFrom(targetErasure) != null)
return null;
//{ObjectTeams: don't cast if lowering is needed instead:
TypeBinding erasure= erasure();
@@ -632,7 +632,7 @@ public final boolean isPrimitiveOrBoxedPrimitiveType() {
case TypeIds.T_JavaLangInteger :
case TypeIds.T_JavaLangLong :
return true;
- default:
+ default:
return false;
}
}
@@ -650,7 +650,7 @@ public boolean isBoxedPrimitiveType() {
case TypeIds.T_JavaLangInteger :
case TypeIds.T_JavaLangLong :
return true;
- default:
+ default:
return false;
}
}
@@ -692,16 +692,16 @@ public boolean isPotentiallyCompatibleWith(TypeBinding right, /*@Nullable*/ Scop
/* Answer true if the receiver type can be assigned to the argument type (right) with boxing/unboxing applied.
*/
public boolean isBoxingCompatibleWith(TypeBinding right, /*@NonNull */ Scope scope) {
-
+
if (right == null)
return false;
if (TypeBinding.equalsEquals(this, right))
return true;
-
+
if (this.isCompatibleWith(right, scope))
return true;
-
+
if (this.isBaseType() != right.isBaseType()) {
TypeBinding convertedType = scope.environment().computeBoxingType(this);
if (TypeBinding.equalsEquals(convertedType, right) || convertedType.isCompatibleWith(right, scope))
@@ -800,7 +800,7 @@ public boolean isPlainDependentType() {
/**
* Returns true if the type is parameterized, e.g. List<String>.
- * Note that some instances of ParameterizedTypeBinding have no arguments, like for non-generic members
+ * Note that some instances of ParameterizedTypeBinding have no arguments, like for non-generic members
* of a parameterized type. Use {@link #isParameterizedTypeWithActualArguments()} instead to find out.
*/
public boolean isParameterizedType() {
@@ -833,7 +833,7 @@ public boolean isIntersectionType18() {
* i.e. {@link #isParameterizedType()} is not equivalent to testing <code>type.kind() == Binding.PARAMETERIZED_TYPE</code>
*/
public final boolean isParameterizedTypeWithActualArguments() {
- return (kind() == Binding.PARAMETERIZED_TYPE)
+ return (kind() == Binding.PARAMETERIZED_TYPE)
&& ((ParameterizedTypeBinding) this).arguments != null;
}
@@ -919,15 +919,15 @@ private boolean isProvableDistinctSubType(TypeBinding otherType) {
public boolean isProvablyDistinct(TypeBinding otherType) {
/* With the hybrid 1.4/1.5+ projects modes, while establishing type equivalence, we need to
- be prepared for a type such as Map appearing in one of three forms: As (a) a ParameterizedTypeBinding
- e.g Map<String, String>, (b) as RawTypeBinding Map#RAW and finally (c) as a BinaryTypeBinding
+ be prepared for a type such as Map appearing in one of three forms: As (a) a ParameterizedTypeBinding
+ e.g Map<String, String>, (b) as RawTypeBinding Map#RAW and finally (c) as a BinaryTypeBinding
When the usage of a type lacks type parameters, whether we land up with the raw form or not depends
on whether the underlying type was "seen to be" a generic type in the particular build environment or
not. See:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=186565
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=328827
+ https://bugs.eclipse.org/bugs/show_bug.cgi?id=328827
https://bugs.eclipse.org/bugs/show_bug.cgi?id=329588
- */
+ */
if (equalsEquals(this, otherType))
return false;
@@ -1296,7 +1296,7 @@ public boolean isTypeArgumentContainedBy(TypeBinding otherType) {
if (cb18.firstBound != null) {
if (cb18.lowerBound != null)
return false; // type containment is not defined for variables with both upper and lower bound
- TypeBinding[] otherBounds = null;
+ TypeBinding[] otherBounds = null;
int len = cb18.upperBounds.length; // by construction non-null if firstBound is set
if (len > 1)
System.arraycopy(cb18.upperBounds, 1, otherBounds = new TypeBinding[len-1], 0, len-1);
@@ -1582,7 +1582,7 @@ public TypeBinding original() {
}
}
-/**
+/**
* Return this type minus its type annotations
*/
public TypeBinding unannotated() {
@@ -1591,7 +1591,7 @@ public TypeBinding unannotated() {
/**
* Return this type minus its toplevel null annotations. Any annotations on type arguments or
- * bounds are retained.
+ * bounds are retained.
*/
public TypeBinding withoutToplevelNullAnnotation() {
return this;
@@ -1713,8 +1713,8 @@ public TypeBinding maybeWrapRoleType (ASTNode typedNode, TypeArgumentUpdater upd
* In particular {@code null} is answered if the receiver is not a reference type, or is a problem type.
* @param scope scope
* @param replaceWildcards Should wildcards be replaced following JLS 9.8? Say false for lambdas with explicit argument types which should apply 18.5.3
- *
- * @return The single abstract method of a functional interface, or one of {@code null} or {@link ReferenceBinding#samProblemBinding}, if the receiver is not a functional interface.
+ *
+ * @return The single abstract method of a functional interface, or one of {@code null} or {@link ReferenceBinding#samProblemBinding}, if the receiver is not a functional interface.
*/
public MethodBinding getSingleAbstractMethod(Scope scope, boolean replaceWildcards) {
return null;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBindingVisitor.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBindingVisitor.java
index 108334942..32fa61d90 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBindingVisitor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBindingVisitor.java
@@ -32,31 +32,31 @@ public class TypeBindingVisitor {
public boolean visit(ArrayBinding arrayBinding) {
return true; // continue traversal.
}
-
+
public boolean visit(TypeVariableBinding typeVariable) {
return true; // continue traversal.
}
-
+
public boolean visit(ReferenceBinding referenceBinding) {
return true; // continue traversal.
}
-
+
public boolean visit(WildcardBinding wildcardBinding) {
return true; // continue traversal.
}
-
+
public boolean visit(ParameterizedTypeBinding parameterizedTypeBinding) {
return true; // continue traversal.
}
-
+
public boolean visit(IntersectionTypeBinding18 intersectionTypeBinding18) {
return true; // continue traversal.
}
-
+
public boolean visit(RawTypeBinding rawTypeBinding) {
return true; // continue traversal.
}
-
+
public boolean visit(PolyTypeBinding polyTypeBinding) {
return true; // continue traversal.
}
@@ -69,9 +69,9 @@ public class TypeBindingVisitor {
public static void visit(TypeBindingVisitor visitor, TypeBinding type) {
- if (type == null)
+ if (type == null)
return;
-
+
SimpleLookupTable visitedCache = visitor.visitedCache;
if (visitedCache == null) {
visitor.visitedCache = new SimpleLookupTable(3);
@@ -83,7 +83,7 @@ public class TypeBindingVisitor {
return;
visitedCache.put(type, Boolean.TRUE);
switch (type.kind()) {
-
+
case Binding.TYPE_PARAMETER:
TypeVariableBinding typeVariableBinding = (TypeVariableBinding) type;
if (visitor.visit(typeVariableBinding)) {
@@ -92,7 +92,7 @@ public class TypeBindingVisitor {
visit(visitor, typeVariableBinding.superInterfaces);
}
break;
-
+
case Binding.PARAMETERIZED_TYPE:
ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) type;
if (visitor.visit(parameterizedTypeBinding)) {
@@ -117,11 +117,11 @@ public class TypeBindingVisitor {
}
}
break;
-
+
case Binding.BASE_TYPE:
visitor.visit((BaseTypeBinding) type);
break;
-
+
case Binding.RAW_TYPE:
//{ObjectTeams: relax the type to include half-raw dependent types:
if (type.isRoleType())
@@ -129,7 +129,7 @@ public class TypeBindingVisitor {
// SH}
visitor.visit((RawTypeBinding) type);
break;
-
+
case Binding.TYPE:
case Binding.GENERIC_TYPE:
ReferenceBinding referenceBinding = (ReferenceBinding) type;
@@ -138,17 +138,17 @@ public class TypeBindingVisitor {
visit(visitor, referenceBinding.typeVariables());
}
break;
-
+
case Binding.INTERSECTION_TYPE18:
IntersectionTypeBinding18 intersectionTypeBinding18 = (IntersectionTypeBinding18) type;
if (visitor.visit(intersectionTypeBinding18))
visit(visitor, intersectionTypeBinding18.intersectingTypes);
break;
-
+
case Binding.POLY_TYPE:
visitor.visit((PolyTypeBinding) type);
break;
-
+
default:
throw new InternalError("Unexpected binding type"); //$NON-NLS-1$
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBound.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBound.java
index 770e02ce9..b91daac44 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBound.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBound.java
@@ -19,15 +19,15 @@ package org.eclipse.jdt.internal.compiler.lookup;
* Implementation of 18.1.3 in JLS8
*/
public class TypeBound extends ReductionResult {
-
+
InferenceVariable left;
-
+
// this flag contributes to the workaround controlled by InferenceContext18.ARGUMENT_CONSTRAINTS_ARE_SOFT:
boolean isSoft;
// here we accumulate null tagBits from any types that have been related to this type bound during incorporation:
long nullHints;
-
+
static TypeBound createBoundOrDependency(InferenceSubstitution theta, TypeBinding type, InferenceVariable variable) {
// Part of JLS8 sect 18.1.3:
return new TypeBound(variable, theta.substitute(theta, type), SUBTYPE, true);
@@ -37,7 +37,7 @@ public class TypeBound extends ReductionResult {
TypeBound(InferenceVariable inferenceVariable, TypeBinding typeBinding, int relation) {
this(inferenceVariable, typeBinding, relation, false);
}
-
+
TypeBound(InferenceVariable inferenceVariable, TypeBinding typeBinding, int relation, boolean isSoft) {
this.left = inferenceVariable;
this.right = typeBinding;
@@ -65,12 +65,12 @@ public class TypeBound extends ReductionResult {
boolean isBound() {
return this.right.isProperType(true);
}
-
+
@Override
public int hashCode() {
return this.left.hashCode() + this.right.hashCode() + this.relation;
}
-
+
@Override
public boolean equals(Object obj) {
if (obj instanceof TypeBound) {
@@ -79,7 +79,7 @@ public class TypeBound extends ReductionResult {
}
return false;
}
-
+
// debugging:
@Override
public String toString() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java
index 8e9fc1bb3..f4f86f733 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java
@@ -143,7 +143,7 @@ public interface TypeConstants {
char[] DOM = "dom".toCharArray(); //$NON-NLS-1$
char[] ITYPEBINDING = "ITypeBinding".toCharArray(); //$NON-NLS-1$
char[] SPRING = "springframework".toCharArray(); //$NON-NLS-1$
-
+
// Constant compound names
char[][] JAVA_LANG = {JAVA, LANG};
char[][] JAVA_IO = {JAVA, IO};
@@ -255,7 +255,7 @@ public interface TypeConstants {
new CloseMethodRecord(GUAVA_CLOSEABLES, CLOSE, 1),
new CloseMethodRecord(APACHE_IOUTILS, CLOSE_QUIETLY, 1),
new CloseMethodRecord(APACHE_DBUTILS, CLOSE, 1),
- new CloseMethodRecord(APACHE_DBUTILS, CLOSE_QUIETLY, 3), // closeQuietly(Connection,Statement,ResultSet)
+ new CloseMethodRecord(APACHE_DBUTILS, CLOSE_QUIETLY, 3), // closeQuietly(Connection,Statement,ResultSet)
new CloseMethodRecord(APACHE_DBUTILS, "commitAndClose".toCharArray(), 1), //$NON-NLS-1$
new CloseMethodRecord(APACHE_DBUTILS, "commitAndCloseQuietly".toCharArray(), 1), //$NON-NLS-1$
new CloseMethodRecord(APACHE_DBUTILS, "rollbackAndClose".toCharArray(), 1), //$NON-NLS-1$
@@ -305,7 +305,7 @@ public interface TypeConstants {
{JAVA, "beans".toCharArray(), "XMLDecoder".toCharArray()}, //$NON-NLS-1$ //$NON-NLS-2$
{JAVAX, "sound".toCharArray(), "sampled".toCharArray(), "AudioInputStream".toCharArray()}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
};
- char[][] JAVA_IO_RESOURCE_FREE_CLOSEABLES = new char[][] {
+ char[][] JAVA_IO_RESOURCE_FREE_CLOSEABLES = new char[][] {
"StringReader".toCharArray(), //$NON-NLS-1$
"StringWriter".toCharArray(), //$NON-NLS-1$
"ByteArrayInputStream".toCharArray(), //$NON-NLS-1$
@@ -348,7 +348,7 @@ public interface TypeConstants {
char[][] ORG_ECLIPSE_CORE_RUNTIME_ASSERT = new char[][] { ORG, ECLIPSE, CORE, RUNTIME, ASSERT_CLASS };
// ... methods:
char[] IS_NOTNULL = "isNotNull".toCharArray(); //$NON-NLS-1$
-
+
char[] JUNIT = "junit".toCharArray(); //$NON-NLS-1$
char[] FRAMEWORK = "framework".toCharArray(); //$NON-NLS-1$
char[] JUPITER = "jupiter".toCharArray(); //$NON-NLS-1$
@@ -364,7 +364,7 @@ public interface TypeConstants {
// ... annotations:
char[] METHOD_SOURCE = "MethodSource".toCharArray(); //$NON-NLS-1$
char[][] ORG_JUNIT_METHOD_SOURCE = new char[][] { ORG, JUNIT, JUPITER, PARAMS, PROVIDER, METHOD_SOURCE };
-
+
char[] VALIDATE_CLASS = "Validate".toCharArray(); //$NON-NLS-1$
char[][] ORG_APACHE_COMMONS_LANG_VALIDATE = new char[][] { ORG, APACHE, COMMONS, LANG, VALIDATE_CLASS };
char[][] ORG_APACHE_COMMONS_LANG3_VALIDATE = new char[][] { ORG, APACHE, COMMONS, LANG3, VALIDATE_CLASS };
@@ -375,7 +375,7 @@ public interface TypeConstants {
char[] IS_TRUE = "isTrue".toCharArray(); //$NON-NLS-1$
char[] NOT_NULL = "notNull".toCharArray(); //$NON-NLS-1$
- char[][] COM_GOOGLE_COMMON_BASE_PRECONDITIONS = new char[][] {
+ char[][] COM_GOOGLE_COMMON_BASE_PRECONDITIONS = new char[][] {
COM, GOOGLE, "common".toCharArray(), "base".toCharArray(), "Preconditions".toCharArray() }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// ... methods:
char[] CHECK_NOT_NULL = "checkNotNull".toCharArray(); //$NON-NLS-1$
@@ -384,7 +384,7 @@ public interface TypeConstants {
// ... methods in java.util.Objects:
char[] REQUIRE_NON_NULL = "requireNonNull".toCharArray(); //$NON-NLS-1$
-
+
// different @Inject annotations are relevant for @NonNull fields
char[] INJECT_PACKAGE = "inject".toCharArray(); //$NON-NLS-1$
char[] INJECT_TYPE = "Inject".toCharArray(); //$NON-NLS-1$
@@ -392,7 +392,7 @@ public interface TypeConstants {
char[][] COM_GOOGLE_INJECT_INJECT = new char[][] {COM, GOOGLE, INJECT_PACKAGE, INJECT_TYPE };
// detail for the above:
char[] OPTIONAL = "optional".toCharArray(); //$NON-NLS-1$
-
+
// well-known methods with "dangerous" signatures:
char[][] JAVA_UTIL_MAP = new char[][] { JAVA, UTIL, "Map".toCharArray() }; //$NON-NLS-1$
char[] GET = "get".toCharArray(); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeIds.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeIds.java
index f83d0e453..00938d69e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeIds.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeIds.java
@@ -103,19 +103,19 @@ public interface TypeIds {
final int T_JavaIoExternalizable = 56;
final int T_JavaIoObjectStreamException = 57;
final int T_JavaIoException = 58;
-
+
final int T_JavaUtilCollection = 59;
-
+
// java 7
final int T_JavaLangSafeVarargs = 60;
-
+
final int T_JavaLangInvokeMethodHandlePolymorphicSignature = 61;
// java 7 java.lang.AutoCloseable
final int T_JavaLangAutoCloseable = 62;
-
+
// new in 3.8 for null annotations, removed in 4.6 (ids 65-67)
-
+
// new in 3.8 to identify org.eclipse.core.runtime.Assert
final int T_OrgEclipseCoreRuntimeAssert = 68;
// new in 3.9 to identify more assertion utilities:
@@ -138,7 +138,7 @@ public interface TypeIds {
// Java 8 - JEP 120
final int T_JavaLangAnnotationRepeatable = 90;
-
+
// classes with methods with "dangerous" signatures:
final int T_JavaUtilMap = 91;
final int T_JavaUtilList = 92;
@@ -151,7 +151,7 @@ public interface TypeIds {
// If you add new type id, make sure to bump up T_LastWellKnownTypeId if there is a cross over.
final int T_LastWellKnownTypeId = 128;
-
+
final int NoId = Integer.MAX_VALUE;
@@ -239,19 +239,19 @@ public interface TypeIds {
* @see ReferenceBinding#hasTypeBit(int)
*/
final int BitUninitialized = 0x8000000;
- /**
+ /**
* Marks all sub-types of java.lang.AutoCloseable.
* @see ReferenceBinding#hasTypeBit(int)
*/
final int BitAutoCloseable = 1;
- /**
+ /**
* Marks all sub-types of java.io.Closeable.
* @see ReferenceBinding#hasTypeBit(int)
*/
final int BitCloseable = 2;
/**
* Bit for members of a white list:
- * Subtypes of Closeable that wrap another resource without directly holding any OS resources.
+ * Subtypes of Closeable that wrap another resource without directly holding any OS resources.
*/
final int BitWrapperCloseable = 4;
/**
@@ -259,7 +259,7 @@ public interface TypeIds {
* Subtypes of Closeable that do not hold an OS resource that needs to be released.
*/
final int BitResourceFreeCloseable = 8;
-
+
final int BitUninternedType = 16;
/** Bit for a type configured as a @NonNull annotation. */
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
index 4d26fd536..3c7300110 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
@@ -31,47 +31,47 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBindin
/* TypeSystem: An abstraction responsible for keeping track of types that undergo "derivation" of some sort and the derived types produced thus.
Here we use the term derivation in the Pascal sense and not per object oriented parlance.
-
+
As of Java SE8, a type can undergo derivation in a bunch of ways:
-
+
- By being created arrays out of,
- By being parameterized,
- By being created raw forms of,
- By being the generic type which a wildcard type or an intersection type parameterizes,
- By being annotated.
-
+
It is the responsibility of the TypeSystem to serve as the factory and ensure that unique types are created and maintained. Most of the
compiler depends on object identity given the derivation parameters are the same. E.g: If we dole out non-unique ParameterizedTypeBinding's
for two attempts to create List<String>, then one cannot be assigned to the other.
-
+
Till Java SE7, we could manage to create a single binding for a type - not so with annotations coming into the picture. In order for
two uses of the same type to be annotated differently, the bindings for them need to be distinct and cannot be shared. If we start
doling out different bindings, then validating type identity and equivalence becomes an issue.
-
+
What we do to solve the problem is produce different bindings when they need to be annotated differently, but stamp them with the
same id (TypeBinding#id). Thus types that fail == or != could quickly be ascertained to be mere annotation variants by comparing
the id field.
-
- This class is responsible for id stamping unique types. Only those types that are "derived from" in some form or participate in the
- derivation in some form (by being type arguments say) get tracked and id'd here. A type which is not thus derived from in one form or
+
+ This class is responsible for id stamping unique types. Only those types that are "derived from" in some form or participate in the
+ derivation in some form (by being type arguments say) get tracked and id'd here. A type which is not thus derived from in one form or
the other or participate in the derivation thus - we are completely oblivious to.
-
- TypeBinding.id computation: For primitive types and certain "well known" types, id assignment happens elsewhere. Here we start with an
- id value that is suitably high and proceed monotonically upwards so we will not accidentally collide with the id space in use already.
- id assignments happens in such a way that a naked type and its annotated variants - variously annotated - would all share the same id.
- Example: @T1 Map<@T2 String, @T3 Object> and Map<@T4 String, @T5 Object> and @T6 Map<String, Object> and @T7 Map<String, @T8 Object> and
- Map<String, @T9 Object> would all share the same id since the unadorned naked type in each case is the same: Map<String, Object>. None
- of this would share the id with Map<String, String>. Briefly put, if you take a certain annotated type and strip it of all annotations
- to come up with the naked type, that naked type and the annotated type would have the same id. Alternately, if you take a certain naked
- type and arrive at the universe of all differently annotated types, they would all share the same id while their bindings could be different -
+
+ TypeBinding.id computation: For primitive types and certain "well known" types, id assignment happens elsewhere. Here we start with an
+ id value that is suitably high and proceed monotonically upwards so we will not accidentally collide with the id space in use already.
+ id assignments happens in such a way that a naked type and its annotated variants - variously annotated - would all share the same id.
+ Example: @T1 Map<@T2 String, @T3 Object> and Map<@T4 String, @T5 Object> and @T6 Map<String, Object> and @T7 Map<String, @T8 Object> and
+ Map<String, @T9 Object> would all share the same id since the unadorned naked type in each case is the same: Map<String, Object>. None
+ of this would share the id with Map<String, String>. Briefly put, if you take a certain annotated type and strip it of all annotations
+ to come up with the naked type, that naked type and the annotated type would have the same id. Alternately, if you take a certain naked
+ type and arrive at the universe of all differently annotated types, they would all share the same id while their bindings could be different -
would be different unless they are identically annotated.
-
+
Thus subsystems that are annotation agnostic could quickly ascertain binding equality by comparing the id field.
*/
public class TypeSystem {
-
+
public final class HashedParameterizedTypes {
-
+
private final class PTBKey extends ReferenceBinding { // extends ReferenceBinding so it can be used as wrapper
protected ReferenceBinding type; // must ensure the type is resolved
public TypeBinding[] arguments;
@@ -125,7 +125,7 @@ public class TypeSystem {
}
@Override
public boolean equals(Object other) {
- PTBKey that = (PTBKey) other; // homogeneous container.
+ PTBKey that = (PTBKey) other; // homogeneous container.
//{ObjectTeams: more checks:
int thatValueParamPos = that.valueParamPosition;
ITeamAnchor thatAnchor = that.teamAnchor;
@@ -159,7 +159,7 @@ public class TypeSystem {
return hashCode;
}
}
-
+
HashMap<PTBKey, ParameterizedTypeBinding []> hashedParameterizedTypes = new HashMap<>(256);
//{ObjectTeams: more args:
@@ -168,8 +168,8 @@ public class TypeSystem {
:giro */
ParameterizedTypeBinding get(ReferenceBinding genericType, TypeBinding[] typeArguments, ITeamAnchor anchor, int valueParamPosition,
ReferenceBinding enclosingType, AnnotationBinding[] annotations) {
-// orig:
-
+// orig:
+
ReferenceBinding unannotatedGenericType = (ReferenceBinding) getUnannotatedType(genericType);
int typeArgumentsLength = typeArguments == null ? 0: typeArguments.length;
TypeBinding [] unannotatedTypeArguments = typeArguments == null ? null : new TypeBinding[typeArgumentsLength];
@@ -177,7 +177,7 @@ public class TypeSystem {
unannotatedTypeArguments[i] = getUnannotatedType(typeArguments[i]);
}
ReferenceBinding unannotatedEnclosingType = enclosingType == null ? null : (ReferenceBinding) getUnannotatedType(enclosingType);
-
+
/*
PTBKey key = new PTBKey(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, null);
:giro */
@@ -198,7 +198,7 @@ public class TypeSystem {
continue;
}
if (parameterizedType.enclosingType != enclosingTypeToMatch //$IDENTITY-COMPARISON$
- || !Util.effectivelyEqual(parameterizedType.typeArguments(), typeArgumentsToMatch))
+ || !Util.effectivelyEqual(parameterizedType.typeArguments(), typeArgumentsToMatch))
continue;
if (Util.effectivelyEqual(annotations, parameterizedType.getTypeAnnotations()))
return parameterizedType;
@@ -221,39 +221,39 @@ public class TypeSystem {
unannotatedTypeArguments[i] = getUnannotatedType(typeArguments[i]);
}
ReferenceBinding unannotatedEnclosingType = enclosingType == null ? null : (ReferenceBinding) getUnannotatedType(enclosingType);
-
+
/*
PTBKey key = new PTBKey(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, TypeSystem.this.environment);
:giro */
PTBKey key = new PTBKey(unannotatedGenericType, unannotatedTypeArguments, anchor, valueParamPosition,
unannotatedEnclosingType, TypeSystem.this.environment);
-// SH}
-
+// SH}
+
ParameterizedTypeBinding [] parameterizedTypeBindings = this.hashedParameterizedTypes.get(key);
int slot;
if (parameterizedTypeBindings == null) {
slot = 0;
parameterizedTypeBindings = new ParameterizedTypeBinding[1];
- } else {
+ } else {
slot = parameterizedTypeBindings.length;
System.arraycopy(parameterizedTypeBindings, 0, parameterizedTypeBindings = new ParameterizedTypeBinding[slot + 1], 0, slot);
}
parameterizedTypeBindings[slot] = parameterizedType;
this.hashedParameterizedTypes.put(key, parameterizedTypeBindings);
}
- }
-
+ }
+
private int typeid = TypeIds.T_LastWellKnownTypeId;
- private TypeBinding [][] types;
+ private TypeBinding [][] types;
protected HashedParameterizedTypes parameterizedTypes; // auxiliary fast lookup table for parameterized types.
private SimpleLookupTable annotationTypes; // cannot store in types, since AnnotationBinding is not a TypeBinding and we don't want types to operate at Binding level.
LookupEnvironment environment;
-
+
public TypeSystem(LookupEnvironment environment) {
this.environment = environment;
this.annotationTypes = new SimpleLookupTable(16);
this.typeid = TypeIds.T_LastWellKnownTypeId;
- this.types = new TypeBinding[TypeIds.T_LastWellKnownTypeId * 2][];
+ this.types = new TypeBinding[TypeIds.T_LastWellKnownTypeId * 2][];
this.parameterizedTypes = new HashedParameterizedTypes();
}
@@ -287,7 +287,7 @@ public class TypeSystem {
if (urb != null && urb.id == TypeIds.NoId)
urb.id = type.id;
}
-
+
return this.types[type.id][0] = type;
}
@@ -318,9 +318,9 @@ public class TypeSystem {
/* Note: parameters will not have type type annotations if lookup environment directly uses TypeSystem as its typeSystem. When ATS is used however
they may be annotated and we need to materialize the unannotated versions and work on them.
-
+
See ArrayBinding.swapUnresolved for further special case handling if incoming leafType is a URB that would resolve to a raw type later.
- */
+ */
public ArrayBinding getArrayType(TypeBinding leafType, int dimensions) {
if (leafType instanceof ArrayBinding) {
dimensions += leafType.dimensions();
@@ -331,7 +331,7 @@ public class TypeSystem {
int i, length = derivedTypes.length;
for (i = 0; i < length; i++) {
TypeBinding derivedType = derivedTypes[i];
- if (derivedType == null)
+ if (derivedType == null)
break;
if (!derivedType.isArrayType() || derivedType.hasTypeAnnotations())
continue;
@@ -349,7 +349,7 @@ public class TypeSystem {
this.types[this.typeid] = new TypeBinding[1];
return (ArrayBinding) (this.types[arrayType.id = this.typeid++][0] = arrayType);
}
-
+
public ArrayBinding getArrayType(TypeBinding leafComponentType, int dimensions, AnnotationBinding[] annotations) {
return getArrayType(leafComponentType, dimensions);
}
@@ -360,7 +360,7 @@ public class TypeSystem {
/* Note: parameters will not have type type annotations if lookup environment directly uses TypeSystem. When AnnotatableTypeSystem is in use
they may and we need to materialize the unannotated versions and work on them.
- */
+ */
public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) {
//{ObjectTeams: more arguments for role types:
return getParameterizedType(genericType, typeArguments, null, -1, enclosingType);
@@ -387,7 +387,7 @@ public class TypeSystem {
//{ObjectTeams: more arguments:
/* orig:
ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, Binding.NO_ANNOTATIONS);
- if (parameterizedType != null)
+ if (parameterizedType != null)
return parameterizedType;
parameterizedType = new ParameterizedTypeBinding(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, this.environment);
@@ -396,7 +396,7 @@ public class TypeSystem {
:giro */
ParameterizedTypeBinding parameterizedType = this.parameterizedTypes.get(unannotatedGenericType, unannotatedTypeArguments, teamAnchor, valueParamPosition,
unannotatedEnclosingType, Binding.NO_ANNOTATIONS);
- if (parameterizedType != null)
+ if (parameterizedType != null)
return parameterizedType;
// dependent type?
@@ -437,19 +437,19 @@ public class TypeSystem {
/* Note: Parameters will not have type type annotations if lookup environment directly uses TypeSystem. However when AnnotatableTypeSystem is in use,
they may and we need to materialize the unannotated versions and work on them.
- */
+ */
public RawTypeBinding getRawType(ReferenceBinding genericType, ReferenceBinding enclosingType) {
if (!genericType.hasEnclosingInstanceContext() && enclosingType != null) {
enclosingType = (ReferenceBinding) enclosingType.original();
}
ReferenceBinding unannotatedGenericType = (ReferenceBinding) getUnannotatedType(genericType);
ReferenceBinding unannotatedEnclosingType = enclosingType == null ? null : (ReferenceBinding) getUnannotatedType(enclosingType);
-
+
TypeBinding[] derivedTypes = this.types[unannotatedGenericType.id];
int i, length = derivedTypes.length;
for (i = 0; i < length; i++) {
TypeBinding derivedType = derivedTypes[i];
- if (derivedType == null)
+ if (derivedType == null)
break;
if (!derivedType.isRawType() || derivedType.actualType() != unannotatedGenericType || derivedType.hasTypeAnnotations()) //$IDENTITY-COMPARISON$
continue;
@@ -462,7 +462,7 @@ public class TypeSystem {
System.arraycopy(derivedTypes, 0, derivedTypes = new TypeBinding[length * 2], 0, length);
this.types[unannotatedGenericType.id] = derivedTypes;
}
-
+
if(unannotatedGenericType.isStatic() && unannotatedEnclosingType != null) {
unannotatedEnclosingType=(ReferenceBinding) unannotatedEnclosingType.original();
}
@@ -473,18 +473,18 @@ public class TypeSystem {
this.types[this.typeid] = new TypeBinding[1];
return (RawTypeBinding) (this.types[rawTytpe.id = this.typeid++][0] = rawTytpe);
}
-
+
public RawTypeBinding getRawType(ReferenceBinding genericType, ReferenceBinding enclosingType, AnnotationBinding[] annotations) {
return getRawType(genericType, enclosingType);
}
/* Parameters will not have type type annotations if lookup environment directly uses TypeSystem. When AnnotatableTypeSystem is in use,
they may and we need to materialize the unannotated versions and work on them.
- */
+ */
public WildcardBinding getWildcard(ReferenceBinding genericType, int rank, TypeBinding bound, TypeBinding[] otherBounds, int boundKind) {
if (genericType == null) // pseudo wildcard denoting composite bounds for lub computation
genericType = ReferenceBinding.LUB_GENERIC;
-
+
ReferenceBinding unannotatedGenericType = (ReferenceBinding) getUnannotatedType(genericType);
int otherBoundsLength = otherBounds == null ? 0: otherBounds.length;
TypeBinding [] unannotatedOtherBounds = otherBounds == null ? null : new TypeBinding[otherBoundsLength];
@@ -499,7 +499,7 @@ public class TypeSystem {
int i, length = derivedTypes.length;
for (i = 0; i < length; i++) {
TypeBinding derivedType = derivedTypes[i];
- if (derivedType == null)
+ if (derivedType == null)
break;
if (!derivedType.isWildcard() || derivedType.actualType() != unannotatedGenericType || derivedType.hasTypeAnnotations()) //$IDENTITY-COMPARISON$
continue;
@@ -508,29 +508,29 @@ public class TypeSystem {
if (Util.effectivelyEqual(derivedType.additionalBounds(), unannotatedOtherBounds))
return (WildcardBinding) derivedType;
}
-
+
if (i == length) {
System.arraycopy(derivedTypes, 0, derivedTypes = new TypeBinding[length * 2], 0, length);
this.types[useDerivedTypesOfBound ? unannotatedBound.id :unannotatedGenericType.id] = derivedTypes;
}
TypeBinding wildcard = derivedTypes[i] = new WildcardBinding(unannotatedGenericType, rank, unannotatedBound, unannotatedOtherBounds, boundKind, this.environment);
-
+
int typesLength = this.types.length;
if (this.typeid == typesLength)
System.arraycopy(this.types, 0, this.types = new TypeBinding[typesLength * 2][], 0, typesLength);
this.types[this.typeid] = new TypeBinding[1];
return (WildcardBinding) (this.types[wildcard.id = this.typeid++][0] = wildcard);
}
-
+
// No need for an override in ATS, since interning is position specific and either the wildcard there is annotated or not.
public final CaptureBinding getCapturedWildcard(WildcardBinding wildcard, ReferenceBinding contextType, int start, int end, ASTNode cud, int id) {
-
+
WildcardBinding unannotatedWildcard = (WildcardBinding) getUnannotatedType(wildcard);
TypeBinding[] derivedTypes = this.types[unannotatedWildcard.id]; // by construction, cachedInfo != null now.
int i, length = derivedTypes.length;
-
+
/* Search backwards looking at recent captures, if we encounter a capture from a different compilation unit, this is a fresh uninterned capture.
- While compiling one file, we may reach into another file to build structure, we should not compile method bodies there, so we expect to see
+ While compiling one file, we may reach into another file to build structure, we should not compile method bodies there, so we expect to see
all captures from the same file together without being interleaved by captures from other files.
*/
int nullSlot = length;
@@ -540,7 +540,7 @@ public class TypeSystem {
break;
}
TypeBinding derivedType = derivedTypes[i];
- if (derivedType == null) {
+ if (derivedType == null) {
nullSlot = i;
continue;
}
@@ -555,7 +555,7 @@ public class TypeSystem {
continue;
return prior;
}
-
+
if (i == length) {
System.arraycopy(derivedTypes, 0, derivedTypes = new TypeBinding[length * 2], 0, length);
this.types[unannotatedWildcard.id] = derivedTypes;
@@ -563,7 +563,7 @@ public class TypeSystem {
return (CaptureBinding) (derivedTypes[i] = new CaptureBinding(wildcard, contextType, start, end, cud, id));
// the above constructor already registers the capture, don't repeat that here
}
-
+
public WildcardBinding getWildcard(ReferenceBinding genericType, int rank, TypeBinding bound, TypeBinding[] otherBounds, int boundKind, AnnotationBinding[] annotations) {
return getWildcard(genericType, rank, bound, otherBounds, boundKind);
}
@@ -571,16 +571,16 @@ public class TypeSystem {
public TypeBinding getAnnotatedType(TypeBinding type, AnnotationBinding[][] annotations) {
return type; // Nothing to do for plain vanilla type system.
}
-
+
protected final TypeBinding /* @NonNull */ [] getDerivedTypes(TypeBinding keyType) {
keyType = getUnannotatedType(keyType);
return this.types[keyType.id];
}
-
+
private TypeBinding cacheDerivedType(TypeBinding keyType, TypeBinding derivedType) {
if (keyType == null || derivedType == null || keyType.id == TypeIds.NoId)
throw new IllegalStateException();
-
+
TypeBinding[] derivedTypes = this.types[keyType.id];
// binary search for the *earliest* slot with a null reference. By design and construction, a null value will never be followed by a valid derived type.
int first, last,length = derivedTypes.length;
@@ -591,7 +591,7 @@ public class TypeSystem {
if (i == first || i > 0 && derivedTypes[i - 1] != null)
break;
last = i - 1;
- } else {
+ } else {
first = i + 1;
}
i = (first + last) / 2;
@@ -602,19 +602,19 @@ public class TypeSystem {
}
return derivedTypes[i] = derivedType;
}
-
+
protected final TypeBinding cacheDerivedType(TypeBinding keyType, TypeBinding nakedType, TypeBinding derivedType) {
-
+
/* Cache the derived type, tagging it as a derivative of both the key type and the naked type.
E.g: int @NonNull [] would be tagged as a derived type of both int and int []. This is not
needed for correctness, but for annotated object reuse. We provide two alternate ways to
- annotate a type:
-
+ annotate a type:
+
Taking parameterized types as an example, a call to getParamaterizedType can be made with annotations
to create @NonNull List<@NonNull String> in one stroke. Or a parameterized type can be created first
and then annotated via getAnnotatedType. In the former case, the tables get looked up with List as
the key, in the latter with List<String> as the key.
-
+
Binary vs source, substitutions, annotation re-attribution from SE7 locations etc trigger these
alternate code paths. Unless care is exercised, we will end up with duplicate objects (that share
the same TypeBinding.id => correctness is not an issue, but memory wastage is)
@@ -625,16 +625,16 @@ public class TypeSystem {
}
return derivedType;
}
-
+
/* Return a unique annotation binding for an annotation with either no or all default element-value pairs.
- We may return a resolved annotation when requested for unresolved one, but not vice versa.
+ We may return a resolved annotation when requested for unresolved one, but not vice versa.
*/
public final AnnotationBinding getAnnotationType(ReferenceBinding annotationType, boolean requiredResolved) {
AnnotationBinding annotation = (AnnotationBinding) this.annotationTypes.get(annotationType);
if (annotation == null) {
if (requiredResolved)
annotation = new AnnotationBinding(annotationType, Binding.NO_ELEMENT_VALUE_PAIRS);
- else
+ else
annotation = new UnresolvedAnnotationBinding(annotationType, Binding.NO_ELEMENT_VALUE_PAIRS, this.environment);
this.annotationTypes.put(annotationType, annotation);
}
@@ -664,7 +664,7 @@ public class TypeSystem {
this.types = new TypeBinding[TypeIds.T_LastWellKnownTypeId * 2][];
this.parameterizedTypes = new HashedParameterizedTypes();
}
-
+
public void updateCaches(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType) {
final int unresolvedTypeId = unresolvedType.id;
if (resolvedType.id != TypeIds.NoId) {
@@ -701,13 +701,13 @@ public class TypeSystem {
TypeBinding keyType = intersectingTypes[0];
if (keyType == null || intersectingTypesLength == 1)
return keyType;
-
+
TypeBinding[] derivedTypes = getDerivedTypes(keyType);
int i, length = derivedTypes.length;
next:
for (i = 0; i < length; i++) {
TypeBinding derivedType = derivedTypes[i];
- if (derivedType == null)
+ if (derivedType == null)
break;
if (!derivedType.isIntersectionType18())
continue;
@@ -717,12 +717,12 @@ public class TypeSystem {
for (int j = 0; j < intersectingTypesLength; j++) {
if (intersectingTypes[j] != priorIntersectingTypes[j]) //$IDENTITY-COMPARISON$
continue next;
- }
+ }
return derivedType;
}
return cacheDerivedType(keyType, new IntersectionTypeBinding18(intersectingTypes, this.environment));
}
-
+
/**
* If a TVB was created with a dummy declaring element and needs to be fixed now,
* make sure that this update affects all early clones, too.
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java
index 1ac075359..7aaa42309 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Technical University Berlin - extended API and implementation
@@ -80,7 +80,7 @@ public class TypeVariableBinding extends ReferenceBinding {
// actual resolved variable supertypes (if no superclass bound, then associated to Object)
public ReferenceBinding superclass; // MUST NOT be modified directly, use setter !
public ReferenceBinding[] superInterfaces; // MUST NOT be modified directly, use setter !
-//{ObjectTeams: additions:
+//{ObjectTeams: additions:
// bound in <B base R>:
public ReferenceBinding roletype;
// anchor in C<R<@t ..>>:
@@ -88,7 +88,7 @@ public class TypeVariableBinding extends ReferenceBinding {
// SH}
public char[] genericTypeSignature;
LookupEnvironment environment;
-
+
public TypeVariableBinding(char[] sourceName, Binding declaringElement, int rank, LookupEnvironment environment) {
this.sourceName = sourceName;
this.declaringElement = declaringElement;
@@ -99,7 +99,7 @@ public class TypeVariableBinding extends ReferenceBinding {
this.typeBits = TypeIds.BitUninitialized;
computeId(environment);
}
-
+
// for subclass CaptureBinding
protected TypeVariableBinding(char[] sourceName, LookupEnvironment environment) {
this.sourceName = sourceName;
@@ -314,7 +314,7 @@ public class TypeVariableBinding extends ReferenceBinding {
}
// check value-dependent type-variable:
if (this.anchors != null && substitution != null) {
- ITeamAnchor anchor = substitution.substituteAnchor(this.anchors[0], 0); // TODO(SH): support multiple anchors
+ ITeamAnchor anchor = substitution.substituteAnchor(this.anchors[0], 0); // TODO(SH): support multiple anchors
if (anchor != null) {
if (!(argumentType instanceof DependentTypeBinding)) {
return BoundCheckStatus.MISMATCH;
@@ -517,7 +517,7 @@ public class TypeVariableBinding extends ReferenceBinding {
}
return this.superclass.constantPoolName(); // java/lang/Object
}
-
+
@Override
public TypeBinding clone(TypeBinding enclosingType) {
return new TypeVariableBinding(this);
@@ -699,7 +699,7 @@ public class TypeVariableBinding extends ReferenceBinding {
// to prevent infinite recursion when inspecting recursive generics:
boolean inRecursiveFunction = false;
-
+
@Override
public boolean enterRecursiveFunction() {
if (this.inRecursiveFunction)
@@ -714,7 +714,7 @@ public class TypeVariableBinding extends ReferenceBinding {
// to prevent infinite recursion when inspecting recursive generics:
boolean inRecursiveProjectionFunction = false;
-
+
public boolean enterRecursiveProjectionFunction() {
if (this.inRecursiveProjectionFunction)
return false;
@@ -730,7 +730,7 @@ public class TypeVariableBinding extends ReferenceBinding {
// handle recursive calls:
if (this.inRecursiveFunction) // be optimistic, since this node is not an inference variable
return true;
-
+
this.inRecursiveFunction = true;
try {
if (this.superclass != null && !this.superclass.isProperType(admitCapture18)) {
@@ -825,7 +825,7 @@ public class TypeVariableBinding extends ReferenceBinding {
public int kind() {
return Binding.TYPE_PARAMETER;
}
-
+
@Override
public boolean mentionsAny(TypeBinding[] parameters, int idx) {
if (this.inRecursiveFunction)
@@ -910,7 +910,7 @@ public class TypeVariableBinding extends ReferenceBinding {
return this;
long nullTagBits = this.tagBits & TagBits.AnnotationNullMASK;
-
+
TypeBinding oldSuperclass = this.superclass, oldFirstInterface = null;
if (this.superclass != null) {
ReferenceBinding resolveType = (ReferenceBinding) BinaryTypeBinding.resolveType(this.superclass, this.environment, true /* raw conversion */);
@@ -961,7 +961,7 @@ public class TypeVariableBinding extends ReferenceBinding {
this.modifiers &= ~ExtraCompilerModifiers.AccUnresolved;
return this;
}
-
+
@Override
public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
if (getClass() == TypeVariableBinding.class) {
@@ -985,12 +985,12 @@ public class TypeVariableBinding extends ReferenceBinding {
public ReferenceBinding superclass() {
return this.superclass;
}
-
+
@Override
public ReferenceBinding[] superInterfaces() {
return this.superInterfaces;
}
-
+
/**
* @see java.lang.Object#toString()
*/
@@ -1090,7 +1090,7 @@ public class TypeVariableBinding extends ReferenceBinding {
AnnotationBinding[] newAnnotations = this.environment.filterNullTypeAnnotations(this.typeAnnotations);
if (newAnnotations.length > 0)
return this.environment.createAnnotatedType(unannotated, newAnnotations);
- return unannotated;
+ return unannotated;
}
/**
* Upper bound doesn't perform erasure
@@ -1127,7 +1127,7 @@ public class TypeVariableBinding extends ReferenceBinding {
this.firstBound = nullMismatchOnBound(parameter, this.firstBound, superNullTagBits, nullTagBits, scope);
}
}
- }
+ }
ReferenceBinding[] interfaces = this.superInterfaces;
int length;
if (interfaces != null && (length = interfaces.length) != 0) {
@@ -1279,9 +1279,9 @@ public class TypeVariableBinding extends ReferenceBinding {
@Override
public boolean isFreeTypeVariable() {
- return this.environment.usesNullTypeAnnotations()
- && this.environment.globalOptions.pessimisticNullAnalysisForFreeTypeVariablesEnabled
- && (this.tagBits & TagBits.AnnotationNullMASK) == 0;
+ return this.environment.usesNullTypeAnnotations()
+ && this.environment.globalOptions.pessimisticNullAnalysisForFreeTypeVariablesEnabled
+ && (this.tagBits & TagBits.AnnotationNullMASK) == 0;
}
@Override
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/UnresolvedReferenceBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/UnresolvedReferenceBinding.java
index 953b9ad7d..bb1435a2a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/UnresolvedReferenceBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/UnresolvedReferenceBinding.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VariableBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VariableBinding.java
index c90d6e506..7ac3ad40c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VariableBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VariableBinding.java
@@ -67,9 +67,9 @@ public abstract class VariableBinding
public Constant constant() {
return this.constant;
}
-
+
/**
- * Call this variant during resolve / analyse, so we can handle the case
+ * Call this variant during resolve / analyse, so we can handle the case
* when a tentative lambda resolve triggers resolving of outside code.
*/
public Constant constant(Scope scope) {
@@ -91,7 +91,7 @@ public abstract class VariableBinding
public final boolean isFinal() {
return (this.modifiers & ClassFileConstants.AccFinal) != 0;
}
-
+
public final boolean isEffectivelyFinal() {
return (this.tagBits & TagBits.IsEffectivelyFinal) != 0;
}
@@ -99,14 +99,14 @@ public abstract class VariableBinding
/** Answer true if null annotations are enabled and this field is specified @NonNull */
public boolean isNonNull() {
return (this.tagBits & TagBits.AnnotationNonNull) != 0
- || (this.type != null
+ || (this.type != null
&& (this.type.tagBits & TagBits.AnnotationNonNull) != 0);
}
/** Answer true if null annotations are enabled and this field is specified @Nullable */
public boolean isNullable() {
return (this.tagBits & TagBits.AnnotationNullable) != 0
- || (this.type != null
+ || (this.type != null
&& (this.type.tagBits & TagBits.AnnotationNullable) != 0);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VoidTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VoidTypeBinding.java
index be4354b34..76d61ff2d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VoidTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VoidTypeBinding.java
@@ -21,17 +21,17 @@ public class VoidTypeBinding extends BaseTypeBinding {
VoidTypeBinding() {
super(TypeIds.T_void, TypeConstants.VOID, new char[] { 'V' });
}
-
+
@Override
public TypeBinding clone(TypeBinding enclosingType) {
return this; // enforce solitude.
}
-
+
@Override
public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
return; // reject misguided attempt.
}
-
+
@Override
public TypeBinding unannotated() {
return this;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java
index bcfb172e3..baf2a8b43 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Technical University Berlin - extended API and implementation
@@ -122,12 +122,12 @@ public class WildcardBinding extends ReferenceBinding {
TypeBinding bound() {
return this.bound;
}
-
+
@Override
int boundKind() {
return this.boundKind;
}
-
+
public TypeBinding allBounds() {
if (this.otherBounds == null || this.otherBounds.length == 0)
return this.bound;
@@ -140,8 +140,8 @@ public class WildcardBinding extends ReferenceBinding {
}
return this.environment.createIntersectionType18(allBounds);
}
-
-
+
+
@Override
public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
this.tagBits |= TagBits.HasTypeAnnotations;
@@ -258,17 +258,17 @@ public class WildcardBinding extends ReferenceBinding {
return nullTagBits;
}
-
+
@Override
public ReferenceBinding actualType() {
return this.genericType;
}
-
+
@Override
TypeBinding[] additionalBounds() {
return this.otherBounds;
}
-
+
@Override
public int kind() {
return this.otherBounds == null ? Binding.WILDCARD_TYPE : Binding.INTERSECTION_TYPE;
@@ -596,7 +596,7 @@ public class WildcardBinding extends ReferenceBinding {
public TypeBinding clone(TypeBinding immaterial) {
return new WildcardBinding(this.genericType, this.rank, this.bound, this.otherBounds, this.boundKind, this.environment);
}
-
+
@Override
public String annotatedDebugName() {
StringBuffer buffer = new StringBuffer(16);
@@ -689,7 +689,7 @@ public class WildcardBinding extends ReferenceBinding {
this.fPackage = someGenericType.getPackage();
}
if (someBound != null) {
- this.tagBits |= someBound.tagBits & (TagBits.HasTypeVariable | TagBits.HasMissingType | TagBits.ContainsNestedTypeReferences |
+ this.tagBits |= someBound.tagBits & (TagBits.HasTypeVariable | TagBits.HasMissingType | TagBits.ContainsNestedTypeReferences |
TagBits.HasNullTypeAnnotation | TagBits.HasCapturedWildcard);
}
if (someOtherBounds != null) {
@@ -824,7 +824,7 @@ public class WildcardBinding extends ReferenceBinding {
int rank() {
return this.rank;
}
-
+
@Override
public char[] readableName() {
switch (this.boundKind) {
@@ -1072,7 +1072,7 @@ public class WildcardBinding extends ReferenceBinding {
if (!hasNullTypeAnnotations())
return this;
AnnotationBinding[] newAnnotations = this.environment.filterNullTypeAnnotations(getTypeAnnotations());
- return this.environment.createWildcard(this.genericType, this.rank, this.bound, this.otherBounds, this.boundKind, newAnnotations);
+ return this.environment.createWildcard(this.genericType, this.rank, this.bound, this.otherBounds, this.boundKind, newAnnotations);
}
@Override
public TypeBinding uncapture(Scope scope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
index 29744073a..052dcee22 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
@@ -58,7 +58,7 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
public boolean reportProblems;
protected long complianceLevel;
protected long sourceLevel;
-
+
// Support for {@inheritDoc}
protected long [] inheritedPositions;
protected int inheritedPositionsPtr;
@@ -342,7 +342,7 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
}
refreshInlineTagPosition(previousPosition);
}
- if (!isFormatterParser && !considerTagAsPlainText)
+ if (!isFormatterParser && !considerTagAsPlainText)
this.textStart = this.index;
setInlineTagStarted(false);
} else {
@@ -1097,7 +1097,7 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
case TerminalTokens.TokenNameRestrictedIdentifierYield:
throw new InvalidInputException(); // unexpected.
-
+
case TerminalTokens.TokenNameDOT :
if ((iToken & 1) == 0) { // dots must be even tokens
throw new InvalidInputException();
@@ -1603,7 +1603,7 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
}
this.inheritedPositions[this.inheritedPositionsPtr++] = position;
}
-
+
/*
* Refresh start position and length of an inline tag.
*/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ConflictedParser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ConflictedParser.java
index 8452b9869..a4d973657 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ConflictedParser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ConflictedParser.java
@@ -14,7 +14,7 @@
package org.eclipse.jdt.internal.compiler.parser;
public interface ConflictedParser {
-
+
/* Return true if at the configuration the parser finds itself in, token would need to be disambiguated.
At Java SE 8 time, we have three tokens that need to clarified: the use of '( and that of '<' and finally
whether an @ begins a SE8 style type annotation or a SE5 declaration annotation. Where they can co-exist,
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java
index 065d6678d..a41587237 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java
@@ -63,7 +63,7 @@ public class JavadocParser extends AbstractCommentParser {
// returns whether this JavadocParser should report errors or not (overrides reportProblems)
// see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=192449"
public boolean shouldReportProblems = true;
-
+
// flag to let the parser know that the current tag is waiting for a description
// see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=222900"
private int tagWaitingForDescription;
@@ -485,7 +485,7 @@ public class JavadocParser extends AbstractCommentParser {
}
break;
}
-
+
// Read tag name
char[] tagName = new char[32];
int length = 0;
@@ -633,7 +633,7 @@ public class JavadocParser extends AbstractCommentParser {
this.tagValue = TAG_LINKPLAIN_VALUE;
if (this.inlineTagStarted) {
valid = parseReference();
- }
+ }
} else if (length == TAG_LITERAL_LENGTH && this.inlineTagStarted && CharOperation.equals(TAG_LITERAL, tagName, 0, length)) {
this.tagValue = TAG_LITERAL_VALUE;
this.tagWaitingForDescription = this.tagValue;
@@ -1030,7 +1030,7 @@ public class JavadocParser extends AbstractCommentParser {
// Set positions
if (this.inheritedPositions != null && this.inheritedPositionsPtr != this.inheritedPositions.length) {
// Compact array by shrinking.
- System.arraycopy(this.inheritedPositions, 0,
+ System.arraycopy(this.inheritedPositions, 0,
this.inheritedPositions = new long[this.inheritedPositionsPtr], 0, this.inheritedPositionsPtr);
}
this.docComment.inheritedPositions = this.inheritedPositions;
@@ -1050,13 +1050,13 @@ public class JavadocParser extends AbstractCommentParser {
this.docComment.usesReferences = this.usesReferencesPtr >= 0 ? new IJavadocTypeReference[this.usesReferencesPtr+1] : NO_QUALIFIED_TYPE_REFERENCE;
for (int i = 0; i <= this.usesReferencesPtr; ++i) {
TypeReference ref = this.usesReferencesStack[i];
- this.docComment.usesReferences[i] = (IJavadocTypeReference)ref;
+ this.docComment.usesReferences[i] = (IJavadocTypeReference)ref;
}
this.docComment.providesReferences = this.providesReferencesPtr >= 0 ? new IJavadocTypeReference[this.providesReferencesPtr+1] : NO_QUALIFIED_TYPE_REFERENCE;
for (int i = 0; i <= this.providesReferencesPtr; ++i) {
TypeReference ref = this.providesReferencesStack[i];
- this.docComment.providesReferences[i] = (IJavadocTypeReference)ref;
+ this.docComment.providesReferences[i] = (IJavadocTypeReference)ref;
}
// If no nodes stored return
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java
index 7446d5b54..c41aa2b2b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java
@@ -118,7 +118,7 @@ public interface JavadocTagConstants {
public static final int TAG_IMPL_SPEC_VALUE = 28;
public static final int TAG_IMPL_NOTE_VALUE = 29;
public static final int TAG_OTHERS_VALUE = 100;
-
+
//{ObjectTeams: role tag
public static final char[] TAG_ROLE = "role".toCharArray(); //$NON-NLS-1$
public static final int TAG_ROLE_LENGTH = TAG_ROLE.length;
@@ -363,8 +363,8 @@ public interface JavadocTagConstants {
TAG_INDEX,
TAG_HIDDEN,
TAG_SUMMARY,
- TAG_API_NOTE,
- TAG_IMPL_SPEC,
+ TAG_API_NOTE,
+ TAG_IMPL_SPEC,
TAG_IMPL_NOTE,
};
public static final char[][] METHOD_TAGS = {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
index a56458fb8..abad7a57f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
@@ -13,7 +13,7 @@
* Tom Tromey - patch for readTable(String) as described in http://bugs.eclipse.org/bugs/show_bug.cgi?id=32196
* Fraunhofer FIRST - extended API and implementation
* Technical University Berlin - extended API and implementation
- * Stephan Herrmann - Contributions for
+ * Stephan Herrmann - Contributions for
* bug 366003 - CCE in ASTNode.resolveAnnotations(ASTNode.java:639)
* bug 374605 - Unreasonable warning for enum-based switch statements
* bug 393719 - [compiler] inconsistent warnings on iteration variables
@@ -97,12 +97,12 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.TypeAnalyzer;
*/
@SuppressWarnings({"rawtypes", "unchecked"})
public class Parser implements TerminalTokens, ParserBasicInformation, ConflictedParser, OperatorIds, TypeIds {
-
+
protected static final int THIS_CALL = ExplicitConstructorCall.This;
protected static final int SUPER_CALL = ExplicitConstructorCall.Super;
public static final char[] FALL_THROUGH_TAG = "$FALL-THROUGH$".toCharArray(); //$NON-NLS-1$
public static final char[] CASES_OMITTED_TAG = "$CASES-OMITTED$".toCharArray(); //$NON-NLS-1$
-
+
//{ObjectTeams: new constants for tsuper
protected static final int TSUPER_CALL = ExplicitConstructorCall.Tsuper;
protected static final int UNQUALIFIED = 0;
@@ -177,18 +177,18 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
private static final String UNEXPECTED_EOF = "Unexpected End Of File" ; //$NON-NLS-1$
public static boolean VERBOSE_RECOVERY = false;
-
+
private static enum LocalTypeKind {
LOCAL,
METHOD_REFERENCE,
LAMBDA,
}
-
+
// resumeOnSyntaxError codes:
protected static final int HALT = 0; // halt and throw up hands.
protected static final int RESTART = 1; // stacks adjusted, alternate goal from check point.
protected static final int RESUME = 2; // stacks untouched, just continue from where left off.
-
+
public Scanner scanner;
public int currentToken;
@@ -200,7 +200,7 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
}
}
public static int asi(int state) {
-
+
return asb[original_state(state)];
}
public final static short base_check(int i) {
@@ -231,9 +231,9 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
String file,
int length,
String[] tokens) {
-
+
byte[] result = new byte[length * 8];
-
+
for (int i = 0; i < tokens.length; i = i + 3) {
if("2".equals(tokens[i])) { //$NON-NLS-1$
int index = Integer.parseInt(tokens[i + 1]);
@@ -264,7 +264,7 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
} else if("recovery".equals(token)) { //$NON-NLS-1$
compliance = ClassFileConstants.JDK_DEFERRED;
}
-
+
int j = index * 8;
result[j] = (byte)(compliance >>> 56);
result[j + 1] = (byte)(compliance >>> 48);
@@ -276,22 +276,22 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
result[j + 7] = (byte)(compliance);
}
}
-
+
buildFileForTable(file, result);
}
private final static String[] buildFileForName(String filename, String contents) {
String[] result = new String[contents.length()];
result[0] = null;
int resultCount = 1;
-
+
StringBuffer buffer = new StringBuffer();
-
+
int start = contents.indexOf("name[]"); //$NON-NLS-1$
start = contents.indexOf('\"', start);
int end = contents.indexOf("};", start); //$NON-NLS-1$
-
+
contents = contents.substring(start, end);
-
+
boolean addLineSeparator = false;
int tokenStart = -1;
StringBuffer currentToken = new StringBuffer();
@@ -325,9 +325,9 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
if(currentToken.length() > 0) {
result[resultCount++] = currentToken.toString();
}
-
+
buildFileForTable(filename, buffer.toString().toCharArray());
-
+
System.arraycopy(result, 0, result = new String[resultCount], 0, resultCount);
return result;
}
@@ -337,11 +337,11 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
char[] newNonTerminalIndex,
String[] newName,
String[] tokens) {
-
+
ArrayList entries = new ArrayList();
-
+
boolean[] alreadyAdded = new boolean[newName.length];
-
+
for (int i = 0; i < tokens.length; i = i + 3) {
if("1".equals(tokens[i])) { //$NON-NLS-1$
int index = newNonTerminalIndex[newLhs[Integer.parseInt(tokens[i + 1])]];
@@ -391,7 +391,7 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
bytes[2 * i] = (byte) (chars[i] >>> 8);
bytes[2 * i + 1] = (byte) (chars[i] & 0xFF);
}
-
+
java.io.FileOutputStream stream = null;
try {
stream = new java.io.FileOutputStream(filename);
@@ -410,14 +410,14 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
System.out.println(filename + " creation complete"); //$NON-NLS-1$
}
private final static byte[] buildFileOfByteFor(String filename, String tag, String[] tokens) {
-
+
//transform the String tokens into chars before dumping then into file
-
+
int i = 0;
//read upto the tag
while (!tokens[i++].equals(tag)){/*empty*/}
//read upto the }
-
+
byte[] bytes = new byte[tokens.length]; //can't be bigger
int ic = 0;
String token;
@@ -425,22 +425,22 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
int c = Integer.parseInt(token);
bytes[ic++] = (byte) c;
}
-
+
//resize
System.arraycopy(bytes, 0, bytes = new byte[ic], 0, ic);
-
+
buildFileForTable(filename, bytes);
return bytes;
}
private final static char[] buildFileOfIntFor(String filename, String tag, String[] tokens) {
-
+
//transform the String tokens into chars before dumping then into file
-
+
int i = 0;
//read upto the tag
while (!tokens[i++].equals(tag)){/*empty*/}
//read upto the }
-
+
char[] chars = new char[tokens.length]; //can't be bigger
int ic = 0;
String token;
@@ -448,22 +448,22 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
int c = Integer.parseInt(token);
chars[ic++] = (char) c;
}
-
+
//resize
System.arraycopy(chars, 0, chars = new char[ic], 0, ic);
-
+
buildFileForTable(filename, chars);
return chars;
}
private final static void buildFileOfShortFor(String filename, String tag, String[] tokens) {
-
+
//transform the String tokens into chars before dumping then into file
-
+
int i = 0;
//read upto the tag
while (!tokens[i++].equals(tag)){/*empty*/}
//read upto the }
-
+
char[] chars = new char[tokens.length]; //can't be bigger
int ic = 0;
String token;
@@ -471,10 +471,10 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
int c = Integer.parseInt(token);
chars[ic++] = (char) (c + 32768);
}
-
+
//resize
System.arraycopy(chars, 0, chars = new char[ic], 0, ic);
-
+
buildFileForTable(filename, chars);
}
private static void buildFilesForRecoveryTemplates(
@@ -485,13 +485,13 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
String[] newName,
char[] newLhs,
String[] tokens) {
-
+
int[] newReverse = computeReverseTable(newTerminalIndex, newNonTerminalIndex, newName);
-
+
char[] newRecoveyTemplatesIndex = new char[newNonTerminalIndex.length];
char[] newRecoveyTemplates = new char[newNonTerminalIndex.length];
int newRecoveyTemplatesPtr = 0;
-
+
for (int i = 0; i < tokens.length; i = i + 3) {
if("3".equals(tokens[i])) { //$NON-NLS-1$
int length = newRecoveyTemplates.length;
@@ -499,11 +499,11 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
System.arraycopy(newRecoveyTemplates, 0, newRecoveyTemplates = new char[length * 2], 0, length);
}
newRecoveyTemplates[newRecoveyTemplatesPtr++] = 0;
-
+
int index = newLhs[Integer.parseInt(tokens[i + 1])];
-
+
newRecoveyTemplatesIndex[index] = (char)newRecoveyTemplatesPtr;
-
+
String token = tokens[i + 2].trim();
java.util.StringTokenizer st = new java.util.StringTokenizer(token, " "); //$NON-NLS-1$
String[] terminalNames = new String[st.countTokens()];
@@ -511,7 +511,7 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
while (st.hasMoreTokens()) {
terminalNames[t++] = st.nextToken();
}
-
+
for (int j = 0; j < terminalNames.length; j++) {
int symbol = getSymbol(terminalNames[j], newName, newReverse);
if(symbol > -1) {
@@ -526,7 +526,7 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
}
newRecoveyTemplates[newRecoveyTemplatesPtr++] = 0;
System.arraycopy(newRecoveyTemplates, 0, newRecoveyTemplates = new char[newRecoveyTemplatesPtr], 0, newRecoveyTemplatesPtr);
-
+
buildFileForTable(indexFilename, newRecoveyTemplatesIndex);
buildFileForTable(templatesFilename, newRecoveyTemplates);
}
@@ -535,25 +535,25 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
char[] newNonTerminalIndex,
char[] newLhs,
String[] tokens) {
-
+
char[] newStatementsRecoveryFilter = new char[newNonTerminalIndex.length];
-
+
for (int i = 0; i < tokens.length; i = i + 3) {
if("4".equals(tokens[i])) { //$NON-NLS-1$
int index = newLhs[Integer.parseInt(tokens[i + 1])];
-
+
newStatementsRecoveryFilter[index] = 1;
}
}
buildFileForTable(filename, newStatementsRecoveryFilter);
}
public final static void buildFilesFromLPG(String dataFilename, String dataFilename2) {
-
+
//RUN THIS METHOD TO GENERATE PARSER*.RSC FILES
-
+
//build from the lpg javadcl.java files that represents the parser tables
//lhs check_table asb asr symbol_index
-
+
//[org.eclipse.jdt.internal.compiler.parser.Parser.buildFilesFromLPG("d:/leapfrog/grammar/javadcl.java")]
char[] contents = CharOperation.NO_CHAR;
try {
@@ -571,7 +571,7 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
}
final String prefix = FILEPREFIX;
int i = 0;
-
+
char[] newLhs = buildFileOfIntFor(prefix + (++i) + ".rsc", "lhs", tokens); //$NON-NLS-1$ //$NON-NLS-2$
buildFileOfShortFor(prefix + (++i) + ".rsc", "check_table", tokens); //$NON-NLS-2$ //$NON-NLS-1$
buildFileOfIntFor(prefix + (++i) + ".rsc", "asb", tokens); //$NON-NLS-2$ //$NON-NLS-1$
@@ -581,7 +581,7 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
char[] newTerminalIndex = buildFileOfIntFor(prefix + (++i) + ".rsc", "terminal_index", tokens); //$NON-NLS-2$ //$NON-NLS-1$
char[] newNonTerminalIndex = buildFileOfIntFor(prefix + (++i) + ".rsc", "non_terminal_index", tokens); //$NON-NLS-1$ //$NON-NLS-2$
buildFileOfIntFor(prefix + (++i) + ".rsc", "term_action", tokens); //$NON-NLS-2$ //$NON-NLS-1$
-
+
buildFileOfIntFor(prefix + (++i) + ".rsc", "scope_prefix", tokens); //$NON-NLS-2$ //$NON-NLS-1$
buildFileOfIntFor(prefix + (++i) + ".rsc", "scope_suffix", tokens); //$NON-NLS-2$ //$NON-NLS-1$
buildFileOfIntFor(prefix + (++i) + ".rsc", "scope_lhs", tokens); //$NON-NLS-2$ //$NON-NLS-1$
@@ -589,7 +589,7 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
buildFileOfIntFor(prefix + (++i) + ".rsc", "scope_rhs", tokens); //$NON-NLS-2$ //$NON-NLS-1$
buildFileOfIntFor(prefix + (++i) + ".rsc", "scope_state", tokens); //$NON-NLS-2$ //$NON-NLS-1$
buildFileOfIntFor(prefix + (++i) + ".rsc", "in_symb", tokens); //$NON-NLS-2$ //$NON-NLS-1$
-
+
//{ObjectTeams: changed byte to char to support larger grammar:
/* orig:
byte[] newRhs = buildFileOfByteFor(prefix + (++i) + ".rsc", "rhs", tokens); //$NON-NLS-2$ //$NON-NLS-1$
@@ -598,9 +598,9 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
// SH}
buildFileOfIntFor(prefix + (++i) + ".rsc", "term_check", tokens); //$NON-NLS-2$ //$NON-NLS-1$
buildFileOfIntFor(prefix + (++i) + ".rsc", "scope_la", tokens); //$NON-NLS-2$ //$NON-NLS-1$
-
+
String[] newName = buildFileForName(prefix + (++i) + ".rsc", new String(contents)); //$NON-NLS-1$
-
+
contents = CharOperation.NO_CHAR;
try {
contents = Util.getFileCharContent(new File(dataFilename2), null);
@@ -614,10 +614,10 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
while (st.hasMoreTokens()) {
tokens[j++] = st.nextToken();
}
-
+
buildFileForCompliance(prefix + (++i) + ".rsc", newRhs.length, tokens);//$NON-NLS-1$
buildFileForReadableName(READABLE_NAMES_FILE+".props", newLhs, newNonTerminalIndex, newName, tokens);//$NON-NLS-1$
-
+
buildFilesForRecoveryTemplates(
prefix + (++i) + ".rsc", //$NON-NLS-1$
prefix + (++i) + ".rsc", //$NON-NLS-1$
@@ -626,14 +626,14 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
newName,
newLhs,
tokens);
-
+
buildFilesForStatementsRecoveryFilter(
prefix + (++i) + ".rsc", //$NON-NLS-1$
newNonTerminalIndex,
newLhs,
tokens);
-
-
+
+
System.out.println(Messages.parser_moveFiles);
}
protected static int[] computeReverseTable(char[] newTerminalIndex, char[] newNonTerminalIndex, String[] newName) {
@@ -669,7 +669,7 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
return in_symb[original_state(state)];
}
public final static void initTables() throws java.io.IOException {
-
+
final String prefix = FILEPREFIX;
int i = 0;
lhs = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
@@ -685,7 +685,7 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
terminal_index = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
non_terminal_index = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
term_action = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
-
+
scope_prefix = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
scope_suffix = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
scope_lhs = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
@@ -693,7 +693,7 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
scope_rhs = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
scope_state = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
in_symb = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
-
+
//{ObjectTeams: changed byte to char to support larger grammar:
/* orig:
rhs = readByteTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
@@ -702,20 +702,20 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
// SH}
term_check = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
scope_la = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
-
+
name = readNameTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
-
+
rules_compliance = readLongTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
-
+
readableName = readReadableNameTable(READABLE_NAMES_FILE + ".props"); //$NON-NLS-1$
-
+
reverse_index = computeReverseTable(terminal_index, non_terminal_index, name);
-
+
recovery_templates_index = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
recovery_templates = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
-
+
statements_recovery_filter = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
-
+
base_action = lhs;
}
public static int nasi(int state) {
@@ -729,9 +729,9 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
}
protected static byte[] readByteTable(String filename) throws java.io.IOException {
-
+
//files are located at Parser.class directory
-
+
InputStream stream = Parser.class.getResourceAsStream(filename);
if (stream == null) {
throw new java.io.IOException(Messages.bind(Messages.parser_missingFile, filename));
@@ -750,9 +750,9 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
return bytes;
}
protected static long[] readLongTable(String filename) throws java.io.IOException {
-
+
//files are located at Parser.class directory
-
+
InputStream stream = Parser.class.getResourceAsStream(filename);
if (stream == null) {
throw new java.io.IOException(Messages.bind(Messages.parser_missingFile, filename));
@@ -768,17 +768,17 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
// ignore
}
}
-
+
//minimal integrity check (even size expected)
int length = bytes.length;
if (length % 8 != 0)
throw new java.io.IOException(Messages.bind(Messages.parser_corruptedFile, filename));
-
+
// convert bytes into longs
long[] longs = new long[length / 8];
int i = 0;
int longIndex = 0;
-
+
while (true) {
longs[longIndex++] =
(((long) (bytes[i++] & 0xFF)) << 56)
@@ -789,7 +789,7 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
+ (((long) (bytes[i++] & 0xFF)) << 16)
+ (((long) (bytes[i++] & 0xFF)) << 8)
+ (bytes[i++] & 0xFF);
-
+
if (i == length)
break;
}
@@ -799,18 +799,18 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
protected static String[] readNameTable(String filename) throws java.io.IOException {
char[] contents = readTable(filename);
char[][] nameAsChar = CharOperation.splitOn('\n', contents);
-
+
String[] result = new String[nameAsChar.length + 1];
result[0] = null;
for (int i = 0; i < nameAsChar.length; i++) {
result[i + 1] = new String(nameAsChar[i]);
}
-
+
return result;
}
protected static String[] readReadableNameTable(String filename){
String[] result = new String[name.length];
-
+
InputStream is = Parser.class.getResourceAsStream(filename);
Properties props = new Properties();
try {
@@ -833,9 +833,9 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
return result;
}
protected static char[] readTable(String filename) throws java.io.IOException {
-
+
//files are located at Parser.class directory
-
+
InputStream stream = Parser.class.getResourceAsStream(filename);
if (stream == null) {
throw new java.io.IOException(Messages.bind(Messages.parser_missingFile, filename));
@@ -851,17 +851,17 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
// ignore
}
}
-
+
//minimal integrity check (even size expected)
int length = bytes.length;
if ((length & 1) != 0)
throw new java.io.IOException(Messages.bind(Messages.parser_corruptedFile, filename));
-
+
// convert bytes into chars
char[] chars = new char[length / 2];
int i = 0;
int charIndex = 0;
-
+
while (true) {
chars[charIndex++] = (char) (((bytes[i++] & 0xFF) << 8) + (bytes[i++] & 0xFF));
if (i == length)
@@ -895,7 +895,7 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
protected RecoveredElement currentElement;
-
+
protected boolean diet = false; //tells the scanner to jump over some parts of the code/expressions like method bodies
protected int dietInt = 0; // if > 0 force the none-diet-parsing mode (even if diet if requested) [field parsing with anonymous inner classes...]
protected int endPosition; //accurate only when used ! (the start position is pushed into intStack while the end the current one)
@@ -906,23 +906,23 @@ public class Parser implements TerminalTokens, ParserBasicInformation, Conflicte
protected Expression[] expressionStack = new Expression[ExpressionStackIncrement];
protected int rBracketPosition;
public int firstToken ; // handle for multiple parsing goals
-
+
/* jsr308 -- Type annotation management, we now maintain type annotations in a separate stack
as otherwise they get interspersed with other expressions and some of the code is not prepared
- to handle such interleaving and will look ugly if changed.
-
- See consumeArrayCreationExpressionWithoutInitializer for example.
+ to handle such interleaving and will look ugly if changed.
+
+ See consumeArrayCreationExpressionWithoutInitializer for example.
Where SE8 annotations occur in a place SE5 annotations are legal, the SE8 annotations end up in
the expression stack as we have no way of distinguishing between the two.
- */
+ */
protected int typeAnnotationPtr;
protected int typeAnnotationLengthPtr;
protected Annotation [] typeAnnotationStack = new Annotation[TypeAnnotationStackIncrement];
protected int [] typeAnnotationLengthStack;
// annotation stack
protected final static int TypeAnnotationStackIncrement = 100;
-
+
// generics management
protected int genericsIdentifiersLengthPtr;
protected int[] genericsIdentifiersLengthStack = new int[GenericsStackIncrement];
@@ -1118,7 +1118,7 @@ public RecoveredElement buildInitialRecoveryState(){
/* ignore current stack state, since restarting from the beginnning
since could not trust simple brace count */
// restart recovery from scratch
-//{ObjectTeams: do not discard package declaration if it should still be needed
+//{ObjectTeams: do not discard package declaration if it should still be needed
// for role file linking:
if ( (this.firstToken == TokenNamePLUS_PLUS) // compilation unit
|| (this.firstToken == TokenNameQUESTION)) // package declaration
@@ -1409,7 +1409,7 @@ protected void checkForDiamond(TypeReference allocType) {
type.bits |= ASTNode.IsDiamond;
} // else don't even bother to recognize this as <>
}
- }
+ }
else if (allocType instanceof ParameterizedQualifiedTypeReference) {
ParameterizedQualifiedTypeReference type = (ParameterizedQualifiedTypeReference) allocType;
if (type.typeArguments[type.typeArguments.length - 1] == TypeReference.NO_TYPE_ARGUMENTS) { // Don't care for X<>.Y<> and X<>.Y<String>
@@ -1516,7 +1516,7 @@ protected ParameterizedQualifiedTypeReference computeQualifiedGenericsFromRightS
}
nameSize--;
}
-
+
if ((typeRef.annotations = typeAnnotations) != null) {
typeRef.bits |= ASTNode.HasTypeAnnotations;
}
@@ -2767,7 +2767,7 @@ protected void consumeCalloutBindingLeft(boolean hasSignature) {
// CalloutKind
calloutBinding.calloutKind = this.intStack[this.intPtr--];
- calloutBinding.bindingTokenStart = this.intStack[this.intPtr--];
+ calloutBinding.bindingTokenStart = this.intStack[this.intPtr--];
if (calloutBinding.calloutKind == TokenNameBINDOUT) // as apposed to '=>'
this.intPtr--; // from Scanner.currentPosition for LE.arrowPosition
calloutBinding.modifierEnd = calloutBinding.bindingTokenStart+1; // assume just '->' or '=>', until we find actual callout modifiers (get/set)
@@ -2951,7 +2951,7 @@ private void checkIllegalModifierInMapping(AbstractMethodMappingDeclaration meth
/** Check for a callout modifier in this.modifiers.
* If one is found convert the method spec to a field spec.
*/
-private void checkCalloutModifier(CalloutMappingDeclaration calloutBinding)
+private void checkCalloutModifier(CalloutMappingDeclaration calloutBinding)
{
FieldAccessSpec fieldAccessSpec = null;
if ( this.modifiers == TokenNameget
@@ -2961,14 +2961,14 @@ private void checkCalloutModifier(CalloutMappingDeclaration calloutBinding)
MethodSpec baseMethodSpec = calloutBinding.baseMethodSpec;
fieldAccessSpec = newFieldAccessSpec(baseMethodSpec.selector,
(((long)baseMethodSpec.sourceStart)<<32)+baseMethodSpec.sourceEnd,
- null, // no type, since callout-short
+ null, // no type, since callout-short
this.modifiers);
calloutBinding.baseMethodSpec = fieldAccessSpec;
this.modifiers = 0;
} else if (calloutBinding.baseMethodSpec instanceof FieldAccessSpec) {
fieldAccessSpec = (FieldAccessSpec)calloutBinding.baseMethodSpec;
}
-
+
if (fieldAccessSpec != null) {
calloutBinding.modifierStart = this.intStack[this.intPtr--];
calloutBinding.modifierEnd = this.intStack[this.intPtr--];
@@ -3062,7 +3062,7 @@ protected void consumeCaseLabel() {
}
protected void consumeCastExpressionLL1() {
//CastExpression ::= '(' Name ')' InsideCastExpressionLL1 UnaryExpressionNotPlusMinus
-
+
//optimize push/pop
@@ -3102,7 +3102,7 @@ protected void consumeCastExpressionLL1WithBounds() {
}
protected void consumeCastExpressionWithGenericsArray() {
// CastExpression ::= PushLPAREN Name TypeArguments Dimsopt AdditionalBoundsListOpt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
-
+
TypeReference[] bounds = null;
int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
if (additionalBoundsLength > 0) {
@@ -3119,7 +3119,7 @@ protected void consumeCastExpressionWithGenericsArray() {
pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
if (additionalBoundsLength > 0) {
bounds[0] = getTypeReference(dim);
- castType = createIntersectionCastTypeReference(bounds);
+ castType = createIntersectionCastTypeReference(bounds);
} else {
castType = getTypeReference(dim);
}
@@ -3147,7 +3147,7 @@ protected void consumeCastExpressionWithNameArray() {
// handle type arguments
pushOnGenericsLengthStack(0);
pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
-
+
if (additionalBoundsLength > 0) {
bounds[0] = getTypeReference(this.intStack[this.intPtr--]);
castType = createIntersectionCastTypeReference(bounds);
@@ -3171,7 +3171,7 @@ protected void consumeCastExpressionWithPrimitiveType() {
this.genericsPtr -= additionalBoundsLength;
System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
}
-
+
//optimize the push/pop
Expression exp;
Expression cast;
@@ -3179,7 +3179,7 @@ protected void consumeCastExpressionWithPrimitiveType() {
int end = this.intStack[this.intPtr--];
if (additionalBoundsLength > 0) {
bounds[0] = getTypeReference(this.intStack[this.intPtr--]);
- castType = createIntersectionCastTypeReference(bounds);
+ castType = createIntersectionCastTypeReference(bounds);
} else {
castType = getTypeReference(this.intStack[this.intPtr--]);
}
@@ -3210,9 +3210,9 @@ protected void consumeCastExpressionWithQualifiedGenericsArray() {
if (additionalBoundsLength > 0) {
bounds[0] = castType;
- castType = createIntersectionCastTypeReference(bounds);
+ castType = createIntersectionCastTypeReference(bounds);
}
-
+
this.intPtr--;
this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType);
castType.sourceEnd = end - 1;
@@ -3248,7 +3248,7 @@ protected void consumeCatchFormalParameter() {
type.sourceEnd = this.endPosition;
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391092
if (type instanceof UnionTypeReference) {
- this.problemReporter().illegalArrayOfUnionType(identifierName, type);
+ this.problemReporter().illegalArrayOfUnionType(identifierName, type);
}
}
this.astLengthPtr--;
@@ -3651,7 +3651,7 @@ protected void consumeClassInstanceCreationExpressionQualified() {
QualifiedAllocationExpression qae =
(QualifiedAllocationExpression) this.expressionStack[this.expressionPtr];
-
+
if (qae.anonymousType == null) {
this.expressionLengthPtr--;
this.expressionPtr--;
@@ -3715,10 +3715,10 @@ protected void consumeClassInstanceCreationExpressionQualifiedWithTypeArguments(
checkForDiamond(allocationExpression.type);
}
}
-
+
QualifiedAllocationExpression qae =
(QualifiedAllocationExpression) this.expressionStack[this.expressionPtr];
-
+
if (qae.anonymousType == null) {
this.expressionLengthPtr--;
this.expressionPtr--;
@@ -4423,12 +4423,12 @@ protected void consumeEnterAnonymousClassBody(boolean qualified) {
0,
argumentLength);
}
-
+
if (qualified) {
this.expressionLengthPtr--;
alloc.enclosingInstance = this.expressionStack[this.expressionPtr--];
}
-
+
alloc.type = typeReference;
anonymousType.sourceEnd = alloc.sourceEnd;
@@ -4450,7 +4450,7 @@ protected void consumeEnterAnonymousClassBody(boolean qualified) {
if (!(this.currentElement instanceof RecoveredAnnotation)) {
if (isIndirectlyInsideLambdaExpression())
this.ignoreNextOpeningBrace = true;
- else
+ else
this.currentToken = 0; // opening brace already taken into account
} else {
this.ignoreNextOpeningBrace = true;
@@ -4501,7 +4501,7 @@ private boolean isAFieldDeclarationInRecord() {
return false;
}
} else if (node instanceof AbstractMethodDeclaration) {
- if (this.nestedType != nestingTypeAndMethod[0] ||
+ if (this.nestedType != nestingTypeAndMethod[0] ||
this.nestedMethod[this.nestedType] != nestingTypeAndMethod[1])
return false;
} else if (node instanceof FieldDeclaration) {
@@ -4596,7 +4596,7 @@ protected void consumeEnterVariable() {
declaration.type = extendedDimensions == 0 ? type : augmentTypeWithAdditionalDimensions(type, extendedDimensions, annotationsOnExtendedDimensions, false);
declaration.bits |= (type.bits & ASTNode.HasTypeAnnotations);
-
+
this.variablesCounter[this.nestedType]++;
pushOnAstStack(declaration);
// recovery
@@ -5354,7 +5354,7 @@ protected void consumeFormalParameter(boolean isVarArgs) {
varArgsAnnotations = new Annotation[length],
0,
length);
- }
+ }
}
//{ObjectTeams: LiftingTypeReference?
// Inserted via LiftingTypeopt, e.g.,:
@@ -5387,8 +5387,8 @@ protected void consumeFormalParameter(boolean isVarArgs) {
// SH}
if (isVarArgs || extendedDimensions != 0) {
if (isVarArgs) {
- type = augmentTypeWithAdditionalDimensions(type, 1, varArgsAnnotations != null ? new Annotation[][] { varArgsAnnotations } : null, true);
- }
+ type = augmentTypeWithAdditionalDimensions(type, 1, varArgsAnnotations != null ? new Annotation[][] { varArgsAnnotations } : null, true);
+ }
if (extendedDimensions != 0) {
type = augmentTypeWithAdditionalDimensions(type, extendedDimensions, annotationsOnExtendedDimensions, false);
}
@@ -5404,8 +5404,8 @@ protected void consumeFormalParameter(boolean isVarArgs) {
Argument arg;
if (isReceiver) {
arg = new Receiver(
- identifierName,
- namePositions,
+ identifierName,
+ namePositions,
type,
qualifyingNameReference,
this.intStack[this.intPtr--] & ~ClassFileConstants.AccDeprecated);
@@ -5497,7 +5497,7 @@ protected void consumeGenericTypeWithDiamond() {
// zero type arguments == <>
pushOnGenericsLengthStack(-1);
concatGenericsLists();
- this.intPtr--; // pop the null dimension pushed in by consumeReferenceType, as we have no type between <>, getTypeReference won't kick in
+ this.intPtr--; // pop the null dimension pushed in by consumeReferenceType, as we have no type between <>, getTypeReference won't kick in
}
protected void consumeImportDeclaration() {
// SingleTypeImportDeclaration ::= SingleTypeImportDeclarationName ';'
@@ -5539,7 +5539,7 @@ protected void consumeInsideCastExpressionLL1WithBounds() {
pushOnGenericsLengthStack(0); // handle type arguments
pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
bounds[0] = getTypeReference(0);
-
+
for (int i = 0; i <= additionalBoundsLength; i++) {
pushOnExpressionStack(bounds[i]);
if (i > 0)
@@ -5645,8 +5645,8 @@ protected void consumeInterfaceDeclaration() {
//convert constructor that do not have the type's name into methods
typeDecl.checkConstructors(this);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=212713,
+
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=212713,
// reject initializers that have been tolerated by the grammar.
FieldDeclaration [] fields = typeDecl.fields;
int fieldCount = fields == null ? 0 : fields.length;
@@ -5896,7 +5896,7 @@ protected void consumeInvalidInterfaceDeclaration() {
protected void consumeInterfaceMethodDeclaration(boolean hasSemicolonBody) {
// InterfaceMemberDeclaration ::= DefaultMethodHeader MethodBody
// InterfaceMemberDeclaration ::= MethodHeader MethodBody
- // -- the next rule is illegal but allows to give a more canonical error message from inside consumeInterfaceMethodDeclaration():
+ // -- the next rule is illegal but allows to give a more canonical error message from inside consumeInterfaceMethodDeclaration():
// InterfaceMemberDeclaration ::= DefaultMethodHeader ';'
@@ -5916,9 +5916,9 @@ protected void consumeInterfaceMethodDeclaration(boolean hasSemicolonBody) {
// pop the position of the { (body of the method) pushed in block decl
this.intPtr--;
this.intPtr--;
-
+
explicitDeclarations = this.realBlockStack[this.realBlockPtr--];
-
+
//statements
int length;
if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
@@ -5941,7 +5941,7 @@ protected void consumeInterfaceMethodDeclaration(boolean hasSemicolonBody) {
md.explicitDeclarations = explicitDeclarations;
md.bodyEnd = this.endPosition;
md.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
-
+
boolean isDefault = (md.modifiers & ExtraCompilerModifiers.AccDefaultMethod) != 0;
boolean isStatic = (md.modifiers & ClassFileConstants.AccStatic) != 0;
boolean isPrivate = (md.modifiers & ClassFileConstants.AccPrivate) != 0;
@@ -6040,13 +6040,13 @@ private void consumeBeginLiftingType() {
// SH}
protected void consumeLocalVariableDeclarationStatement() {
-
+
int variableDeclaratorsCounter = this.astLengthStack[this.astLengthPtr];
if (variableDeclaratorsCounter == 1) {
LocalDeclaration localDeclaration = (LocalDeclaration) this.astStack[this.astPtr];
if (localDeclaration.isRecoveredFromLoneIdentifier()) {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=430336, [1.8][compiler] Bad syntax error recovery: Lonely identifier should be variable name, not type
- // Mutate foo $missing; into foo = $missing$;
+ // Mutate foo $missing; into foo = $missing$;
Expression left;
if (localDeclaration.type instanceof QualifiedTypeReference) {
QualifiedTypeReference qtr = (QualifiedTypeReference) localDeclaration.type;
@@ -6056,17 +6056,17 @@ protected void consumeLocalVariableDeclarationStatement() {
}
left.sourceStart = localDeclaration.type.sourceStart;
left.sourceEnd = localDeclaration.type.sourceEnd;
-
+
Expression right = new SingleNameReference(localDeclaration.name, 0L);
right.sourceStart = localDeclaration.sourceStart;
right.sourceEnd = localDeclaration.sourceEnd;
-
+
Assignment assignment = new Assignment(left, right, 0);
int end = this.endStatementPosition;
- assignment.sourceEnd = (end == localDeclaration.sourceEnd) ? ++end : end;
+ assignment.sourceEnd = (end == localDeclaration.sourceEnd) ? ++end : end;
assignment.statementEnd = end;
this.astStack[this.astPtr] = assignment;
-
+
// also massage recovery scanner data.
if (this.recoveryScanner != null) {
RecoveryScannerData data = this.recoveryScanner.getData();
@@ -6079,7 +6079,7 @@ protected void consumeLocalVariableDeclarationStatement() {
if (position >= 0)
this.recoveryScanner.insertTokenAhead(TerminalTokens.TokenNameEQUAL, position);
}
-
+
if (this.currentElement != null) {
this.lastCheckPoint = assignment.sourceEnd + 1;
this.currentElement = this.currentElement.add(assignment, 0);
@@ -6955,7 +6955,7 @@ protected void consumeTypeAnnotation() {
// TypeAnnotation ::= NormalTypeAnnotation
// TypeAnnotation ::= MarkerTypeAnnotation
// TypeAnnotation ::= SingleMemberTypeAnnotation
-
+
if (!this.statementRecoveryActivated &&
this.options.sourceLevel < ClassFileConstants.JDK1_8 &&
this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
@@ -7015,7 +7015,7 @@ protected void consumeNormalAnnotation(boolean isTypeAnnotation) {
length);
}
normalAnnotation.declarationSourceEnd = this.rParenPos;
-
+
if (isTypeAnnotation) {
pushOnTypeAnnotationStack(normalAnnotation);
} else {
@@ -7225,7 +7225,7 @@ protected void consumeTargetModuleList() {
node.declarationSourceEnd = node.sourceEnd;
}
}
-
+
this.listLength = 0; // reset after having read target modules list
// recovery TBD
if (this.currentElement != null) { // is recovering
@@ -7392,7 +7392,7 @@ protected void consumeModuleModifiers() {
}
protected void consumeModuleHeader() {
// ModuleHeader ::= 'module' Name
-
+
int length;
char[][] tokens =
new char[length = this.identifierLengthStack[this.identifierLengthPtr--]][];
@@ -7661,8 +7661,8 @@ protected void consumePackageDeclarationNameWithModifiers() {
if (packageModifiers != 0) {
problemReporter().illegalModifiers(packageModifiersSourceStart, packageModifiersSourceEnd);
}
-
-
+
+
if (this.currentToken == TokenNameSEMICOLON){
impt.declarationSourceEnd = this.scanner.currentPosition - 1;
} else {
@@ -7754,7 +7754,7 @@ protected void consumeNestedParamMappings() {
jumpOverMethodBody();
pushOnIntStack(1); // signal that we have param mappings
pushOnAstLengthStack(0); // no mappings yet
-
+
this.scanner._insideParameterMapping = true;
}
//SH}
@@ -7788,7 +7788,7 @@ private void consumePrecedenceDeclaration(boolean isAfter) {
pushOnAstStack(new PrecedenceDeclaration(
this.intStack[this.intPtr--],
flushCommentsDefinedPriorTo(this.endStatementPosition),
- isAfter,
+ isAfter,
references));
// recovery
// if (this.currentElement != null) { // is recovering
@@ -8094,7 +8094,7 @@ protected void consumePrimaryNoNewArrayName() {
pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
pushOnGenericsLengthStack(0);
TypeReference typeReference = getTypeReference(0);
-
+
rejectIllegalTypeAnnotations(typeReference);
pushOnExpressionStack(
@@ -8207,11 +8207,11 @@ protected void consumePushCombineModifiers() {
// ModifiersWithDefault ::= Modifiersopt 'default' Modifiersopt'
// int stack on entry : ... Modifiers, ModifiersSourceStart, defaultSourceStart, defaultSourceEnd, Modifiers', Modifiers'SourceStart <<--- intPtr
// int stack on exit : ... combinedModifiers, combinedModifiersSourceStart <<--- intPtr
-
+
this.intPtr--; // pop modifiers'SourceStart, real location is with earlier block
int newModifiers = this.intStack[this.intPtr--] | ExtraCompilerModifiers.AccDefaultMethod; // pop modifiers
this.intPtr -= 2; // pop location of 'default' keyword
-
+
if ((this.intStack[this.intPtr - 1] & newModifiers) != 0) { // duplicate modifier(s) ?
newModifiers |= ExtraCompilerModifiers.AccAlternateModifierProblem;
}
@@ -8242,7 +8242,7 @@ protected void consumePushRealModifiers() {
}
protected void consumeQualifiedName(boolean qualifiedNameIsAnnotated) {
// QualifiedName ::= Name '.' SimpleName
- // QualifiedName ::= Name '.' TypeAnnotations SimpleName
+ // QualifiedName ::= Name '.' TypeAnnotations SimpleName
/*back from the recursive loop of QualifiedName.
Updates identifier length into the length stack*/
@@ -8330,7 +8330,7 @@ protected void consumeResourceSpecification() {
protected void consumeResourceOptionalTrailingSemiColon(boolean punctuated) {
// TrailingSemiColon ::= ';'
Statement statement = (Statement) this.astStack[this.astPtr];
-
+
if (punctuated) {
if (statement instanceof LocalDeclaration) {
((LocalDeclaration) statement).declarationSourceEnd = this.endStatementPosition;
@@ -8384,2680 +8384,2680 @@ protected void consumeZeroTypeAnnotations() {
protected void consumeRule(int act) {
switch ( act ) {
case 42 : if (DEBUG) { System.out.println("Type ::= PrimitiveType"); } //$NON-NLS-1$
- consumePrimitiveType();
+ consumePrimitiveType();
break;
-
+
case 56 : if (DEBUG) { System.out.println("ReferenceType ::= ClassOrInterfaceType"); } //$NON-NLS-1$
- consumeReferenceType();
+ consumeReferenceType();
break;
-
+
case 60 : if (DEBUG) { System.out.println("ClassOrInterface ::= Name"); } //$NON-NLS-1$
- consumeClassOrInterfaceName();
+ consumeClassOrInterfaceName();
break;
-
+
case 61 : if (DEBUG) { System.out.println("ClassOrInterface ::= GenericType DOT Name"); } //$NON-NLS-1$
- consumeClassOrInterface();
+ consumeClassOrInterface();
break;
-
+
case 62 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface TypeArguments"); } //$NON-NLS-1$
- consumeGenericType();
+ consumeGenericType();
break;
-
+
case 63 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface LESS GREATER"); } //$NON-NLS-1$
- consumeGenericTypeWithDiamond();
+ consumeGenericTypeWithDiamond();
break;
-
+
case 65 : if (DEBUG) { System.out.println("LiftingTypeopt ::= as BeginLiftingType Type"); } //$NON-NLS-1$
- consumeLiftingType();
+ consumeLiftingType();
break;
-
+
case 66 : if (DEBUG) { System.out.println("BeginLiftingType ::="); } //$NON-NLS-1$
- consumeBeginLiftingType();
+ consumeBeginLiftingType();
break;
-
+
case 68 : if (DEBUG) { System.out.println("CatchLiftingTypeopt ::= as Type"); } //$NON-NLS-1$
- consumeLiftingType();
+ consumeLiftingType();
break;
-
+
case 69 : if (DEBUG) { System.out.println("BaseAnchoredType ::= base DOT SimpleName"); } //$NON-NLS-1$
- consumeBaseAnchoredType();
+ consumeBaseAnchoredType();
break;
-
+
case 72 : if (DEBUG) { System.out.println("ArrayTypeWithTypeArgumentsName ::= GenericType DOT Name"); } //$NON-NLS-1$
- consumeArrayTypeWithTypeArgumentsName();
+ consumeArrayTypeWithTypeArgumentsName();
break;
-
+
case 73 : if (DEBUG) { System.out.println("ArrayType ::= PrimitiveType Dims"); } //$NON-NLS-1$
- consumePrimitiveArrayType();
+ consumePrimitiveArrayType();
break;
-
+
case 74 : if (DEBUG) { System.out.println("ArrayType ::= Name Dims"); } //$NON-NLS-1$
- consumeNameArrayType();
+ consumeNameArrayType();
break;
-
+
case 75 : if (DEBUG) { System.out.println("ArrayType ::= ArrayTypeWithTypeArgumentsName Dims"); } //$NON-NLS-1$
- consumeGenericTypeNameArrayType();
+ consumeGenericTypeNameArrayType();
break;
-
+
case 76 : if (DEBUG) { System.out.println("ArrayType ::= GenericType Dims"); } //$NON-NLS-1$
- consumeGenericTypeArrayType();
+ consumeGenericTypeArrayType();
break;
-
+
case 78 : if (DEBUG) { System.out.println("Name ::= SimpleName"); } //$NON-NLS-1$
- consumeZeroTypeAnnotations();
+ consumeZeroTypeAnnotations();
break;
-
+
case 83 : if (DEBUG) { System.out.println("UnannotatableName ::= UnannotatableName DOT SimpleName"); } //$NON-NLS-1$
- consumeUnannotatableQualifiedName();
+ consumeUnannotatableQualifiedName();
break;
-
+
case 84 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT SimpleName"); } //$NON-NLS-1$
- consumeQualifiedName(false);
+ consumeQualifiedName(false);
break;
-
+
case 85 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT TypeAnnotations SimpleName"); } //$NON-NLS-1$
- consumeQualifiedName(true);
+ consumeQualifiedName(true);
break;
-
+
case 86 : if (DEBUG) { System.out.println("TypeAnnotationsopt ::="); } //$NON-NLS-1$
- consumeZeroTypeAnnotations();
+ consumeZeroTypeAnnotations();
break;
-
+
case 87 : if (DEBUG) { System.out.println("TypeAnnotationsopt -> TypeAnnotations"); } //$NON-NLS-1$
- confirmTypeAnnotation();
+ confirmTypeAnnotation();
break;
-
+
case 90 : if (DEBUG) { System.out.println("TypeAnnotations0 ::= TypeAnnotations0 TypeAnnotation"); } //$NON-NLS-1$
- consumeOneMoreTypeAnnotation();
+ consumeOneMoreTypeAnnotation();
break;
-
+
case 91 : if (DEBUG) { System.out.println("TypeAnnotation ::= NormalTypeAnnotation"); } //$NON-NLS-1$
- consumeTypeAnnotation();
+ consumeTypeAnnotation();
break;
-
+
case 92 : if (DEBUG) { System.out.println("TypeAnnotation ::= MarkerTypeAnnotation"); } //$NON-NLS-1$
- consumeTypeAnnotation();
+ consumeTypeAnnotation();
break;
-
+
case 93 : if (DEBUG) { System.out.println("TypeAnnotation ::= SingleMemberTypeAnnotation"); } //$NON-NLS-1$
- consumeTypeAnnotation();
+ consumeTypeAnnotation();
break;
-
+
case 94 : if (DEBUG) { System.out.println("TypeAnnotationName ::= AT308 UnannotatableName"); } //$NON-NLS-1$
- consumeAnnotationName() ;
+ consumeAnnotationName() ;
break;
-
+
case 95 : if (DEBUG) { System.out.println("NormalTypeAnnotation ::= TypeAnnotationName LPAREN..."); } //$NON-NLS-1$
- consumeNormalAnnotation(true) ;
+ consumeNormalAnnotation(true) ;
break;
-
+
case 96 : if (DEBUG) { System.out.println("MarkerTypeAnnotation ::= TypeAnnotationName"); } //$NON-NLS-1$
- consumeMarkerAnnotation(true) ;
+ consumeMarkerAnnotation(true) ;
break;
-
+
case 97 : if (DEBUG) { System.out.println("SingleMemberTypeAnnotation ::= TypeAnnotationName LPAREN"); } //$NON-NLS-1$
- consumeSingleMemberAnnotation(true) ;
+ consumeSingleMemberAnnotation(true) ;
break;
-
+
case 98 : if (DEBUG) { System.out.println("RejectTypeAnnotations ::="); } //$NON-NLS-1$
- consumeNonTypeUseName();
+ consumeNonTypeUseName();
break;
-
+
case 99 : if (DEBUG) { System.out.println("PushZeroTypeAnnotations ::="); } //$NON-NLS-1$
- consumeZeroTypeAnnotations();
+ consumeZeroTypeAnnotations();
break;
-
+
case 100 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= this"); } //$NON-NLS-1$
- consumeExplicitThisParameter(false);
+ consumeExplicitThisParameter(false);
break;
-
+
case 101 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= UnannotatableName DOT..."); } //$NON-NLS-1$
- consumeExplicitThisParameter(true);
+ consumeExplicitThisParameter(true);
break;
-
+
case 102 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= VariableDeclaratorId"); } //$NON-NLS-1$
- consumeVariableDeclaratorIdParameter();
+ consumeVariableDeclaratorIdParameter();
break;
-
+
case 103 : if (DEBUG) { System.out.println("CompilationUnit ::= EnterCompilationUnit..."); } //$NON-NLS-1$
- consumeCompilationUnit();
+ consumeCompilationUnit();
break;
-
+
case 104 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration"); } //$NON-NLS-1$
- consumeInternalCompilationUnit();
+ consumeInternalCompilationUnit();
break;
-
+
case 105 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$
- consumeInternalCompilationUnit();
+ consumeInternalCompilationUnit();
break;
-
+
case 106 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$
- consumeInternalCompilationUnitWithTypes();
+ consumeInternalCompilationUnitWithTypes();
break;
-
+
case 107 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$
- consumeInternalCompilationUnitWithTypes();
+ consumeInternalCompilationUnitWithTypes();
break;
-
+
case 108 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$
- consumeInternalCompilationUnit();
+ consumeInternalCompilationUnit();
break;
-
+
case 109 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= TypeDeclarations"); } //$NON-NLS-1$
- consumeInternalCompilationUnitWithTypes();
+ consumeInternalCompilationUnitWithTypes();
break;
-
+
case 110 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$
- consumeInternalCompilationUnitWithTypes();
+ consumeInternalCompilationUnitWithTypes();
break;
-
+
case 111 : if (DEBUG) { System.out.println("InternalCompilationUnit ::="); } //$NON-NLS-1$
- consumeEmptyInternalCompilationUnit();
+ consumeEmptyInternalCompilationUnit();
break;
-
+
case 112 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$
- consumeInternalCompilationUnitWithModuleDeclaration();
+ consumeInternalCompilationUnitWithModuleDeclaration();
break;
-
+
case 113 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ModuleDeclaration"); } //$NON-NLS-1$
- consumeInternalCompilationUnitWithModuleDeclaration();
+ consumeInternalCompilationUnitWithModuleDeclaration();
break;
-
+
case 114 : if (DEBUG) { System.out.println("ModuleDeclaration ::= ModuleHeader ModuleBody"); } //$NON-NLS-1$
- consumeModuleDeclaration();
+ consumeModuleDeclaration();
break;
-
+
case 115 : if (DEBUG) { System.out.println("ModuleHeader ::= Modifiersopt ModuleModifieropt module"); } //$NON-NLS-1$
- consumeModuleHeader();
+ consumeModuleHeader();
break;
-
+
case 117 : if (DEBUG) { System.out.println("ModuleModifieropt ::= ModuleModifier"); } //$NON-NLS-1$
- consumeModuleModifiers();
+ consumeModuleModifiers();
break;
-
+
case 120 : if (DEBUG) { System.out.println("ModuleStatementsOpt ::="); } //$NON-NLS-1$
- consumeEmptyModuleStatementsOpt();
+ consumeEmptyModuleStatementsOpt();
break;
-
+
case 123 : if (DEBUG) { System.out.println("ModuleStatements ::= ModuleStatements ModuleStatement"); } //$NON-NLS-1$
- consumeModuleStatements();
+ consumeModuleStatements();
break;
-
+
case 129 : if (DEBUG) { System.out.println("RequiresStatement ::= SingleRequiresModuleName SEMICOLON"); } //$NON-NLS-1$
- consumeRequiresStatement();
+ consumeRequiresStatement();
break;
-
+
case 130 : if (DEBUG) { System.out.println("SingleRequiresModuleName ::= requires..."); } //$NON-NLS-1$
- consumeSingleRequiresModuleName();
+ consumeSingleRequiresModuleName();
break;
-
+
case 131 : if (DEBUG) { System.out.println("RequiresModifiersopt ::= RequiresModifiers"); } //$NON-NLS-1$
- consumeModifiers();
+ consumeModifiers();
break;
-
+
case 132 : if (DEBUG) { System.out.println("RequiresModifiersopt ::="); } //$NON-NLS-1$
- consumeDefaultModifiers();
+ consumeDefaultModifiers();
break;
-
+
case 134 : if (DEBUG) { System.out.println("RequiresModifiers ::= RequiresModifiers RequiresModifier"); } //$NON-NLS-1$
- consumeModifiers2();
+ consumeModifiers2();
break;
-
+
case 137 : if (DEBUG) { System.out.println("ExportsStatement ::= ExportsHeader TargetModuleListopt"); } //$NON-NLS-1$
- consumeExportsStatement();
+ consumeExportsStatement();
break;
-
+
case 138 : if (DEBUG) { System.out.println("ExportsHeader ::= exports SinglePkgName"); } //$NON-NLS-1$
- consumeExportsHeader();
+ consumeExportsHeader();
break;
-
+
case 140 : if (DEBUG) { System.out.println("TargetModuleListopt ::= to TargetModuleNameList"); } //$NON-NLS-1$
- consumeTargetModuleList();
+ consumeTargetModuleList();
break;
-
+
case 141 : if (DEBUG) { System.out.println("TargetModuleName ::= UnannotatableName"); } //$NON-NLS-1$
- consumeSingleTargetModuleName();
+ consumeSingleTargetModuleName();
break;
-
+
case 143 : if (DEBUG) { System.out.println("TargetModuleNameList ::= TargetModuleNameList COMMA..."); } //$NON-NLS-1$
- consumeTargetModuleNameList();
+ consumeTargetModuleNameList();
break;
-
+
case 144 : if (DEBUG) { System.out.println("SinglePkgName ::= UnannotatableName"); } //$NON-NLS-1$
- consumeSinglePkgName();
+ consumeSinglePkgName();
break;
-
+
case 145 : if (DEBUG) { System.out.println("OpensStatement ::= OpensHeader TargetModuleListopt..."); } //$NON-NLS-1$
- consumeOpensStatement();
+ consumeOpensStatement();
break;
-
+
case 146 : if (DEBUG) { System.out.println("OpensHeader ::= opens SinglePkgName"); } //$NON-NLS-1$
- consumeOpensHeader();
+ consumeOpensHeader();
break;
-
+
case 147 : if (DEBUG) { System.out.println("UsesStatement ::= UsesHeader SEMICOLON"); } //$NON-NLS-1$
- consumeUsesStatement();
+ consumeUsesStatement();
break;
-
+
case 148 : if (DEBUG) { System.out.println("UsesHeader ::= uses Name"); } //$NON-NLS-1$
- consumeUsesHeader();
+ consumeUsesHeader();
break;
-
+
case 149 : if (DEBUG) { System.out.println("ProvidesStatement ::= ProvidesInterface WithClause..."); } //$NON-NLS-1$
- consumeProvidesStatement();
+ consumeProvidesStatement();
break;
-
+
case 150 : if (DEBUG) { System.out.println("ProvidesInterface ::= provides Name"); } //$NON-NLS-1$
- consumeProvidesInterface();
+ consumeProvidesInterface();
break;
-
+
case 151 : if (DEBUG) { System.out.println("ServiceImplName ::= Name"); } //$NON-NLS-1$
- consumeSingleServiceImplName();
+ consumeSingleServiceImplName();
break;
-
+
case 153 : if (DEBUG) { System.out.println("ServiceImplNameList ::= ServiceImplNameList COMMA..."); } //$NON-NLS-1$
- consumeServiceImplNameList();
+ consumeServiceImplNameList();
break;
-
+
case 154 : if (DEBUG) { System.out.println("WithClause ::= with ServiceImplNameList"); } //$NON-NLS-1$
- consumeWithClause();
+ consumeWithClause();
break;
-
+
case 155 : if (DEBUG) { System.out.println("ReduceImports ::="); } //$NON-NLS-1$
- consumeReduceImports();
+ consumeReduceImports();
break;
-
+
case 156 : if (DEBUG) { System.out.println("EnterCompilationUnit ::="); } //$NON-NLS-1$
- consumeEnterCompilationUnit();
+ consumeEnterCompilationUnit();
break;
-
+
case 181 : if (DEBUG) { System.out.println("CatchHeader ::= catch LPAREN CatchFormalParameter RPAREN"); } //$NON-NLS-1$
- consumeCatchHeader();
+ consumeCatchHeader();
break;
-
+
case 183 : if (DEBUG) { System.out.println("ImportDeclarations ::= ImportDeclarations..."); } //$NON-NLS-1$
- consumeImportDeclarations();
+ consumeImportDeclarations();
break;
-
+
case 185 : if (DEBUG) { System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration"); } //$NON-NLS-1$
- consumeTypeDeclarations();
+ consumeTypeDeclarations();
break;
-
+
case 186 : if (DEBUG) { System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON"); } //$NON-NLS-1$
- consumePackageDeclaration();
+ consumePackageDeclaration();
break;
-
+
case 187 : if (DEBUG) { System.out.println("PackageDeclarationName ::= Modifiers package..."); } //$NON-NLS-1$
- consumePackageDeclarationNameWithModifiers();
+ consumePackageDeclarationNameWithModifiers();
break;
-
+
case 188 : if (DEBUG) { System.out.println("PackageDeclarationName ::= PackageComment package Name"); } //$NON-NLS-1$
- consumePackageDeclarationName();
+ consumePackageDeclarationName();
break;
-
+
case 189 : if (DEBUG) { System.out.println("PackageComment ::="); } //$NON-NLS-1$
- consumePackageComment();
+ consumePackageComment();
break;
-
+
case 195 : if (DEBUG) { System.out.println("SingleTypeImportDeclaration ::=..."); } //$NON-NLS-1$
- consumeImportDeclaration();
+ consumeImportDeclaration();
break;
-
+
case 196 : if (DEBUG) { System.out.println("SingleTypeImportDeclarationName ::= import ImportName..."); } //$NON-NLS-1$
- consumeSingleTypeImportDeclarationName();
+ consumeSingleTypeImportDeclarationName();
break;
-
+
case 198 : if (DEBUG) { System.out.println("ImportName ::= Name DOT team DOT Name"); } //$NON-NLS-1$
- consumeNameContainingTeam();
+ consumeNameContainingTeam();
break;
-
+
case 199 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$
- consumeImportDeclaration();
+ consumeImportDeclaration();
break;
-
+
case 200 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT..."); } //$NON-NLS-1$
- consumeTypeImportOnDemandDeclarationName();
+ consumeTypeImportOnDemandDeclarationName();
break;
-
+
case 203 : if (DEBUG) { System.out.println("TypeDeclaration ::= SEMICOLON"); } //$NON-NLS-1$
- consumeEmptyTypeDeclaration();
+ consumeEmptyTypeDeclaration();
break;
-
+
case 208 : if (DEBUG) { System.out.println("Modifiers ::= Modifiers Modifier"); } //$NON-NLS-1$
- consumeModifiers2();
+ consumeModifiers2();
break;
-
+
case 220 : if (DEBUG) { System.out.println("Modifier ::= Annotation"); } //$NON-NLS-1$
- consumeAnnotationAsModifier();
+ consumeAnnotationAsModifier();
break;
-
+
case 223 : if (DEBUG) { System.out.println("ClassDeclaration ::= ClassHeader ClassBody"); } //$NON-NLS-1$
- consumeClassDeclaration();
+ consumeClassDeclaration();
break;
-
+
case 224 : if (DEBUG) { System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt..."); } //$NON-NLS-1$
- consumeClassHeader();
+ consumeClassHeader();
break;
-
+
case 225 : if (DEBUG) { System.out.println("ClassHeaderName ::= ClassHeaderName1 TypeParameters"); } //$NON-NLS-1$
- consumeTypeHeaderNameWithTypeParameters();
+ consumeTypeHeaderNameWithTypeParameters();
break;
-
+
case 227 : if (DEBUG) { System.out.println("ClassHeaderName1 ::= Modifiersopt class Identifier"); } //$NON-NLS-1$
- consumeClassHeaderName1();
+ consumeClassHeaderName1();
break;
-
+
case 228 : if (DEBUG) { System.out.println("ClassHeaderExtends ::= extends ClassType"); } //$NON-NLS-1$
- consumeClassHeaderExtends();
+ consumeClassHeaderExtends();
break;
-
+
case 229 : if (DEBUG) { System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList"); } //$NON-NLS-1$
- consumeClassHeaderImplements();
+ consumeClassHeaderImplements();
break;
-
+
case 232 : if (DEBUG) { System.out.println("ClassHeaderPlayedBy ::= playedBy ClassType"); } //$NON-NLS-1$
- consumeClassHeaderPlayedBy();
+ consumeClassHeaderPlayedBy();
break;
-
+
case 238 : if (DEBUG) { System.out.println("PredicateHeader ::= when"); } //$NON-NLS-1$
- consumePredicate(false);
+ consumePredicate(false);
break;
-
+
case 240 : if (DEBUG) { System.out.println("BasePredicateHeader ::= base when"); } //$NON-NLS-1$
- consumePredicate(true);
+ consumePredicate(true);
break;
-
+
case 241 : if (DEBUG) { System.out.println("PredicateBody ::= LPAREN ForceNoDiet Expression..."); } //$NON-NLS-1$
- consumePredicateExpression();
+ consumePredicateExpression();
break;
-
+
case 242 : if (DEBUG) { System.out.println("PredicateBody ::= LPAREN RPAREN"); } //$NON-NLS-1$
- consumePredicateMissingExpression();
+ consumePredicateMissingExpression();
break;
-
+
case 243 : if (DEBUG) { System.out.println("ForceBaseIsIdentifier ::="); } //$NON-NLS-1$
- consumeForceBaseIsIdentifier();
+ consumeForceBaseIsIdentifier();
break;
-
+
case 244 : if (DEBUG) { System.out.println("RestoreBaseKeyword ::="); } //$NON-NLS-1$
- consumeRestoreBaseKeyword();
+ consumeRestoreBaseKeyword();
break;
-
+
case 246 : if (DEBUG) { System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA..."); } //$NON-NLS-1$
- consumeInterfaceTypeList();
+ consumeInterfaceTypeList();
break;
-
+
case 247 : if (DEBUG) { System.out.println("InterfaceType ::= ClassOrInterfaceType"); } //$NON-NLS-1$
- consumeInterfaceType();
+ consumeInterfaceType();
break;
-
+
case 250 : if (DEBUG) { System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations..."); } //$NON-NLS-1$
- consumeClassBodyDeclarations();
+ consumeClassBodyDeclarations();
break;
-
+
case 254 : if (DEBUG) { System.out.println("ClassBodyDeclaration ::= Diet NestedMethod..."); } //$NON-NLS-1$
- consumeClassBodyDeclaration();
+ consumeClassBodyDeclaration();
break;
-
+
case 255 : if (DEBUG) { System.out.println("Diet ::="); } //$NON-NLS-1$
- consumeDiet();
+ consumeDiet();
break;
case 256 : if (DEBUG) { System.out.println("Initializer ::= Diet NestedMethod CreateInitializer..."); } //$NON-NLS-1$
- consumeClassBodyDeclaration();
+ consumeClassBodyDeclaration();
break;
-
+
case 257 : if (DEBUG) { System.out.println("CreateInitializer ::="); } //$NON-NLS-1$
- consumeCreateInitializer();
+ consumeCreateInitializer();
break;
case 267 : if (DEBUG) { System.out.println("ClassMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$
- consumeEmptyTypeDeclaration();
+ consumeEmptyTypeDeclaration();
break;
case 270 : if (DEBUG) { System.out.println("FieldDeclaration ::= Modifiersopt Type..."); } //$NON-NLS-1$
- consumeFieldDeclaration();
+ consumeFieldDeclaration();
break;
-
+
case 272 : if (DEBUG) { System.out.println("VariableDeclarators ::= VariableDeclarators COMMA..."); } //$NON-NLS-1$
- consumeVariableDeclarators();
+ consumeVariableDeclarators();
break;
-
+
case 275 : if (DEBUG) { System.out.println("EnterVariable ::="); } //$NON-NLS-1$
- consumeEnterVariable();
+ consumeEnterVariable();
break;
-
+
case 276 : if (DEBUG) { System.out.println("ExitVariableWithInitialization ::="); } //$NON-NLS-1$
- consumeExitVariableWithInitialization();
+ consumeExitVariableWithInitialization();
break;
-
+
case 277 : if (DEBUG) { System.out.println("ExitVariableWithoutInitialization ::="); } //$NON-NLS-1$
- consumeExitVariableWithoutInitialization();
+ consumeExitVariableWithoutInitialization();
break;
-
+
case 278 : if (DEBUG) { System.out.println("ForceNoDiet ::="); } //$NON-NLS-1$
- consumeForceNoDiet();
+ consumeForceNoDiet();
break;
-
+
case 279 : if (DEBUG) { System.out.println("RestoreDiet ::="); } //$NON-NLS-1$
- consumeRestoreDiet();
+ consumeRestoreDiet();
break;
-
+
case 284 : if (DEBUG) { System.out.println("MethodDeclaration ::= MethodHeader MethodBody"); } //$NON-NLS-1$
// set to true to consume a method with a body
- consumeMethodDeclaration(true, false);
+ consumeMethodDeclaration(true, false);
break;
-
+
case 285 : if (DEBUG) { System.out.println("MethodDeclaration ::= DefaultMethodHeader MethodBody"); } //$NON-NLS-1$
// set to true to consume a method with a body
- consumeMethodDeclaration(true, true);
+ consumeMethodDeclaration(true, true);
break;
-
+
case 286 : if (DEBUG) { System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON"); } //$NON-NLS-1$
// set to false to consume a method without body
- consumeMethodDeclaration(false, false);
+ consumeMethodDeclaration(false, false);
break;
-
+
case 287 : if (DEBUG) { System.out.println("MethodHeader ::= MethodHeaderName FormalParameterListopt"); } //$NON-NLS-1$
- consumeMethodHeader();
+ consumeMethodHeader();
break;
-
+
case 288 : if (DEBUG) { System.out.println("DefaultMethodHeader ::= DefaultMethodHeaderName..."); } //$NON-NLS-1$
- consumeMethodHeader();
+ consumeMethodHeader();
break;
-
+
case 289 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt TypeParameters Type..."); } //$NON-NLS-1$
- consumeMethodHeaderNameWithTypeParameters(false);
+ consumeMethodHeaderNameWithTypeParameters(false);
break;
-
+
case 290 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN"); } //$NON-NLS-1$
- consumeMethodHeaderName(false);
+ consumeMethodHeaderName(false);
break;
-
+
case 291 : if (DEBUG) { System.out.println("DefaultMethodHeaderName ::= ModifiersWithDefault..."); } //$NON-NLS-1$
- consumeMethodHeaderNameWithTypeParameters(false);
+ consumeMethodHeaderNameWithTypeParameters(false);
break;
-
+
case 292 : if (DEBUG) { System.out.println("DefaultMethodHeaderName ::= ModifiersWithDefault Type..."); } //$NON-NLS-1$
- consumeMethodHeaderName(false);
+ consumeMethodHeaderName(false);
break;
-
+
case 293 : if (DEBUG) { System.out.println("ModifiersWithDefault ::= Modifiersopt default..."); } //$NON-NLS-1$
- consumePushCombineModifiers();
+ consumePushCombineModifiers();
break;
-
+
case 294 : if (DEBUG) { System.out.println("MethodHeaderRightParen ::= RPAREN"); } //$NON-NLS-1$
- consumeMethodHeaderRightParen();
+ consumeMethodHeaderRightParen();
break;
-
+
case 295 : if (DEBUG) { System.out.println("MethodHeaderExtendedDims ::= Dimsopt"); } //$NON-NLS-1$
- consumeMethodHeaderExtendedDims();
+ consumeMethodHeaderExtendedDims();
break;
-
+
case 296 : if (DEBUG) { System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList"); } //$NON-NLS-1$
- consumeMethodHeaderThrowsClause();
+ consumeMethodHeaderThrowsClause();
break;
-
+
case 297 : if (DEBUG) { System.out.println("ConstructorHeader ::= ConstructorHeaderName..."); } //$NON-NLS-1$
- consumeConstructorHeader();
+ consumeConstructorHeader();
break;
-
+
case 298 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt TypeParameters..."); } //$NON-NLS-1$
- consumeConstructorHeaderNameWithTypeParameters();
+ consumeConstructorHeaderNameWithTypeParameters();
break;
-
+
case 299 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN"); } //$NON-NLS-1$
- consumeConstructorHeaderName();
+ consumeConstructorHeaderName();
break;
-
+
case 301 : if (DEBUG) { System.out.println("FormalParameterList ::= FormalParameterList COMMA..."); } //$NON-NLS-1$
- consumeFormalParameterList();
+ consumeFormalParameterList();
break;
-
+
case 302 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type LiftingTypeopt..."); } //$NON-NLS-1$
- consumeFormalParameter(false);
+ consumeFormalParameter(false);
break;
-
+
case 303 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type LiftingTypeopt..."); } //$NON-NLS-1$
- consumeFormalParameter(true);
+ consumeFormalParameter(true);
break;
-
+
case 304 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type LiftingTypeopt..."); } //$NON-NLS-1$
- consumeFormalParameter(true);
+ consumeFormalParameter(true);
break;
-
+
case 305 : if (DEBUG) { System.out.println("CatchFormalParameter ::= Modifiersopt CatchType..."); } //$NON-NLS-1$
- consumeCatchFormalParameter();
+ consumeCatchFormalParameter();
break;
-
+
case 306 : if (DEBUG) { System.out.println("CatchType ::= UnionType"); } //$NON-NLS-1$
- consumeCatchType();
+ consumeCatchType();
break;
-
+
case 307 : if (DEBUG) { System.out.println("UnionType ::= Type"); } //$NON-NLS-1$
- consumeUnionTypeAsClassType();
+ consumeUnionTypeAsClassType();
break;
-
+
case 308 : if (DEBUG) { System.out.println("UnionType ::= UnionType OR Type"); } //$NON-NLS-1$
- consumeUnionType();
+ consumeUnionType();
break;
-
+
case 310 : if (DEBUG) { System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt"); } //$NON-NLS-1$
- consumeClassTypeList();
+ consumeClassTypeList();
break;
-
+
case 311 : if (DEBUG) { System.out.println("ClassTypeElt ::= ClassType"); } //$NON-NLS-1$
- consumeClassTypeElt();
+ consumeClassTypeElt();
break;
-
+
case 312 : if (DEBUG) { System.out.println("MethodBody ::= Predicateopt NestedMethod LBRACE..."); } //$NON-NLS-1$
- consumeMethodBody();
+ consumeMethodBody();
break;
-
+
case 313 : if (DEBUG) { System.out.println("NestedMethod ::="); } //$NON-NLS-1$
- consumeNestedMethod();
+ consumeNestedMethod();
break;
-
+
case 317 : if (DEBUG) { System.out.println("CalloutBinding ::= CalloutHeaderLong..."); } //$NON-NLS-1$
- consumeCalloutBindingLong();
+ consumeCalloutBindingLong();
break;
-
+
case 318 : if (DEBUG) { System.out.println("CalloutHeaderLong ::= CalloutBindingLeftLong..."); } //$NON-NLS-1$
- consumeCalloutHeader();
+ consumeCalloutHeader();
break;
-
+
case 319 : if (DEBUG) { System.out.println("CalloutHeaderLong ::= CalloutBindingLeftLong..."); } //$NON-NLS-1$
- consumeCalloutHeader();
+ consumeCalloutHeader();
break;
-
+
case 320 : if (DEBUG) { System.out.println("CalloutBindingLeftLong ::= MethodSpecLong CalloutKind"); } //$NON-NLS-1$
- consumeCalloutBindingLeft(true);
+ consumeCalloutBindingLeft(true);
break;
-
+
case 321 : if (DEBUG) { System.out.println("CalloutBinding ::= Modifiersopt CalloutBindingLeftShort"); } //$NON-NLS-1$
- consumeCalloutHeader();
+ consumeCalloutHeader();
break;
-
+
case 322 : if (DEBUG) { System.out.println("CalloutBindingLeftShort ::= MethodSpecShort CalloutKind"); } //$NON-NLS-1$
- consumeCalloutBindingLeft(false);
+ consumeCalloutBindingLeft(false);
break;
-
+
case 323 : if (DEBUG) { System.out.println("CalloutBinding ::= Modifiersopt CalloutBindingLeftShort"); } //$NON-NLS-1$
- consumeCalloutParameterMappingsInvalid();
+ consumeCalloutParameterMappingsInvalid();
break;
-
+
case 328 : if (DEBUG) { System.out.println("CalloutModifier ::= get"); } //$NON-NLS-1$
- consumeCalloutModifier(TokenNameget);
+ consumeCalloutModifier(TokenNameget);
break;
-
+
case 329 : if (DEBUG) { System.out.println("CalloutModifier ::= set"); } //$NON-NLS-1$
- consumeCalloutModifier(TokenNameset);
+ consumeCalloutModifier(TokenNameset);
break;
-
+
case 331 : if (DEBUG) { System.out.println("CalloutParameterMappingsopt ::= SEMICOLON"); } //$NON-NLS-1$
- consumeParameterMappingsEmpty();
+ consumeParameterMappingsEmpty();
break;
-
+
case 332 : if (DEBUG) { System.out.println("CalloutParameterMappings ::= with NestedParamMappings..."); } //$NON-NLS-1$
- consumeParameterMappings();
+ consumeParameterMappings();
break;
-
+
case 335 : if (DEBUG) { System.out.println("CalloutParameterMappingList ::=..."); } //$NON-NLS-1$
- consumeParameterMappingList();
+ consumeParameterMappingList();
break;
-
+
case 336 : if (DEBUG) { System.out.println("CalloutParameterMappingList ::=..."); } //$NON-NLS-1$
- consumeParameterMappingList();
+ consumeParameterMappingList();
break;
-
+
case 337 : if (DEBUG) { System.out.println("ParameterMapping ::= Expression SYNTHBINDOUT Identifier"); } //$NON-NLS-1$
- consumeParameterMappingOut();
+ consumeParameterMappingOut();
break;
-
+
case 338 : if (DEBUG) { System.out.println("ParameterMapping ::= Identifier BINDIN..."); } //$NON-NLS-1$
- consumeParameterMappingIn();
+ consumeParameterMappingIn();
break;
-
+
case 339 : if (DEBUG) { System.out.println("NestedParamMappings ::="); } //$NON-NLS-1$
- consumeNestedParamMappings();
+ consumeNestedParamMappings();
break;
-
+
case 340 : if (DEBUG) { System.out.println("CallinBinding ::= CallinHeaderLong..."); } //$NON-NLS-1$
- consumeCallinBindingLong();
+ consumeCallinBindingLong();
break;
-
+
case 341 : if (DEBUG) { System.out.println("CallinHeaderLong ::= CallinBindingLeftLong..."); } //$NON-NLS-1$
- consumeCallinHeader();
+ consumeCallinHeader();
break;
-
+
case 342 : if (DEBUG) { System.out.println("CallinHeaderLong ::= Modifiersopt CallinLabel..."); } //$NON-NLS-1$
- consumeCallinHeader();
+ consumeCallinHeader();
break;
-
+
case 343 : if (DEBUG) { System.out.println("CallinBindingLeftLong ::= MethodSpecLong BINDIN"); } //$NON-NLS-1$
- consumeCallinBindingLeft(true);
+ consumeCallinBindingLeft(true);
break;
-
+
case 344 : if (DEBUG) { System.out.println("CallinBinding ::= Modifiersopt CallinBindingLeftShort..."); } //$NON-NLS-1$
- consumeCallinHeader();
+ consumeCallinHeader();
break;
-
+
case 345 : if (DEBUG) { System.out.println("CallinBinding ::= Modifiersopt CallinLabel Modifiersopt"); } //$NON-NLS-1$
- consumeCallinHeader();
+ consumeCallinHeader();
break;
-
+
case 346 : if (DEBUG) { System.out.println("CallinBindingLeftShort ::= MethodSpecShort BINDIN"); } //$NON-NLS-1$
- consumeCallinBindingLeft(false);
+ consumeCallinBindingLeft(false);
break;
-
+
case 347 : if (DEBUG) { System.out.println("CallinLabel ::= SimpleName COLON"); } //$NON-NLS-1$
- consumeCallinLabel();
+ consumeCallinLabel();
break;
-
+
case 348 : if (DEBUG) { System.out.println("CallinModifier ::= replace"); } //$NON-NLS-1$
- consumeCallinModifier(TokenNamereplace);
+ consumeCallinModifier(TokenNamereplace);
break;
-
+
case 349 : if (DEBUG) { System.out.println("CallinModifier ::= before"); } //$NON-NLS-1$
- consumeCallinModifier(TokenNamebefore);
+ consumeCallinModifier(TokenNamebefore);
break;
-
+
case 350 : if (DEBUG) { System.out.println("CallinModifier ::= after"); } //$NON-NLS-1$
- consumeCallinModifier(TokenNameafter);
+ consumeCallinModifier(TokenNameafter);
break;
-
+
case 351 : if (DEBUG) { System.out.println("InvalidCallinModifier ::="); } //$NON-NLS-1$
- consumeCallinModifierMissing();
+ consumeCallinModifierMissing();
break;
-
+
case 352 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt..."); } //$NON-NLS-1$
- consumeCallinBindingInvalid(false,false);
+ consumeCallinBindingInvalid(false,false);
break;
-
+
case 353 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt CallinLabel..."); } //$NON-NLS-1$
- consumeCallinBindingInvalid(false,false);
+ consumeCallinBindingInvalid(false,false);
break;
-
+
case 354 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt..."); } //$NON-NLS-1$
- consumeCallinBindingInvalid(false,true);
+ consumeCallinBindingInvalid(false,true);
break;
-
+
case 355 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt CallinLabel..."); } //$NON-NLS-1$
- consumeCallinBindingInvalid(false,true);
+ consumeCallinBindingInvalid(false,true);
break;
-
+
case 356 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= CallinBindingLeftLong..."); } //$NON-NLS-1$
- consumeCallinBindingInvalid(true,false);
+ consumeCallinBindingInvalid(true,false);
break;
-
+
case 357 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt CallinLabel..."); } //$NON-NLS-1$
- consumeCallinBindingInvalid(true,false);
+ consumeCallinBindingInvalid(true,false);
break;
-
+
case 359 : if (DEBUG) { System.out.println("CallinParameterMappingsopt ::= SEMICOLON"); } //$NON-NLS-1$
- consumeParameterMappingsEmpty();
+ consumeParameterMappingsEmpty();
break;
-
+
case 360 : if (DEBUG) { System.out.println("CallinParameterMappings ::= with NestedParamMappings..."); } //$NON-NLS-1$
- consumeParameterMappings();
+ consumeParameterMappings();
break;
-
+
case 363 : if (DEBUG) { System.out.println("CallinParameterMappingList ::=..."); } //$NON-NLS-1$
- consumeParameterMappingList();
+ consumeParameterMappingList();
break;
-
+
case 364 : if (DEBUG) { System.out.println("CallinParameterMappingList ::=..."); } //$NON-NLS-1$
- consumeParameterMappingList();
+ consumeParameterMappingList();
break;
-
+
case 365 : if (DEBUG) { System.out.println("MethodSpecShort ::= SimpleName"); } //$NON-NLS-1$
- consumeMethodSpecShort();
+ consumeMethodSpecShort();
break;
-
+
case 366 : if (DEBUG) { System.out.println("MethodSpecLong ::= MethodHeaderName..."); } //$NON-NLS-1$
- consumeMethodSpecLong(false);
+ consumeMethodSpecLong(false);
break;
-
+
case 367 : if (DEBUG) { System.out.println("MethodSpecLong ::= ConstructorHeaderName..."); } //$NON-NLS-1$
- consumeMethodSpecLongCtor();
+ consumeMethodSpecLongCtor();
break;
-
+
case 368 : if (DEBUG) { System.out.println("BaseMethodSpecLong ::= MethodHeaderName..."); } //$NON-NLS-1$
- consumeMethodSpecLong(false);
+ consumeMethodSpecLong(false);
break;
-
+
case 369 : if (DEBUG) { System.out.println("BaseMethodSpecLong ::= MethodSpecNamePlus..."); } //$NON-NLS-1$
- consumeMethodSpecLong(true);
+ consumeMethodSpecLong(true);
break;
-
+
case 370 : if (DEBUG) { System.out.println("BaseMethodSpecLong ::= ConstructorHeaderName..."); } //$NON-NLS-1$
- consumeMethodSpecLong(false);
+ consumeMethodSpecLong(false);
break;
-
+
case 371 : if (DEBUG) { System.out.println("MethodSpecNamePlus ::= Modifiersopt Type PLUS Identifier"); } //$NON-NLS-1$
- consumeMethodHeaderName(false);
+ consumeMethodHeaderName(false);
break;
-
+
case 372 : if (DEBUG) { System.out.println("CalloutFieldSpecLong ::= CalloutModifier Type Identifier"); } //$NON-NLS-1$
- consumeFieldSpecLong();
+ consumeFieldSpecLong();
break;
-
+
case 375 : if (DEBUG) { System.out.println("BaseMethodSpecListShort ::= BaseMethodSpecListShort..."); } //$NON-NLS-1$
- consumeMethodSpecList();
+ consumeMethodSpecList();
break;
-
+
case 379 : if (DEBUG) { System.out.println("MethodSpecListLong ::= MethodSpecListLong COMMA..."); } //$NON-NLS-1$
- consumeMethodSpecList();
+ consumeMethodSpecList();
break;
-
+
case 380 : if (DEBUG) { System.out.println("PrecedenceDeclaration ::= precedence BindingNames..."); } //$NON-NLS-1$
- consumePrecedenceDeclaration(false);
+ consumePrecedenceDeclaration(false);
break;
-
+
case 381 : if (DEBUG) { System.out.println("PrecedenceDeclaration ::= precedence after BindingNames"); } //$NON-NLS-1$
- consumePrecedenceDeclaration(true);
+ consumePrecedenceDeclaration(true);
break;
-
+
case 383 : if (DEBUG) { System.out.println("BindingNames ::= BindingNames COMMA BindingName"); } //$NON-NLS-1$
- consumeBindingNames();
+ consumeBindingNames();
break;
-
+
case 384 : if (DEBUG) { System.out.println("BindingName ::= Name"); } //$NON-NLS-1$
- consumeBindingName();
+ consumeBindingName();
break;
-
+
case 385 : if (DEBUG) { System.out.println("StaticInitializer ::= StaticOnly Block"); } //$NON-NLS-1$
- consumeStaticInitializer();
+ consumeStaticInitializer();
break;
case 386 : if (DEBUG) { System.out.println("StaticOnly ::= static"); } //$NON-NLS-1$
- consumeStaticOnly();
+ consumeStaticOnly();
break;
-
+
case 387 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader MethodBody"); } //$NON-NLS-1$
- consumeConstructorDeclaration() ;
+ consumeConstructorDeclaration() ;
break;
-
+
case 388 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON"); } //$NON-NLS-1$
- consumeInvalidConstructorDeclaration() ;
+ consumeInvalidConstructorDeclaration() ;
break;
-
+
case 389 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= this LPAREN..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocation(0, THIS_CALL);
+ consumeExplicitConstructorInvocation(0, THIS_CALL);
break;
-
+
case 390 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments this"); } //$NON-NLS-1$
- consumeExplicitConstructorInvocationWithTypeArguments(0,THIS_CALL);
+ consumeExplicitConstructorInvocationWithTypeArguments(0,THIS_CALL);
break;
-
+
case 391 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= super LPAREN..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocation(0,SUPER_CALL);
+ consumeExplicitConstructorInvocation(0,SUPER_CALL);
break;
-
+
case 392 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocationWithTypeArguments(0,SUPER_CALL);
+ consumeExplicitConstructorInvocationWithTypeArguments(0,SUPER_CALL);
break;
-
+
case 393 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= tsuper LPAREN..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocation(0,TSUPER_CALL);
+ consumeExplicitConstructorInvocation(0,TSUPER_CALL);
break;
-
+
case 394 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT tsuper LPAREN"); } //$NON-NLS-1$
- consumeExplicitConstructorInvocation(2,TSUPER_CALL);
+ consumeExplicitConstructorInvocation(2,TSUPER_CALL);
break;
-
+
case 395 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT super..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocation(1, SUPER_CALL);
+ consumeExplicitConstructorInvocation(1, SUPER_CALL);
break;
-
+
case 396 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocationWithTypeArguments(1, SUPER_CALL);
+ consumeExplicitConstructorInvocationWithTypeArguments(1, SUPER_CALL);
break;
-
+
case 397 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN"); } //$NON-NLS-1$
- consumeExplicitConstructorInvocation(2, SUPER_CALL);
+ consumeExplicitConstructorInvocation(2, SUPER_CALL);
break;
-
+
case 398 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocationWithTypeArguments(2, SUPER_CALL);
+ consumeExplicitConstructorInvocationWithTypeArguments(2, SUPER_CALL);
break;
-
+
case 399 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT this..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocation(1, THIS_CALL);
+ consumeExplicitConstructorInvocation(1, THIS_CALL);
break;
-
+
case 400 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocationWithTypeArguments(1, THIS_CALL);
+ consumeExplicitConstructorInvocationWithTypeArguments(1, THIS_CALL);
break;
-
+
case 401 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN"); } //$NON-NLS-1$
- consumeExplicitConstructorInvocation(2, THIS_CALL);
+ consumeExplicitConstructorInvocation(2, THIS_CALL);
break;
-
+
case 402 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocationWithTypeArguments(2, THIS_CALL);
+ consumeExplicitConstructorInvocationWithTypeArguments(2, THIS_CALL);
break;
-
+
case 403 : if (DEBUG) { System.out.println("BaseConstructorExpression ::= base LPAREN..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocationBase(0);
+ consumeExplicitConstructorInvocationBase(0);
break;
-
+
case 404 : if (DEBUG) { System.out.println("BaseConstructorInvocation ::= base LPAREN..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocationBase(1);
+ consumeExplicitConstructorInvocationBase(1);
break;
-
+
case 405 : if (DEBUG) { System.out.println("BaseConstructorInvocation ::= Primary DOT base LPAREN..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocationBase(2);
+ consumeExplicitConstructorInvocationBase(2);
break;
-
+
case 406 : if (DEBUG) { System.out.println("BaseConstructorInvocation ::= Name DOT base LPAREN..."); } //$NON-NLS-1$
- consumeExplicitConstructorInvocationBase(3);
+ consumeExplicitConstructorInvocationBase(3);
break;
-
+
case 407 : if (DEBUG) { System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody"); } //$NON-NLS-1$
- consumeInterfaceDeclaration();
+ consumeInterfaceDeclaration();
break;
-
+
case 408 : if (DEBUG) { System.out.println("InterfaceHeader ::= InterfaceHeaderName..."); } //$NON-NLS-1$
- consumeInterfaceHeader();
+ consumeInterfaceHeader();
break;
-
+
case 409 : if (DEBUG) { System.out.println("InterfaceHeaderName ::= InterfaceHeaderName1..."); } //$NON-NLS-1$
- consumeTypeHeaderNameWithTypeParameters();
+ consumeTypeHeaderNameWithTypeParameters();
break;
-
+
case 411 : if (DEBUG) { System.out.println("InterfaceHeaderName1 ::= Modifiersopt interface..."); } //$NON-NLS-1$
- consumeInterfaceHeaderName1();
+ consumeInterfaceHeaderName1();
break;
-
+
case 412 : if (DEBUG) { System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList"); } //$NON-NLS-1$
- consumeInterfaceHeaderExtends();
+ consumeInterfaceHeaderExtends();
break;
-
+
case 415 : if (DEBUG) { System.out.println("InterfaceMemberDeclarations ::=..."); } //$NON-NLS-1$
- consumeInterfaceMemberDeclarations();
+ consumeInterfaceMemberDeclarations();
break;
-
+
case 416 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$
- consumeEmptyTypeDeclaration();
+ consumeEmptyTypeDeclaration();
break;
-
+
case 418 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= DefaultMethodHeader..."); } //$NON-NLS-1$
- consumeInterfaceMethodDeclaration(false);
+ consumeInterfaceMethodDeclaration(false);
break;
-
+
case 419 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= MethodHeader MethodBody"); } //$NON-NLS-1$
- consumeInterfaceMethodDeclaration(false);
+ consumeInterfaceMethodDeclaration(false);
break;
-
+
case 420 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= DefaultMethodHeader..."); } //$NON-NLS-1$
- consumeInterfaceMethodDeclaration(true);
+ consumeInterfaceMethodDeclaration(true);
break;
-
+
case 421 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$
- consumeInvalidConstructorDeclaration(true);
+ consumeInvalidConstructorDeclaration(true);
break;
-
+
case 422 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$
- consumeInvalidConstructorDeclaration(false);
+ consumeInvalidConstructorDeclaration(false);
break;
-
+
case 434 : if (DEBUG) { System.out.println("RecordDeclaration ::= RecordHeaderPart RecordBody"); } //$NON-NLS-1$
- consumeRecordDeclaration();
+ consumeRecordDeclaration();
break;
-
+
case 435 : if (DEBUG) { System.out.println("RecordHeaderPart ::= RecordHeaderName RecordHeader..."); } //$NON-NLS-1$
- consumeRecordHeaderPart();
+ consumeRecordHeaderPart();
break;
-
+
case 436 : if (DEBUG) { System.out.println("RecordHeaderName ::= RecordHeaderName1 TypeParameters"); } //$NON-NLS-1$
- consumeRecordHeaderNameWithTypeParameters();
+ consumeRecordHeaderNameWithTypeParameters();
break;
-
+
case 438 : if (DEBUG) { System.out.println("RecordHeaderName1 ::= Modifiersopt..."); } //$NON-NLS-1$
- consumeRecordHeaderName1();
+ consumeRecordHeaderName1();
break;
-
+
case 439 : if (DEBUG) { System.out.println("RecordComponentHeaderRightParen ::= RPAREN"); } //$NON-NLS-1$
- consumeRecordComponentHeaderRightParen();
+ consumeRecordComponentHeaderRightParen();
break;
-
+
case 440 : if (DEBUG) { System.out.println("RecordHeader ::= LPAREN RecordComponentsopt..."); } //$NON-NLS-1$
- consumeRecordHeader();
+ consumeRecordHeader();
break;
-
+
case 441 : if (DEBUG) { System.out.println("RecordComponentsopt ::="); } //$NON-NLS-1$
- consumeRecordComponentsopt();
+ consumeRecordComponentsopt();
break;
-
+
case 444 : if (DEBUG) { System.out.println("RecordComponents ::= RecordComponents COMMA..."); } //$NON-NLS-1$
- consumeRecordComponents();
+ consumeRecordComponents();
break;
-
+
case 446 : if (DEBUG) { System.out.println("RecordComponent ::= Modifiersopt Type..."); } //$NON-NLS-1$
- consumeRecordComponent(false);
+ consumeRecordComponent(false);
break;
-
+
case 447 : if (DEBUG) { System.out.println("VariableArityRecordComponent ::= Modifiersopt Type..."); } //$NON-NLS-1$
- consumeRecordComponent(true);
+ consumeRecordComponent(true);
break;
-
+
case 448 : if (DEBUG) { System.out.println("VariableArityRecordComponent ::= Modifiersopt Type..."); } //$NON-NLS-1$
- consumeRecordComponent(true);
+ consumeRecordComponent(true);
break;
-
+
case 449 : if (DEBUG) { System.out.println("RecordBody ::= LBRACE RecordBodyDeclarationopt RBRACE"); } //$NON-NLS-1$
- consumeRecordBody();
+ consumeRecordBody();
break;
-
+
case 450 : if (DEBUG) { System.out.println("RecordBodyDeclarationopt ::="); } //$NON-NLS-1$
- consumeEmptyRecordBodyDeclaration();
+ consumeEmptyRecordBodyDeclaration();
break;
-
+
case 453 : if (DEBUG) { System.out.println("RecordBodyDeclarations ::= RecordBodyDeclarations..."); } //$NON-NLS-1$
- consumeRecordBodyDeclarations();
+ consumeRecordBodyDeclarations();
break;
-
+
case 454 : if (DEBUG) { System.out.println("RecordBodyDeclaration ::= ClassBodyDeclaration"); } //$NON-NLS-1$
- consumeRecordBodyDeclaration();
+ consumeRecordBodyDeclaration();
break;
-
+
case 455 : if (DEBUG) { System.out.println("RecordBodyDeclaration ::= CompactConstructorDeclaration"); } //$NON-NLS-1$
- consumeRecordBodyDeclaration();
+ consumeRecordBodyDeclaration();
break;
-
+
case 456 : if (DEBUG) { System.out.println("CompactConstructorDeclaration ::=..."); } //$NON-NLS-1$
- consumeCompactConstructorDeclaration();
+ consumeCompactConstructorDeclaration();
break;
-
+
case 457 : if (DEBUG) { System.out.println("CompactConstructorHeader ::=..."); } //$NON-NLS-1$
- consumeCompactConstructorHeader();
+ consumeCompactConstructorHeader();
break;
-
+
case 458 : if (DEBUG) { System.out.println("CompactConstructorHeaderName ::= Modifiersopt Identifier"); } //$NON-NLS-1$
- consumeCompactConstructorHeaderName();
+ consumeCompactConstructorHeaderName();
break;
-
+
case 459 : if (DEBUG) { System.out.println("CompactConstructorHeaderName ::= Modifiersopt..."); } //$NON-NLS-1$
- consumeCompactConstructorHeaderNameWithTypeParameters();
+ consumeCompactConstructorHeaderNameWithTypeParameters();
break;
-
+
case 461 : if (DEBUG) { System.out.println("InstanceofExpression ::= InstanceofExpression instanceof"); } //$NON-NLS-1$
- consumeInstanceOfExpression();
+ consumeInstanceOfExpression();
break;
-
+
case 465 : if (DEBUG) { System.out.println("TypeTestPattern ::= Type Identifier"); } //$NON-NLS-1$
- consumeTypeTestPattern();
+ consumeTypeTestPattern();
break;
-
+
case 467 : if (DEBUG) { System.out.println("PushLeftBrace ::="); } //$NON-NLS-1$
- consumePushLeftBrace();
+ consumePushLeftBrace();
break;
-
+
case 468 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace ,opt RBRACE"); } //$NON-NLS-1$
- consumeEmptyArrayInitializer();
+ consumeEmptyArrayInitializer();
break;
-
+
case 469 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$
- consumeArrayInitializer();
+ consumeArrayInitializer();
break;
-
+
case 470 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$
- consumeArrayInitializer();
+ consumeArrayInitializer();
break;
-
+
case 472 : if (DEBUG) { System.out.println("VariableInitializers ::= VariableInitializers COMMA..."); } //$NON-NLS-1$
- consumeVariableInitializers();
+ consumeVariableInitializers();
break;
-
+
case 473 : if (DEBUG) { System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE"); } //$NON-NLS-1$
- consumeBlock();
+ consumeBlock();
break;
-
+
case 474 : if (DEBUG) { System.out.println("OpenBlock ::="); } //$NON-NLS-1$
- consumeOpenBlock() ;
+ consumeOpenBlock() ;
break;
-
+
case 475 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatement"); } //$NON-NLS-1$
- consumeBlockStatement() ;
+ consumeBlockStatement() ;
break;
-
+
case 476 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatements BlockStatement"); } //$NON-NLS-1$
- consumeBlockStatements() ;
+ consumeBlockStatements() ;
break;
-
+
case 484 : if (DEBUG) { System.out.println("BlockStatement ::= InterfaceDeclaration"); } //$NON-NLS-1$
- consumeInvalidInterfaceDeclaration();
+ consumeInvalidInterfaceDeclaration();
break;
-
+
case 485 : if (DEBUG) { System.out.println("BlockStatement ::= AnnotationTypeDeclaration"); } //$NON-NLS-1$
- consumeInvalidAnnotationTypeDeclaration();
+ consumeInvalidAnnotationTypeDeclaration();
break;
-
+
case 486 : if (DEBUG) { System.out.println("BlockStatement ::= EnumDeclaration"); } //$NON-NLS-1$
- consumeInvalidEnumDeclaration();
+ consumeInvalidEnumDeclaration();
break;
-
+
case 487 : if (DEBUG) { System.out.println("LocalVariableDeclarationStatement ::=..."); } //$NON-NLS-1$
- consumeLocalVariableDeclarationStatement();
+ consumeLocalVariableDeclarationStatement();
break;
-
+
case 488 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Type PushModifiers..."); } //$NON-NLS-1$
- consumeLocalVariableDeclaration();
+ consumeLocalVariableDeclaration();
break;
-
+
case 489 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Modifiers Type..."); } //$NON-NLS-1$
- consumeLocalVariableDeclaration();
+ consumeLocalVariableDeclaration();
break;
-
+
case 490 : if (DEBUG) { System.out.println("PushModifiers ::="); } //$NON-NLS-1$
- consumePushModifiers();
+ consumePushModifiers();
break;
-
+
case 491 : if (DEBUG) { System.out.println("PushModifiersForHeader ::="); } //$NON-NLS-1$
- consumePushModifiersForHeader();
+ consumePushModifiersForHeader();
break;
-
+
case 492 : if (DEBUG) { System.out.println("PushRealModifiers ::="); } //$NON-NLS-1$
- consumePushRealModifiers();
+ consumePushRealModifiers();
break;
-
+
case 521 : if (DEBUG) { System.out.println("EmptyStatement ::= SEMICOLON"); } //$NON-NLS-1$
- consumeEmptyStatement();
+ consumeEmptyStatement();
break;
-
+
case 522 : if (DEBUG) { System.out.println("LabeledStatement ::= Label COLON Statement"); } //$NON-NLS-1$
- consumeStatementLabel() ;
+ consumeStatementLabel() ;
break;
-
+
case 523 : if (DEBUG) { System.out.println("LabeledStatementNoShortIf ::= Label COLON..."); } //$NON-NLS-1$
- consumeStatementLabel() ;
+ consumeStatementLabel() ;
break;
-
+
case 524 : if (DEBUG) { System.out.println("Label ::= Identifier"); } //$NON-NLS-1$
- consumeLabel() ;
+ consumeLabel() ;
break;
-
+
case 525 : if (DEBUG) { System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON"); } //$NON-NLS-1$
- consumeExpressionStatement();
+ consumeExpressionStatement();
break;
-
+
case 535 : if (DEBUG) { System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$
- consumeStatementIfNoElse();
+ consumeStatementIfNoElse();
break;
-
+
case 536 : if (DEBUG) { System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$
- consumeStatementIfWithElse();
+ consumeStatementIfWithElse();
break;
-
+
case 537 : if (DEBUG) { System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression..."); } //$NON-NLS-1$
- consumeStatementIfWithElse();
+ consumeStatementIfWithElse();
break;
-
+
case 538 : if (DEBUG) { System.out.println("SwitchStatement ::= switch LPAREN Expression RPAREN..."); } //$NON-NLS-1$
- consumeStatementSwitch() ;
+ consumeStatementSwitch() ;
break;
-
+
case 539 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE RBRACE"); } //$NON-NLS-1$
- consumeEmptySwitchBlock() ;
+ consumeEmptySwitchBlock() ;
break;
-
+
case 542 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements..."); } //$NON-NLS-1$
- consumeSwitchBlock() ;
+ consumeSwitchBlock() ;
break;
-
+
case 544 : if (DEBUG) { System.out.println("SwitchBlockStatements ::= SwitchBlockStatements..."); } //$NON-NLS-1$
- consumeSwitchBlockStatements() ;
+ consumeSwitchBlockStatements() ;
break;
-
+
case 546 : if (DEBUG) { System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements"); } //$NON-NLS-1$
- consumeSwitchBlockStatement() ;
+ consumeSwitchBlockStatement() ;
break;
-
+
case 548 : if (DEBUG) { System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel"); } //$NON-NLS-1$
- consumeSwitchLabels() ;
+ consumeSwitchLabels() ;
break;
-
+
case 549 : if (DEBUG) { System.out.println("SwitchLabel ::= SwitchLabelCaseLhs COLON"); } //$NON-NLS-1$
- consumeCaseLabel();
+ consumeCaseLabel();
break;
-
+
case 550 : if (DEBUG) { System.out.println("SwitchLabel ::= default COLON"); } //$NON-NLS-1$
- consumeDefaultLabel();
+ consumeDefaultLabel();
break;
-
+
case 553 : if (DEBUG) { System.out.println("SwitchExpression ::= switch LPAREN Expression RPAREN..."); } //$NON-NLS-1$
- consumeSwitchExpression() ;
+ consumeSwitchExpression() ;
break;
-
+
case 556 : if (DEBUG) { System.out.println("SwitchLabeledRule ::= SwitchLabeledThrowStatement"); } //$NON-NLS-1$
- consumeSwitchLabeledRule();
+ consumeSwitchLabeledRule();
break;
-
+
case 557 : if (DEBUG) { System.out.println("SwitchLabeledExpression ::= SwitchLabelExpr Expression"); } //$NON-NLS-1$
- consumeSwitchLabeledExpression();
+ consumeSwitchLabeledExpression();
break;
-
+
case 558 : if (DEBUG) { System.out.println("SwitchLabeledBlock ::= SwitchLabelExpr Block"); } //$NON-NLS-1$
- consumeSwitchLabeledBlock();
+ consumeSwitchLabeledBlock();
break;
-
+
case 559 : if (DEBUG) { System.out.println("SwitchLabeledThrowStatement ::= SwitchLabelExpr..."); } //$NON-NLS-1$
- consumeSwitchLabeledThrowStatement();
+ consumeSwitchLabeledThrowStatement();
break;
-
+
case 560 : if (DEBUG) { System.out.println("SwitchLabelExpr ::= default ARROW"); } //$NON-NLS-1$
- consumeDefaultLabelExpr();
+ consumeDefaultLabelExpr();
break;
-
+
case 561 : if (DEBUG) { System.out.println("SwitchLabelExpr ::= SwitchLabelCaseLhs BeginCaseExpr..."); } //$NON-NLS-1$
- consumeCaseLabelExpr();
+ consumeCaseLabelExpr();
break;
-
+
case 562 : if (DEBUG) { System.out.println("SwitchLabelCaseLhs ::= case ConstantExpressions"); } //$NON-NLS-1$
- consumeSwitchLabelCaseLhs();
+ consumeSwitchLabelCaseLhs();
break;
-
+
case 563 : if (DEBUG) { System.out.println("YieldStatement ::= RestrictedIdentifierYield Expression"); } //$NON-NLS-1$
- consumeStatementYield() ;
+ consumeStatementYield() ;
break;
-
+
case 564 : if (DEBUG) { System.out.println("WhileStatement ::= while LPAREN Expression RPAREN..."); } //$NON-NLS-1$
- consumeStatementWhile() ;
+ consumeStatementWhile() ;
break;
-
+
case 565 : if (DEBUG) { System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression..."); } //$NON-NLS-1$
- consumeStatementWhile() ;
+ consumeStatementWhile() ;
break;
-
+
case 566 : if (DEBUG) { System.out.println("DoStatement ::= do Statement while LPAREN Expression..."); } //$NON-NLS-1$
- consumeStatementDo() ;
+ consumeStatementDo() ;
break;
-
+
case 567 : if (DEBUG) { System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON..."); } //$NON-NLS-1$
- consumeStatementFor() ;
+ consumeStatementFor() ;
break;
-
+
case 568 : if (DEBUG) { System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt..."); } //$NON-NLS-1$
- consumeStatementFor() ;
+ consumeStatementFor() ;
break;
-
+
case 569 : if (DEBUG) { System.out.println("ForInit ::= StatementExpressionList"); } //$NON-NLS-1$
- consumeForInit() ;
+ consumeForInit() ;
break;
-
+
case 573 : if (DEBUG) { System.out.println("StatementExpressionList ::= StatementExpressionList..."); } //$NON-NLS-1$
- consumeStatementExpressionList() ;
+ consumeStatementExpressionList() ;
break;
-
+
case 574 : if (DEBUG) { System.out.println("WithinStatement ::= within LPAREN Expression RPAREN..."); } //$NON-NLS-1$
- consumeWithinStatement();
+ consumeWithinStatement();
break;
-
+
case 575 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression SEMICOLON"); } //$NON-NLS-1$
- consumeSimpleAssertStatement() ;
+ consumeSimpleAssertStatement() ;
break;
-
+
case 576 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression COLON Expression"); } //$NON-NLS-1$
- consumeAssertStatement() ;
+ consumeAssertStatement() ;
break;
-
+
case 577 : if (DEBUG) { System.out.println("BreakStatement ::= break SEMICOLON"); } //$NON-NLS-1$
- consumeStatementBreak() ;
+ consumeStatementBreak() ;
break;
-
+
case 578 : if (DEBUG) { System.out.println("BreakStatement ::= break Identifier SEMICOLON"); } //$NON-NLS-1$
- consumeStatementBreakWithLabel() ;
+ consumeStatementBreakWithLabel() ;
break;
-
+
case 579 : if (DEBUG) { System.out.println("ContinueStatement ::= continue SEMICOLON"); } //$NON-NLS-1$
- consumeStatementContinue() ;
+ consumeStatementContinue() ;
break;
-
+
case 580 : if (DEBUG) { System.out.println("ContinueStatement ::= continue Identifier SEMICOLON"); } //$NON-NLS-1$
- consumeStatementContinueWithLabel() ;
+ consumeStatementContinueWithLabel() ;
break;
-
+
case 581 : if (DEBUG) { System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON"); } //$NON-NLS-1$
- consumeStatementReturn() ;
+ consumeStatementReturn() ;
break;
-
+
case 582 : if (DEBUG) { System.out.println("ThrowStatement ::= throw Expression SEMICOLON"); } //$NON-NLS-1$
- consumeStatementThrow();
+ consumeStatementThrow();
break;
-
+
case 583 : if (DEBUG) { System.out.println("ThrowExpression ::= throw Expression"); } //$NON-NLS-1$
- consumeThrowExpression() ;
+ consumeThrowExpression() ;
break;
-
+
case 584 : if (DEBUG) { System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN..."); } //$NON-NLS-1$
- consumeStatementSynchronized();
+ consumeStatementSynchronized();
break;
-
+
case 585 : if (DEBUG) { System.out.println("OnlySynchronized ::= synchronized"); } //$NON-NLS-1$
- consumeOnlySynchronized();
+ consumeOnlySynchronized();
break;
-
+
case 586 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catches"); } //$NON-NLS-1$
- consumeStatementTry(false, false);
+ consumeStatementTry(false, false);
break;
-
+
case 587 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catchesopt Finally"); } //$NON-NLS-1$
- consumeStatementTry(true, false);
+ consumeStatementTry(true, false);
break;
-
+
case 588 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); } //$NON-NLS-1$
- consumeStatementTry(false, true);
+ consumeStatementTry(false, true);
break;
-
+
case 589 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); } //$NON-NLS-1$
- consumeStatementTry(true, true);
+ consumeStatementTry(true, true);
break;
-
+
case 590 : if (DEBUG) { System.out.println("ResourceSpecification ::= LPAREN Resources ;opt RPAREN"); } //$NON-NLS-1$
- consumeResourceSpecification();
+ consumeResourceSpecification();
break;
-
+
case 591 : if (DEBUG) { System.out.println(";opt ::="); } //$NON-NLS-1$
- consumeResourceOptionalTrailingSemiColon(false);
+ consumeResourceOptionalTrailingSemiColon(false);
break;
-
+
case 592 : if (DEBUG) { System.out.println(";opt ::= SEMICOLON"); } //$NON-NLS-1$
- consumeResourceOptionalTrailingSemiColon(true);
+ consumeResourceOptionalTrailingSemiColon(true);
break;
-
+
case 593 : if (DEBUG) { System.out.println("Resources ::= Resource"); } //$NON-NLS-1$
- consumeSingleResource();
+ consumeSingleResource();
break;
-
+
case 594 : if (DEBUG) { System.out.println("Resources ::= Resources TrailingSemiColon Resource"); } //$NON-NLS-1$
- consumeMultipleResources();
+ consumeMultipleResources();
break;
-
+
case 595 : if (DEBUG) { System.out.println("TrailingSemiColon ::= SEMICOLON"); } //$NON-NLS-1$
- consumeResourceOptionalTrailingSemiColon(true);
+ consumeResourceOptionalTrailingSemiColon(true);
break;
-
+
case 596 : if (DEBUG) { System.out.println("Resource ::= Type PushModifiers VariableDeclaratorId..."); } //$NON-NLS-1$
- consumeResourceAsLocalVariableDeclaration();
+ consumeResourceAsLocalVariableDeclaration();
break;
-
+
case 597 : if (DEBUG) { System.out.println("Resource ::= Modifiers Type PushRealModifiers..."); } //$NON-NLS-1$
- consumeResourceAsLocalVariableDeclaration();
+ consumeResourceAsLocalVariableDeclaration();
break;
-
+
case 598 : if (DEBUG) { System.out.println("Resource ::= Name"); } //$NON-NLS-1$
- consumeResourceAsLocalVariable();
+ consumeResourceAsLocalVariable();
break;
-
+
case 599 : if (DEBUG) { System.out.println("Resource ::= FieldAccess"); } //$NON-NLS-1$
- consumeResourceAsFieldAccess();
+ consumeResourceAsFieldAccess();
break;
-
+
case 601 : if (DEBUG) { System.out.println("ExitTryBlock ::="); } //$NON-NLS-1$
- consumeExitTryBlock();
+ consumeExitTryBlock();
break;
-
+
case 603 : if (DEBUG) { System.out.println("Catches ::= Catches CatchClause"); } //$NON-NLS-1$
- consumeCatches();
+ consumeCatches();
break;
-
+
case 604 : if (DEBUG) { System.out.println("CatchClause ::= catch LPAREN CatchFormalParameter RPAREN"); } //$NON-NLS-1$
- consumeStatementCatch() ;
+ consumeStatementCatch() ;
break;
-
+
case 606 : if (DEBUG) { System.out.println("PushLPAREN ::= LPAREN"); } //$NON-NLS-1$
- consumeLeftParen();
+ consumeLeftParen();
break;
-
+
case 607 : if (DEBUG) { System.out.println("PushRPAREN ::= RPAREN"); } //$NON-NLS-1$
- consumeRightParen();
+ consumeRightParen();
break;
-
+
case 612 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= this"); } //$NON-NLS-1$
- consumePrimaryNoNewArrayThis();
+ consumePrimaryNoNewArrayThis();
break;
-
+
case 613 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression_NotName..."); } //$NON-NLS-1$
- consumePrimaryNoNewArray();
+ consumePrimaryNoNewArray();
break;
-
+
case 614 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Name PushRPAREN"); } //$NON-NLS-1$
- consumePrimaryNoNewArrayWithName();
+ consumePrimaryNoNewArrayWithName();
break;
-
+
case 618 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT this"); } //$NON-NLS-1$
- consumePrimaryNoNewArrayNameThis();
+ consumePrimaryNoNewArrayNameThis();
break;
-
+
case 619 : if (DEBUG) { System.out.println("QualifiedSuperReceiver ::= Name DOT super"); } //$NON-NLS-1$
- consumeQualifiedSuperReceiver();
+ consumeQualifiedSuperReceiver();
break;
-
+
case 620 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT class"); } //$NON-NLS-1$
- consumePrimaryNoNewArrayName();
+ consumePrimaryNoNewArrayName();
break;
-
+
case 621 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name Dims DOT class"); } //$NON-NLS-1$
- consumePrimaryNoNewArrayArrayType();
+ consumePrimaryNoNewArrayArrayType();
break;
-
+
case 622 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType Dims DOT class"); } //$NON-NLS-1$
- consumePrimaryNoNewArrayPrimitiveArrayType();
+ consumePrimaryNoNewArrayPrimitiveArrayType();
break;
-
+
case 623 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class"); } //$NON-NLS-1$
- consumePrimaryNoNewArrayPrimitiveType();
+ consumePrimaryNoNewArrayPrimitiveType();
break;
-
+
case 624 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); } //$NON-NLS-1$
- consumeRoleClassLiteral();
+ consumeRoleClassLiteral();
break;
-
+
case 630 : if (DEBUG) { System.out.println("ReferenceExpressionTypeArgumentsAndTrunk0 ::=..."); } //$NON-NLS-1$
- consumeReferenceExpressionTypeArgumentsAndTrunk(false);
+ consumeReferenceExpressionTypeArgumentsAndTrunk(false);
break;
-
+
case 631 : if (DEBUG) { System.out.println("ReferenceExpressionTypeArgumentsAndTrunk0 ::=..."); } //$NON-NLS-1$
- consumeReferenceExpressionTypeArgumentsAndTrunk(true);
+ consumeReferenceExpressionTypeArgumentsAndTrunk(true);
break;
-
+
case 632 : if (DEBUG) { System.out.println("ReferenceExpression ::= PrimitiveType Dims COLON_COLON"); } //$NON-NLS-1$
- consumeReferenceExpressionTypeForm(true);
+ consumeReferenceExpressionTypeForm(true);
break;
-
+
case 633 : if (DEBUG) { System.out.println("ReferenceExpression ::= Name Dimsopt COLON_COLON..."); } //$NON-NLS-1$
- consumeReferenceExpressionTypeForm(false);
+ consumeReferenceExpressionTypeForm(false);
break;
-
+
case 634 : if (DEBUG) { System.out.println("ReferenceExpression ::= Name BeginTypeArguments..."); } //$NON-NLS-1$
- consumeReferenceExpressionGenericTypeForm();
+ consumeReferenceExpressionGenericTypeForm();
break;
-
+
case 635 : if (DEBUG) { System.out.println("ReferenceExpression ::= Primary COLON_COLON..."); } //$NON-NLS-1$
- consumeReferenceExpressionPrimaryForm();
+ consumeReferenceExpressionPrimaryForm();
break;
-
+
case 636 : if (DEBUG) { System.out.println("ReferenceExpression ::= QualifiedSuperReceiver..."); } //$NON-NLS-1$
- consumeReferenceExpressionPrimaryForm();
+ consumeReferenceExpressionPrimaryForm();
break;
-
+
case 637 : if (DEBUG) { System.out.println("ReferenceExpression ::= super COLON_COLON..."); } //$NON-NLS-1$
- consumeReferenceExpressionSuperForm();
+ consumeReferenceExpressionSuperForm();
break;
-
+
case 638 : if (DEBUG) { System.out.println("NonWildTypeArgumentsopt ::="); } //$NON-NLS-1$
- consumeEmptyTypeArguments();
+ consumeEmptyTypeArguments();
break;
-
+
case 640 : if (DEBUG) { System.out.println("IdentifierOrNew ::= Identifier"); } //$NON-NLS-1$
- consumeIdentifierOrNew(false);
+ consumeIdentifierOrNew(false);
break;
-
+
case 641 : if (DEBUG) { System.out.println("IdentifierOrNew ::= new"); } //$NON-NLS-1$
- consumeIdentifierOrNew(true);
+ consumeIdentifierOrNew(true);
break;
-
+
case 642 : if (DEBUG) { System.out.println("LambdaExpression ::= LambdaParameters ARROW EnterLambda"); } //$NON-NLS-1$
- consumeLambdaExpression();
+ consumeLambdaExpression();
break;
-
+
case 643 : if (DEBUG) { System.out.println("EnterLambda ::="); } //$NON-NLS-1$
- consumeLambdaHeader();
+ consumeLambdaHeader();
break;
-
+
case 644 : if (DEBUG) { System.out.println("NestedLambda ::="); } //$NON-NLS-1$
- consumeNestedLambda();
+ consumeNestedLambda();
break;
-
+
case 645 : if (DEBUG) { System.out.println("LambdaParameters ::= Identifier NestedLambda"); } //$NON-NLS-1$
- consumeTypeElidedLambdaParameter(false);
+ consumeTypeElidedLambdaParameter(false);
break;
-
+
case 651 : if (DEBUG) { System.out.println("TypeElidedFormalParameterList ::=..."); } //$NON-NLS-1$
- consumeFormalParameterList();
+ consumeFormalParameterList();
break;
-
+
case 652 : if (DEBUG) { System.out.println("TypeElidedFormalParameter ::= Modifiersopt Identifier"); } //$NON-NLS-1$
- consumeTypeElidedLambdaParameter(true);
+ consumeTypeElidedLambdaParameter(true);
break;
-
+
case 655 : if (DEBUG) { System.out.println("ElidedLeftBraceAndReturn ::="); } //$NON-NLS-1$
- consumeElidedLeftBraceAndReturn();
+ consumeElidedLeftBraceAndReturn();
break;
-
+
case 656 : if (DEBUG) { System.out.println("AllocationHeader ::= new ClassType LPAREN..."); } //$NON-NLS-1$
- consumeAllocationHeader();
+ consumeAllocationHeader();
break;
-
+
case 657 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new..."); } //$NON-NLS-1$
- consumeClassInstanceCreationExpressionWithTypeArguments();
+ consumeClassInstanceCreationExpressionWithTypeArguments();
break;
-
+
case 658 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new ClassType..."); } //$NON-NLS-1$
- consumeClassInstanceCreationExpression();
+ consumeClassInstanceCreationExpression();
break;
-
+
case 659 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$
- consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ;
+ consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ;
break;
-
+
case 660 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$
- consumeClassInstanceCreationExpressionQualified() ;
+ consumeClassInstanceCreationExpressionQualified() ;
break;
-
+
case 661 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$
- consumeClassInstanceCreationExpressionQualified() ;
+ consumeClassInstanceCreationExpressionQualified() ;
break;
-
+
case 662 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$
- consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ;
+ consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ;
break;
-
+
case 663 : if (DEBUG) { System.out.println("EnterInstanceCreationArgumentList ::="); } //$NON-NLS-1$
- consumeEnterInstanceCreationArgumentList();
+ consumeEnterInstanceCreationArgumentList();
break;
-
+
case 664 : if (DEBUG) { System.out.println("ClassInstanceCreationExpressionName ::= Name DOT new"); } //$NON-NLS-1$
- consumeClassInstanceCreationExpressionName() ;
+ consumeClassInstanceCreationExpressionName() ;
break;
-
+
case 665 : if (DEBUG) { System.out.println("UnqualifiedClassBodyopt ::="); } //$NON-NLS-1$
- consumeClassBodyopt();
+ consumeClassBodyopt();
break;
-
+
case 667 : if (DEBUG) { System.out.println("UnqualifiedEnterAnonymousClassBody ::="); } //$NON-NLS-1$
- consumeEnterAnonymousClassBody(false);
+ consumeEnterAnonymousClassBody(false);
break;
-
+
case 668 : if (DEBUG) { System.out.println("QualifiedClassBodyopt ::="); } //$NON-NLS-1$
- consumeClassBodyopt();
+ consumeClassBodyopt();
break;
-
+
case 670 : if (DEBUG) { System.out.println("QualifiedEnterAnonymousClassBody ::="); } //$NON-NLS-1$
- consumeEnterAnonymousClassBody(true);
+ consumeEnterAnonymousClassBody(true);
break;
-
+
case 672 : if (DEBUG) { System.out.println("ArgumentList ::= ArgumentList COMMA Expression"); } //$NON-NLS-1$
- consumeArgumentList();
+ consumeArgumentList();
break;
-
+
case 673 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new PrimitiveType..."); } //$NON-NLS-1$
- consumeArrayCreationHeader();
+ consumeArrayCreationHeader();
break;
-
+
case 674 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); } //$NON-NLS-1$
- consumeArrayCreationHeader();
+ consumeArrayCreationHeader();
break;
-
+
case 675 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$
- consumeArrayCreationExpressionWithoutInitializer();
+ consumeArrayCreationExpressionWithoutInitializer();
break;
-
+
case 676 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new PrimitiveType"); } //$NON-NLS-1$
- consumeArrayCreationExpressionWithInitializer();
+ consumeArrayCreationExpressionWithInitializer();
break;
-
+
case 677 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$
- consumeArrayCreationExpressionWithoutInitializer();
+ consumeArrayCreationExpressionWithoutInitializer();
break;
-
+
case 678 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new..."); } //$NON-NLS-1$
- consumeArrayCreationExpressionWithInitializer();
+ consumeArrayCreationExpressionWithInitializer();
break;
-
+
case 680 : if (DEBUG) { System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs..."); } //$NON-NLS-1$
- consumeDimWithOrWithOutExprs();
+ consumeDimWithOrWithOutExprs();
break;
-
+
case 682 : if (DEBUG) { System.out.println("DimWithOrWithOutExpr ::= TypeAnnotationsopt LBRACKET..."); } //$NON-NLS-1$
- consumeDimWithOrWithOutExpr();
+ consumeDimWithOrWithOutExpr();
break;
-
+
case 683 : if (DEBUG) { System.out.println("Dims ::= DimsLoop"); } //$NON-NLS-1$
- consumeDims();
+ consumeDims();
break;
-
+
case 686 : if (DEBUG) { System.out.println("OneDimLoop ::= LBRACKET RBRACKET"); } //$NON-NLS-1$
- consumeOneDimLoop(false);
+ consumeOneDimLoop(false);
break;
-
+
case 687 : if (DEBUG) { System.out.println("OneDimLoop ::= TypeAnnotations LBRACKET RBRACKET"); } //$NON-NLS-1$
- consumeOneDimLoop(true);
+ consumeOneDimLoop(true);
break;
-
+
case 688 : if (DEBUG) { System.out.println("FieldAccess ::= Primary DOT Identifier"); } //$NON-NLS-1$
- consumeFieldAccess(false);
+ consumeFieldAccess(false);
break;
-
+
case 689 : if (DEBUG) { System.out.println("FieldAccess ::= super DOT Identifier"); } //$NON-NLS-1$
- consumeFieldAccess(true);
+ consumeFieldAccess(true);
break;
-
+
case 690 : if (DEBUG) { System.out.println("FieldAccess ::= QualifiedSuperReceiver DOT Identifier"); } //$NON-NLS-1$
- consumeFieldAccess(false);
+ consumeFieldAccess(false);
break;
-
+
case 691 : if (DEBUG) { System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$
- consumeMethodInvocationName();
+ consumeMethodInvocationName();
break;
-
+
case 692 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT OnlyTypeArguments..."); } //$NON-NLS-1$
- consumeMethodInvocationNameWithTypeArguments();
+ consumeMethodInvocationNameWithTypeArguments();
break;
-
+
case 693 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT OnlyTypeArguments..."); } //$NON-NLS-1$
- consumeMethodInvocationPrimaryWithTypeArguments();
+ consumeMethodInvocationPrimaryWithTypeArguments();
break;
-
+
case 694 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN..."); } //$NON-NLS-1$
- consumeMethodInvocationPrimary();
+ consumeMethodInvocationPrimary();
break;
-
+
case 695 : if (DEBUG) { System.out.println("MethodInvocation ::= QualifiedSuperReceiver DOT..."); } //$NON-NLS-1$
- consumeMethodInvocationPrimary();
+ consumeMethodInvocationPrimary();
break;
-
+
case 696 : if (DEBUG) { System.out.println("MethodInvocation ::= QualifiedSuperReceiver DOT..."); } //$NON-NLS-1$
- consumeMethodInvocationPrimaryWithTypeArguments();
+ consumeMethodInvocationPrimaryWithTypeArguments();
break;
-
+
case 697 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT OnlyTypeArguments..."); } //$NON-NLS-1$
- consumeMethodInvocationSuperWithTypeArguments();
+ consumeMethodInvocationSuperWithTypeArguments();
break;
-
+
case 698 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT Identifier LPAREN..."); } //$NON-NLS-1$
- consumeMethodInvocationSuper();
+ consumeMethodInvocationSuper();
break;
-
+
case 699 : if (DEBUG) { System.out.println("MethodInvocation ::= tsuper DOT Identifier LPAREN..."); } //$NON-NLS-1$
- consumeMethodInvocationTSuper(UNQUALIFIED);
+ consumeMethodInvocationTSuper(UNQUALIFIED);
break;
-
+
case 700 : if (DEBUG) { System.out.println("MethodInvocation ::= tsuper DOT OnlyTypeArguments..."); } //$NON-NLS-1$
- consumeMethodInvocationTSuperWithTypeArguments(0);
+ consumeMethodInvocationTSuperWithTypeArguments(0);
break;
-
+
case 701 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT tsuper DOT Identifier..."); } //$NON-NLS-1$
- consumeMethodInvocationTSuper(QUALIFIED);
+ consumeMethodInvocationTSuper(QUALIFIED);
break;
-
+
case 702 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT tsuper DOT..."); } //$NON-NLS-1$
- consumeMethodInvocationTSuperWithTypeArguments(2);
+ consumeMethodInvocationTSuperWithTypeArguments(2);
break;
-
+
case 703 : if (DEBUG) { System.out.println("MethodInvocation ::= base DOT Identifier LPAREN..."); } //$NON-NLS-1$
- consumeMethodInvocationBase(false);
+ consumeMethodInvocationBase(false);
break;
-
+
case 704 : if (DEBUG) { System.out.println("MethodInvocation ::= base DOT OnlyTypeArguments..."); } //$NON-NLS-1$
- consumeMethodInvocationBaseWithTypeArguments(false);
+ consumeMethodInvocationBaseWithTypeArguments(false);
break;
-
+
case 705 : if (DEBUG) { System.out.println("MethodInvocation ::= base DOT super DOT Identifier..."); } //$NON-NLS-1$
- consumeMethodInvocationBase(true);
+ consumeMethodInvocationBase(true);
break;
-
+
case 706 : if (DEBUG) { System.out.println("MethodInvocation ::= base DOT super DOT..."); } //$NON-NLS-1$
- consumeMethodInvocationBaseWithTypeArguments(true);
+ consumeMethodInvocationBaseWithTypeArguments(true);
break;
-
+
case 707 : if (DEBUG) { System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET"); } //$NON-NLS-1$
- consumeArrayAccess(true);
+ consumeArrayAccess(true);
break;
-
+
case 708 : if (DEBUG) { System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression..."); } //$NON-NLS-1$
- consumeArrayAccess(false);
+ consumeArrayAccess(false);
break;
-
+
case 709 : if (DEBUG) { System.out.println("ArrayAccess ::= ArrayCreationWithArrayInitializer..."); } //$NON-NLS-1$
- consumeArrayAccess(false);
+ consumeArrayAccess(false);
break;
-
+
case 711 : if (DEBUG) { System.out.println("PostfixExpression ::= Name"); } //$NON-NLS-1$
- consumePostfixExpression();
+ consumePostfixExpression();
break;
-
+
case 714 : if (DEBUG) { System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS"); } //$NON-NLS-1$
- consumeUnaryExpression(OperatorIds.PLUS,true);
+ consumeUnaryExpression(OperatorIds.PLUS,true);
break;
-
+
case 715 : if (DEBUG) { System.out.println("PostDecrementExpression ::= PostfixExpression..."); } //$NON-NLS-1$
- consumeUnaryExpression(OperatorIds.MINUS,true);
+ consumeUnaryExpression(OperatorIds.MINUS,true);
break;
-
+
case 716 : if (DEBUG) { System.out.println("PushPosition ::="); } //$NON-NLS-1$
- consumePushPosition();
+ consumePushPosition();
break;
-
+
case 719 : if (DEBUG) { System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression"); } //$NON-NLS-1$
- consumeUnaryExpression(OperatorIds.PLUS);
+ consumeUnaryExpression(OperatorIds.PLUS);
break;
-
+
case 720 : if (DEBUG) { System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression"); } //$NON-NLS-1$
- consumeUnaryExpression(OperatorIds.MINUS);
+ consumeUnaryExpression(OperatorIds.MINUS);
break;
-
+
case 722 : if (DEBUG) { System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition..."); } //$NON-NLS-1$
- consumeUnaryExpression(OperatorIds.PLUS,false);
+ consumeUnaryExpression(OperatorIds.PLUS,false);
break;
-
+
case 723 : if (DEBUG) { System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition..."); } //$NON-NLS-1$
- consumeUnaryExpression(OperatorIds.MINUS,false);
+ consumeUnaryExpression(OperatorIds.MINUS,false);
break;
-
+
case 725 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition..."); } //$NON-NLS-1$
- consumeUnaryExpression(OperatorIds.TWIDDLE);
+ consumeUnaryExpression(OperatorIds.TWIDDLE);
break;
-
+
case 726 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition..."); } //$NON-NLS-1$
- consumeUnaryExpression(OperatorIds.NOT);
+ consumeUnaryExpression(OperatorIds.NOT);
break;
-
+
case 728 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt..."); } //$NON-NLS-1$
- consumeCastExpressionWithPrimitiveType();
+ consumeCastExpressionWithPrimitiveType();
break;
-
+
case 729 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$
- consumeCastExpressionWithGenericsArray();
+ consumeCastExpressionWithGenericsArray();
break;
-
+
case 730 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$
- consumeCastExpressionWithQualifiedGenericsArray();
+ consumeCastExpressionWithQualifiedGenericsArray();
break;
-
+
case 731 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name PushRPAREN..."); } //$NON-NLS-1$
- consumeCastExpressionLL1();
+ consumeCastExpressionLL1();
break;
-
+
case 732 : if (DEBUG) { System.out.println("CastExpression ::= BeginIntersectionCast PushLPAREN..."); } //$NON-NLS-1$
- consumeCastExpressionLL1WithBounds();
+ consumeCastExpressionLL1WithBounds();
break;
-
+
case 733 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name Dims..."); } //$NON-NLS-1$
- consumeCastExpressionWithNameArray();
+ consumeCastExpressionWithNameArray();
break;
-
+
case 734 : if (DEBUG) { System.out.println("AdditionalBoundsListOpt ::="); } //$NON-NLS-1$
- consumeZeroAdditionalBounds();
+ consumeZeroAdditionalBounds();
break;
-
+
case 738 : if (DEBUG) { System.out.println("OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments"); } //$NON-NLS-1$
- consumeOnlyTypeArgumentsForCastExpression();
+ consumeOnlyTypeArgumentsForCastExpression();
break;
-
+
case 739 : if (DEBUG) { System.out.println("InsideCastExpression ::="); } //$NON-NLS-1$
- consumeInsideCastExpression();
+ consumeInsideCastExpression();
break;
-
+
case 740 : if (DEBUG) { System.out.println("InsideCastExpressionLL1 ::="); } //$NON-NLS-1$
- consumeInsideCastExpressionLL1();
+ consumeInsideCastExpressionLL1();
break;
-
+
case 741 : if (DEBUG) { System.out.println("InsideCastExpressionLL1WithBounds ::="); } //$NON-NLS-1$
- consumeInsideCastExpressionLL1WithBounds ();
+ consumeInsideCastExpressionLL1WithBounds ();
break;
-
+
case 742 : if (DEBUG) { System.out.println("InsideCastExpressionWithQualifiedGenerics ::="); } //$NON-NLS-1$
- consumeInsideCastExpressionWithQualifiedGenerics();
+ consumeInsideCastExpressionWithQualifiedGenerics();
break;
-
+
case 744 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.MULTIPLY);
+ consumeBinaryExpression(OperatorIds.MULTIPLY);
break;
-
+
case 745 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.DIVIDE);
+ consumeBinaryExpression(OperatorIds.DIVIDE);
break;
-
+
case 746 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.REMAINDER);
+ consumeBinaryExpression(OperatorIds.REMAINDER);
break;
-
+
case 748 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression PLUS..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.PLUS);
+ consumeBinaryExpression(OperatorIds.PLUS);
break;
-
+
case 749 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression MINUS..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.MINUS);
+ consumeBinaryExpression(OperatorIds.MINUS);
break;
-
+
case 751 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.LEFT_SHIFT);
+ consumeBinaryExpression(OperatorIds.LEFT_SHIFT);
break;
-
+
case 752 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);
+ consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);
break;
-
+
case 753 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);
+ consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);
break;
-
+
case 755 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.LESS);
+ consumeBinaryExpression(OperatorIds.LESS);
break;
-
+
case 756 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression GREATER..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.GREATER);
+ consumeBinaryExpression(OperatorIds.GREATER);
break;
-
+
case 757 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL"); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.LESS_EQUAL);
+ consumeBinaryExpression(OperatorIds.LESS_EQUAL);
break;
-
+
case 758 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.GREATER_EQUAL);
+ consumeBinaryExpression(OperatorIds.GREATER_EQUAL);
break;
-
+
case 760 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL..."); } //$NON-NLS-1$
- consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);
+ consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);
break;
-
+
case 761 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL..."); } //$NON-NLS-1$
- consumeEqualityExpression(OperatorIds.NOT_EQUAL);
+ consumeEqualityExpression(OperatorIds.NOT_EQUAL);
break;
-
+
case 763 : if (DEBUG) { System.out.println("AndExpression ::= AndExpression AND EqualityExpression"); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.AND);
+ consumeBinaryExpression(OperatorIds.AND);
break;
-
+
case 765 : if (DEBUG) { System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.XOR);
+ consumeBinaryExpression(OperatorIds.XOR);
break;
-
+
case 767 : if (DEBUG) { System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.OR);
+ consumeBinaryExpression(OperatorIds.OR);
break;
-
+
case 769 : if (DEBUG) { System.out.println("ConditionalAndExpression ::= ConditionalAndExpression..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.AND_AND);
+ consumeBinaryExpression(OperatorIds.AND_AND);
break;
-
+
case 771 : if (DEBUG) { System.out.println("ConditionalOrExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.OR_OR);
+ consumeBinaryExpression(OperatorIds.OR_OR);
break;
-
+
case 773 : if (DEBUG) { System.out.println("ConditionalExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$
- consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ;
+ consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ;
break;
-
+
case 776 : if (DEBUG) { System.out.println("Assignment ::= PostfixExpression AssignmentOperator..."); } //$NON-NLS-1$
- consumeAssignment();
+ consumeAssignment();
break;
-
+
case 778 : if (DEBUG) { System.out.println("Assignment ::= InvalidArrayInitializerAssignement"); } //$NON-NLS-1$
- ignoreExpressionAssignment();
+ ignoreExpressionAssignment();
break;
-
+
case 779 : if (DEBUG) { System.out.println("AssignmentOperator ::= EQUAL"); } //$NON-NLS-1$
- consumeAssignmentOperator(EQUAL);
+ consumeAssignmentOperator(EQUAL);
break;
-
+
case 780 : if (DEBUG) { System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL"); } //$NON-NLS-1$
- consumeAssignmentOperator(MULTIPLY);
+ consumeAssignmentOperator(MULTIPLY);
break;
-
+
case 781 : if (DEBUG) { System.out.println("AssignmentOperator ::= DIVIDE_EQUAL"); } //$NON-NLS-1$
- consumeAssignmentOperator(DIVIDE);
+ consumeAssignmentOperator(DIVIDE);
break;
-
+
case 782 : if (DEBUG) { System.out.println("AssignmentOperator ::= REMAINDER_EQUAL"); } //$NON-NLS-1$
- consumeAssignmentOperator(REMAINDER);
+ consumeAssignmentOperator(REMAINDER);
break;
-
+
case 783 : if (DEBUG) { System.out.println("AssignmentOperator ::= PLUS_EQUAL"); } //$NON-NLS-1$
- consumeAssignmentOperator(PLUS);
+ consumeAssignmentOperator(PLUS);
break;
-
+
case 784 : if (DEBUG) { System.out.println("AssignmentOperator ::= MINUS_EQUAL"); } //$NON-NLS-1$
- consumeAssignmentOperator(MINUS);
+ consumeAssignmentOperator(MINUS);
break;
-
+
case 785 : if (DEBUG) { System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL"); } //$NON-NLS-1$
- consumeAssignmentOperator(LEFT_SHIFT);
+ consumeAssignmentOperator(LEFT_SHIFT);
break;
-
+
case 786 : if (DEBUG) { System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$
- consumeAssignmentOperator(RIGHT_SHIFT);
+ consumeAssignmentOperator(RIGHT_SHIFT);
break;
-
+
case 787 : if (DEBUG) { System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$
- consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT);
+ consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT);
break;
-
+
case 788 : if (DEBUG) { System.out.println("AssignmentOperator ::= AND_EQUAL"); } //$NON-NLS-1$
- consumeAssignmentOperator(AND);
+ consumeAssignmentOperator(AND);
break;
-
+
case 789 : if (DEBUG) { System.out.println("AssignmentOperator ::= XOR_EQUAL"); } //$NON-NLS-1$
- consumeAssignmentOperator(XOR);
+ consumeAssignmentOperator(XOR);
break;
-
+
case 790 : if (DEBUG) { System.out.println("AssignmentOperator ::= OR_EQUAL"); } //$NON-NLS-1$
- consumeAssignmentOperator(OR);
+ consumeAssignmentOperator(OR);
break;
-
+
case 791 : if (DEBUG) { System.out.println("Expression ::= AssignmentExpression"); } //$NON-NLS-1$
- consumeExpression();
+ consumeExpression();
break;
-
+
case 794 : if (DEBUG) { System.out.println("Expressionopt ::="); } //$NON-NLS-1$
- consumeEmptyExpression();
+ consumeEmptyExpression();
break;
-
+
case 797 : if (DEBUG) { System.out.println("ConstantExpressions ::= ConstantExpressions COMMA..."); } //$NON-NLS-1$
- consumeConstantExpressions();
+ consumeConstantExpressions();
break;
-
+
case 801 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::="); } //$NON-NLS-1$
- consumeEmptyClassBodyDeclarationsopt();
+ consumeEmptyClassBodyDeclarationsopt();
break;
-
+
case 802 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$
- consumeClassBodyDeclarationsopt();
+ consumeClassBodyDeclarationsopt();
break;
-
+
case 803 : if (DEBUG) { System.out.println("Modifiersopt ::="); } //$NON-NLS-1$
- consumeDefaultModifiers();
+ consumeDefaultModifiers();
break;
-
+
case 804 : if (DEBUG) { System.out.println("Modifiersopt ::= Modifiers"); } //$NON-NLS-1$
- consumeModifiers();
+ consumeModifiers();
break;
-
+
case 805 : if (DEBUG) { System.out.println("BlockStatementsopt ::="); } //$NON-NLS-1$
- consumeEmptyBlockStatementsopt();
+ consumeEmptyBlockStatementsopt();
break;
-
+
case 807 : if (DEBUG) { System.out.println("Dimsopt ::="); } //$NON-NLS-1$
- consumeEmptyDimsopt();
+ consumeEmptyDimsopt();
break;
-
+
case 809 : if (DEBUG) { System.out.println("ArgumentListopt ::="); } //$NON-NLS-1$
- consumeEmptyArgumentListopt();
+ consumeEmptyArgumentListopt();
break;
-
+
case 813 : if (DEBUG) { System.out.println("FormalParameterListopt ::="); } //$NON-NLS-1$
- consumeFormalParameterListopt();
+ consumeFormalParameterListopt();
break;
-
+
case 817 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::="); } //$NON-NLS-1$
- consumeEmptyInterfaceMemberDeclarationsopt();
+ consumeEmptyInterfaceMemberDeclarationsopt();
break;
-
+
case 818 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$
- consumeInterfaceMemberDeclarationsopt();
+ consumeInterfaceMemberDeclarationsopt();
break;
-
+
case 819 : if (DEBUG) { System.out.println("NestedType ::="); } //$NON-NLS-1$
- consumeNestedType();
+ consumeNestedType();
break;
case 820 : if (DEBUG) { System.out.println("ForInitopt ::="); } //$NON-NLS-1$
- consumeEmptyForInitopt();
+ consumeEmptyForInitopt();
break;
-
+
case 822 : if (DEBUG) { System.out.println("ForUpdateopt ::="); } //$NON-NLS-1$
- consumeEmptyForUpdateopt();
+ consumeEmptyForUpdateopt();
break;
-
+
case 826 : if (DEBUG) { System.out.println("Catchesopt ::="); } //$NON-NLS-1$
- consumeEmptyCatchesopt();
+ consumeEmptyCatchesopt();
break;
-
+
case 828 : if (DEBUG) { System.out.println("EnumDeclaration ::= EnumHeader EnumBody"); } //$NON-NLS-1$
- consumeEnumDeclaration();
+ consumeEnumDeclaration();
break;
-
+
case 829 : if (DEBUG) { System.out.println("EnumHeader ::= EnumHeaderName ClassHeaderImplementsopt"); } //$NON-NLS-1$
- consumeEnumHeader();
+ consumeEnumHeader();
break;
-
+
case 830 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier"); } //$NON-NLS-1$
- consumeEnumHeaderName();
+ consumeEnumHeaderName();
break;
-
+
case 831 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier..."); } //$NON-NLS-1$
- consumeEnumHeaderNameWithTypeParameters();
+ consumeEnumHeaderNameWithTypeParameters();
break;
-
+
case 832 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumBodyDeclarationsopt RBRACE"); } //$NON-NLS-1$
- consumeEnumBodyNoConstants();
+ consumeEnumBodyNoConstants();
break;
-
+
case 833 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE COMMA EnumBodyDeclarationsopt..."); } //$NON-NLS-1$
- consumeEnumBodyNoConstants();
+ consumeEnumBodyNoConstants();
break;
-
+
case 834 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants COMMA..."); } //$NON-NLS-1$
- consumeEnumBodyWithConstants();
+ consumeEnumBodyWithConstants();
break;
-
+
case 835 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants..."); } //$NON-NLS-1$
- consumeEnumBodyWithConstants();
+ consumeEnumBodyWithConstants();
break;
-
+
case 837 : if (DEBUG) { System.out.println("EnumConstants ::= EnumConstants COMMA EnumConstant"); } //$NON-NLS-1$
- consumeEnumConstants();
+ consumeEnumConstants();
break;
-
+
case 838 : if (DEBUG) { System.out.println("EnumConstantHeaderName ::= Modifiersopt Identifier"); } //$NON-NLS-1$
- consumeEnumConstantHeaderName();
+ consumeEnumConstantHeaderName();
break;
-
+
case 839 : if (DEBUG) { System.out.println("EnumConstantHeader ::= EnumConstantHeaderName..."); } //$NON-NLS-1$
- consumeEnumConstantHeader();
+ consumeEnumConstantHeader();
break;
-
+
case 840 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader ForceNoDiet..."); } //$NON-NLS-1$
- consumeEnumConstantWithClassBody();
+ consumeEnumConstantWithClassBody();
break;
-
+
case 841 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader"); } //$NON-NLS-1$
- consumeEnumConstantNoClassBody();
+ consumeEnumConstantNoClassBody();
break;
-
+
case 842 : if (DEBUG) { System.out.println("Arguments ::= LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$
- consumeArguments();
+ consumeArguments();
break;
-
+
case 843 : if (DEBUG) { System.out.println("Argumentsopt ::="); } //$NON-NLS-1$
- consumeEmptyArguments();
+ consumeEmptyArguments();
break;
-
+
case 845 : if (DEBUG) { System.out.println("EnumDeclarations ::= SEMICOLON ClassBodyDeclarationsopt"); } //$NON-NLS-1$
- consumeEnumDeclarations();
+ consumeEnumDeclarations();
break;
-
+
case 846 : if (DEBUG) { System.out.println("EnumBodyDeclarationsopt ::="); } //$NON-NLS-1$
- consumeEmptyEnumDeclarations();
+ consumeEmptyEnumDeclarations();
break;
-
+
case 848 : if (DEBUG) { System.out.println("EnhancedForStatement ::= EnhancedForStatementHeader..."); } //$NON-NLS-1$
- consumeEnhancedForStatement();
+ consumeEnhancedForStatement();
break;
-
+
case 849 : if (DEBUG) { System.out.println("EnhancedForStatementNoShortIf ::=..."); } //$NON-NLS-1$
- consumeEnhancedForStatement();
+ consumeEnhancedForStatement();
break;
-
+
case 850 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Type..."); } //$NON-NLS-1$
- consumeEnhancedForStatementHeaderInit(false);
+ consumeEnhancedForStatementHeaderInit(false);
break;
-
+
case 851 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Modifiers"); } //$NON-NLS-1$
- consumeEnhancedForStatementHeaderInit(true);
+ consumeEnhancedForStatementHeaderInit(true);
break;
-
+
case 852 : if (DEBUG) { System.out.println("EnhancedForStatementHeader ::=..."); } //$NON-NLS-1$
- consumeEnhancedForStatementHeader();
+ consumeEnhancedForStatementHeader();
break;
-
+
case 853 : if (DEBUG) { System.out.println("SingleBaseImportDeclaration ::=..."); } //$NON-NLS-1$
- consumeImportDeclaration();
+ consumeImportDeclaration();
break;
-
+
case 854 : if (DEBUG) { System.out.println("SingleBaseImportDeclarationName ::= import base Name"); } //$NON-NLS-1$
- consumeSingleBaseImportDeclarationName();
+ consumeSingleBaseImportDeclarationName();
break;
-
+
case 855 : if (DEBUG) { System.out.println("SingleStaticImportDeclaration ::=..."); } //$NON-NLS-1$
- consumeImportDeclaration();
+ consumeImportDeclaration();
break;
-
+
case 856 : if (DEBUG) { System.out.println("SingleStaticImportDeclarationName ::= import static Name"); } //$NON-NLS-1$
- consumeSingleStaticImportDeclarationName();
+ consumeSingleStaticImportDeclarationName();
break;
-
+
case 857 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$
- consumeImportDeclaration();
+ consumeImportDeclaration();
break;
-
+
case 858 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclarationName ::= import static..."); } //$NON-NLS-1$
- consumeStaticImportOnDemandDeclarationName();
+ consumeStaticImportOnDemandDeclarationName();
break;
-
+
case 859 : if (DEBUG) { System.out.println("TypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$
- consumeTypeArguments();
+ consumeTypeArguments();
break;
-
+
case 860 : if (DEBUG) { System.out.println("OnlyTypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$
- consumeOnlyTypeArguments();
+ consumeOnlyTypeArguments();
break;
-
+
case 862 : if (DEBUG) { System.out.println("TypeArgumentList1 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$
- consumeTypeArgumentList1();
+ consumeTypeArgumentList1();
break;
-
+
case 864 : if (DEBUG) { System.out.println("TypeArgumentList ::= TypeArgumentList COMMA TypeArgument"); } //$NON-NLS-1$
- consumeTypeArgumentList();
+ consumeTypeArgumentList();
break;
-
+
case 865 : if (DEBUG) { System.out.println("TypeArgument ::= ReferenceType"); } //$NON-NLS-1$
- consumeTypeArgument();
+ consumeTypeArgument();
break;
-
+
case 871 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument -> AnyTypeAnchor"); } //$NON-NLS-1$
- confirmTypeAnchor();
+ confirmTypeAnchor();
break;
-
+
case 872 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument ::=..."); } //$NON-NLS-1$
- consumeTypeArgumentFromAnchor();
+ consumeTypeArgumentFromAnchor();
break;
-
+
case 873 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument ::=..."); } //$NON-NLS-1$
- consumeAnnotationsOnTypeArgumentFromAnchor();
+ consumeAnnotationsOnTypeArgumentFromAnchor();
break;
-
+
case 874 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument1 ::= AnyTypeAnchor..."); } //$NON-NLS-1$
- confirmTypeAnchor();
+ confirmTypeAnchor();
break;
-
+
case 875 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument1 ::=..."); } //$NON-NLS-1$
- consumeAnnotationsOnTypeArgumentFromAnchor();
+ consumeAnnotationsOnTypeArgumentFromAnchor();
break;
-
+
case 876 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument1 ::=..."); } //$NON-NLS-1$
- consumeAnnotationsOnTypeArgumentFromAnchor();
+ consumeAnnotationsOnTypeArgumentFromAnchor();
break;
-
+
case 877 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument2 ::= AnyTypeAnchor..."); } //$NON-NLS-1$
- confirmTypeAnchor();
+ confirmTypeAnchor();
break;
-
+
case 878 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument2 ::=..."); } //$NON-NLS-1$
- consumeAnnotationsOnTypeArgumentFromAnchor();
+ consumeAnnotationsOnTypeArgumentFromAnchor();
break;
-
+
case 879 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument2 ::=..."); } //$NON-NLS-1$
- consumeAnnotationsOnTypeArgumentFromAnchor();
+ consumeAnnotationsOnTypeArgumentFromAnchor();
break;
-
+
case 880 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument3 ::= AnyTypeAnchor..."); } //$NON-NLS-1$
- confirmTypeAnchor();
+ confirmTypeAnchor();
break;
-
+
case 881 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument3 ::=..."); } //$NON-NLS-1$
- consumeAnnotationsOnTypeArgumentFromAnchor();
+ consumeAnnotationsOnTypeArgumentFromAnchor();
break;
-
+
case 882 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument3 ::=..."); } //$NON-NLS-1$
- consumeAnnotationsOnTypeArgumentFromAnchor();
+ consumeAnnotationsOnTypeArgumentFromAnchor();
break;
-
+
case 883 : if (DEBUG) { System.out.println("NotAnAnchor ::="); } //$NON-NLS-1$
- convertTypeAnchor(0);
+ convertTypeAnchor(0);
break;
-
+
case 884 : if (DEBUG) { System.out.println("NotAnAnchor ::= LPAREN SingleMemberAnnotationMemberValue"); } //$NON-NLS-1$
- convertTypeAnchor(1);
+ convertTypeAnchor(1);
break;
-
+
case 885 : if (DEBUG) { System.out.println("NotAnAnchor ::= LPAREN MemberValuePairsopt RPAREN"); } //$NON-NLS-1$
- convertTypeAnchor(2);
+ convertTypeAnchor(2);
break;
-
+
case 888 : if (DEBUG) { System.out.println("TentativeTypeAnchor ::= ATOT UnannotatableName"); } //$NON-NLS-1$
- consumeTypeAnchor(false);
+ consumeTypeAnchor(false);
break;
-
+
case 889 : if (DEBUG) { System.out.println("TypeAnchor ::= ATOT base"); } //$NON-NLS-1$
- consumeTypeAnchor(true);
+ consumeTypeAnchor(true);
break;
-
+
case 890 : if (DEBUG) { System.out.println("TypeAnchor ::= ATOT this"); } //$NON-NLS-1$
- skipThisAnchor();
+ skipThisAnchor();
break;
-
+
case 891 : if (DEBUG) { System.out.println("TypeAnchor ::= ATOT UnannotatableName DOT base"); } //$NON-NLS-1$
- consumeQualifiedBaseTypeAnchor();
+ consumeQualifiedBaseTypeAnchor();
break;
-
+
case 894 : if (DEBUG) { System.out.println("ReferenceType1 ::= ReferenceType GREATER"); } //$NON-NLS-1$
- consumeReferenceType1();
+ consumeReferenceType1();
break;
-
+
case 895 : if (DEBUG) { System.out.println("ReferenceType1 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$
- consumeTypeArgumentReferenceType1();
+ consumeTypeArgumentReferenceType1();
break;
-
+
case 897 : if (DEBUG) { System.out.println("TypeArgumentList2 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$
- consumeTypeArgumentList2();
+ consumeTypeArgumentList2();
break;
-
+
case 900 : if (DEBUG) { System.out.println("ReferenceType2 ::= ReferenceType RIGHT_SHIFT"); } //$NON-NLS-1$
- consumeReferenceType2();
+ consumeReferenceType2();
break;
-
+
case 901 : if (DEBUG) { System.out.println("ReferenceType2 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$
- consumeTypeArgumentReferenceType2();
+ consumeTypeArgumentReferenceType2();
break;
-
+
case 903 : if (DEBUG) { System.out.println("TypeArgumentList3 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$
- consumeTypeArgumentList3();
+ consumeTypeArgumentList3();
break;
-
+
case 906 : if (DEBUG) { System.out.println("ReferenceType3 ::= ReferenceType UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$
- consumeReferenceType3();
+ consumeReferenceType3();
break;
-
+
case 907 : if (DEBUG) { System.out.println("Wildcard ::= TypeAnnotationsopt QUESTION"); } //$NON-NLS-1$
- consumeWildcard();
+ consumeWildcard();
break;
-
+
case 908 : if (DEBUG) { System.out.println("Wildcard ::= TypeAnnotationsopt QUESTION WildcardBounds"); } //$NON-NLS-1$
- consumeWildcardWithBounds();
+ consumeWildcardWithBounds();
break;
-
+
case 909 : if (DEBUG) { System.out.println("WildcardBounds ::= extends ReferenceType"); } //$NON-NLS-1$
- consumeWildcardBoundsExtends();
+ consumeWildcardBoundsExtends();
break;
-
+
case 910 : if (DEBUG) { System.out.println("WildcardBounds ::= super ReferenceType"); } //$NON-NLS-1$
- consumeWildcardBoundsSuper();
+ consumeWildcardBoundsSuper();
break;
-
+
case 911 : if (DEBUG) { System.out.println("Wildcard1 ::= TypeAnnotationsopt QUESTION GREATER"); } //$NON-NLS-1$
- consumeWildcard1();
+ consumeWildcard1();
break;
-
+
case 912 : if (DEBUG) { System.out.println("Wildcard1 ::= TypeAnnotationsopt QUESTION..."); } //$NON-NLS-1$
- consumeWildcard1WithBounds();
+ consumeWildcard1WithBounds();
break;
-
+
case 913 : if (DEBUG) { System.out.println("WildcardBounds1 ::= extends ReferenceType1"); } //$NON-NLS-1$
- consumeWildcardBounds1Extends();
+ consumeWildcardBounds1Extends();
break;
-
+
case 914 : if (DEBUG) { System.out.println("WildcardBounds1 ::= super ReferenceType1"); } //$NON-NLS-1$
- consumeWildcardBounds1Super();
+ consumeWildcardBounds1Super();
break;
-
+
case 915 : if (DEBUG) { System.out.println("Wildcard2 ::= TypeAnnotationsopt QUESTION RIGHT_SHIFT"); } //$NON-NLS-1$
- consumeWildcard2();
+ consumeWildcard2();
break;
-
+
case 916 : if (DEBUG) { System.out.println("Wildcard2 ::= TypeAnnotationsopt QUESTION..."); } //$NON-NLS-1$
- consumeWildcard2WithBounds();
+ consumeWildcard2WithBounds();
break;
-
+
case 917 : if (DEBUG) { System.out.println("WildcardBounds2 ::= extends ReferenceType2"); } //$NON-NLS-1$
- consumeWildcardBounds2Extends();
+ consumeWildcardBounds2Extends();
break;
-
+
case 918 : if (DEBUG) { System.out.println("WildcardBounds2 ::= super ReferenceType2"); } //$NON-NLS-1$
- consumeWildcardBounds2Super();
+ consumeWildcardBounds2Super();
break;
-
+
case 919 : if (DEBUG) { System.out.println("Wildcard3 ::= TypeAnnotationsopt QUESTION..."); } //$NON-NLS-1$
- consumeWildcard3();
+ consumeWildcard3();
break;
-
+
case 920 : if (DEBUG) { System.out.println("Wildcard3 ::= TypeAnnotationsopt QUESTION..."); } //$NON-NLS-1$
- consumeWildcard3WithBounds();
+ consumeWildcard3WithBounds();
break;
-
+
case 921 : if (DEBUG) { System.out.println("WildcardBounds3 ::= extends ReferenceType3"); } //$NON-NLS-1$
- consumeWildcardBounds3Extends();
+ consumeWildcardBounds3Extends();
break;
-
+
case 922 : if (DEBUG) { System.out.println("WildcardBounds3 ::= super ReferenceType3"); } //$NON-NLS-1$
- consumeWildcardBounds3Super();
+ consumeWildcardBounds3Super();
break;
-
+
case 923 : if (DEBUG) { System.out.println("TypeParameterHeader ::= TypeAnnotationsopt Identifier"); } //$NON-NLS-1$
- consumeTypeParameterHeader();
+ consumeTypeParameterHeader();
break;
-
+
case 924 : if (DEBUG) { System.out.println("TypeParameters ::= LESS TypeParameterList1"); } //$NON-NLS-1$
- consumeTypeParameters();
+ consumeTypeParameters();
break;
-
+
case 926 : if (DEBUG) { System.out.println("TypeParameterList ::= TypeParameterList COMMA..."); } //$NON-NLS-1$
- consumeTypeParameterList();
+ consumeTypeParameterList();
break;
-
+
case 928 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$
- consumeTypeParameterWithExtends();
+ consumeTypeParameterWithExtends();
break;
-
+
case 929 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$
- consumeTypeParameterWithExtendsAndBounds();
+ consumeTypeParameterWithExtendsAndBounds();
break;
-
+
case 930 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader base ReferenceType"); } //$NON-NLS-1$
- consumeTypeParameterWithBase();
+ consumeTypeParameterWithBase();
break;
-
+
case 934 : if (DEBUG) { System.out.println("TypeValueParameter ::= TypeParameterHeader Identifier"); } //$NON-NLS-1$
- consumeTypeValueParameter();
+ consumeTypeValueParameter();
break;
-
+
case 939 : if (DEBUG) { System.out.println("TypeBoundOpt ::= extends ReferenceType"); } //$NON-NLS-1$
- consumeBoundsOfAnchoredTypeParameter();
+ consumeBoundsOfAnchoredTypeParameter();
break;
-
+
case 941 : if (DEBUG) { System.out.println("TypeBoundOpt1 ::= extends ReferenceType1"); } //$NON-NLS-1$
- consumeBoundsOfAnchoredTypeParameter();
+ consumeBoundsOfAnchoredTypeParameter();
break;
-
+
case 942 : if (DEBUG) { System.out.println("AnchoredTypeParameterHeader0 ::= TypeParameterHeader..."); } //$NON-NLS-1$
- consumeAnchoredTypeParameter();
+ consumeAnchoredTypeParameter();
break;
-
+
case 944 : if (DEBUG) { System.out.println("AdditionalBoundList ::= AdditionalBoundList..."); } //$NON-NLS-1$
- consumeAdditionalBoundList();
+ consumeAdditionalBoundList();
break;
-
+
case 945 : if (DEBUG) { System.out.println("AdditionalBound ::= AND ReferenceType"); } //$NON-NLS-1$
- consumeAdditionalBound();
+ consumeAdditionalBound();
break;
-
+
case 947 : if (DEBUG) { System.out.println("TypeParameterList1 ::= TypeParameterList COMMA..."); } //$NON-NLS-1$
- consumeTypeParameterList1();
+ consumeTypeParameterList1();
break;
-
+
case 948 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader GREATER"); } //$NON-NLS-1$
- consumeTypeParameter1();
+ consumeTypeParameter1();
break;
-
+
case 949 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$
- consumeTypeParameter1WithExtends();
+ consumeTypeParameter1WithExtends();
break;
-
+
case 950 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader base..."); } //$NON-NLS-1$
- consumeTypeParameter1WithBase();
+ consumeTypeParameter1WithBase();
break;
-
+
case 951 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$
- consumeTypeParameter1WithExtendsAndBounds();
+ consumeTypeParameter1WithExtendsAndBounds();
break;
-
+
case 953 : if (DEBUG) { System.out.println("AdditionalBoundList1 ::= AdditionalBoundList..."); } //$NON-NLS-1$
- consumeAdditionalBoundList1();
+ consumeAdditionalBoundList1();
break;
-
+
case 954 : if (DEBUG) { System.out.println("AdditionalBound1 ::= AND ReferenceType1"); } //$NON-NLS-1$
- consumeAdditionalBound1();
+ consumeAdditionalBound1();
break;
-
+
case 960 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= PLUS PushPosition..."); } //$NON-NLS-1$
- consumeUnaryExpression(OperatorIds.PLUS);
+ consumeUnaryExpression(OperatorIds.PLUS);
break;
-
+
case 961 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= MINUS PushPosition..."); } //$NON-NLS-1$
- consumeUnaryExpression(OperatorIds.MINUS);
+ consumeUnaryExpression(OperatorIds.MINUS);
break;
-
+
case 964 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= TWIDDLE..."); } //$NON-NLS-1$
- consumeUnaryExpression(OperatorIds.TWIDDLE);
+ consumeUnaryExpression(OperatorIds.TWIDDLE);
break;
-
+
case 965 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= NOT PushPosition"); } //$NON-NLS-1$
- consumeUnaryExpression(OperatorIds.NOT);
+ consumeUnaryExpression(OperatorIds.NOT);
break;
-
+
case 968 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.MULTIPLY);
+ consumeBinaryExpression(OperatorIds.MULTIPLY);
break;
-
+
case 969 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name MULTIPLY..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.MULTIPLY);
+ consumeBinaryExpressionWithName(OperatorIds.MULTIPLY);
break;
-
+
case 970 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.DIVIDE);
+ consumeBinaryExpression(OperatorIds.DIVIDE);
break;
-
+
case 971 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name DIVIDE..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.DIVIDE);
+ consumeBinaryExpressionWithName(OperatorIds.DIVIDE);
break;
-
+
case 972 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.REMAINDER);
+ consumeBinaryExpression(OperatorIds.REMAINDER);
break;
-
+
case 973 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name REMAINDER..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.REMAINDER);
+ consumeBinaryExpressionWithName(OperatorIds.REMAINDER);
break;
-
+
case 975 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.PLUS);
+ consumeBinaryExpression(OperatorIds.PLUS);
break;
-
+
case 976 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name PLUS..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.PLUS);
+ consumeBinaryExpressionWithName(OperatorIds.PLUS);
break;
-
+
case 977 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.MINUS);
+ consumeBinaryExpression(OperatorIds.MINUS);
break;
-
+
case 978 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name MINUS..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.MINUS);
+ consumeBinaryExpressionWithName(OperatorIds.MINUS);
break;
-
+
case 980 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.LEFT_SHIFT);
+ consumeBinaryExpression(OperatorIds.LEFT_SHIFT);
break;
-
+
case 981 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name LEFT_SHIFT..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.LEFT_SHIFT);
+ consumeBinaryExpressionWithName(OperatorIds.LEFT_SHIFT);
break;
-
+
case 982 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);
+ consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);
break;
-
+
case 983 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name RIGHT_SHIFT..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.RIGHT_SHIFT);
+ consumeBinaryExpressionWithName(OperatorIds.RIGHT_SHIFT);
break;
-
+
case 984 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);
+ consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);
break;
-
+
case 985 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name UNSIGNED_RIGHT_SHIFT..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.UNSIGNED_RIGHT_SHIFT);
+ consumeBinaryExpressionWithName(OperatorIds.UNSIGNED_RIGHT_SHIFT);
break;
-
+
case 987 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.LESS);
+ consumeBinaryExpression(OperatorIds.LESS);
break;
-
+
case 988 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.LESS);
+ consumeBinaryExpressionWithName(OperatorIds.LESS);
break;
-
+
case 989 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.GREATER);
+ consumeBinaryExpression(OperatorIds.GREATER);
break;
-
+
case 990 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.GREATER);
+ consumeBinaryExpressionWithName(OperatorIds.GREATER);
break;
-
+
case 991 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.LESS_EQUAL);
+ consumeBinaryExpression(OperatorIds.LESS_EQUAL);
break;
-
+
case 992 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS_EQUAL..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.LESS_EQUAL);
+ consumeBinaryExpressionWithName(OperatorIds.LESS_EQUAL);
break;
-
+
case 993 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.GREATER_EQUAL);
+ consumeBinaryExpression(OperatorIds.GREATER_EQUAL);
break;
-
+
case 994 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER_EQUAL..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.GREATER_EQUAL);
+ consumeBinaryExpressionWithName(OperatorIds.GREATER_EQUAL);
break;
-
+
case 996 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::= Name instanceof..."); } //$NON-NLS-1$
- consumeInstanceOfExpressionWithName();
+ consumeInstanceOfExpressionWithName();
break;
-
+
case 997 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeInstanceOfExpression();
+ consumeInstanceOfExpression();
break;
-
+
case 999 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);
+ consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);
break;
-
+
case 1000 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name EQUAL_EQUAL..."); } //$NON-NLS-1$
- consumeEqualityExpressionWithName(OperatorIds.EQUAL_EQUAL);
+ consumeEqualityExpressionWithName(OperatorIds.EQUAL_EQUAL);
break;
-
+
case 1001 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeEqualityExpression(OperatorIds.NOT_EQUAL);
+ consumeEqualityExpression(OperatorIds.NOT_EQUAL);
break;
-
+
case 1002 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name NOT_EQUAL..."); } //$NON-NLS-1$
- consumeEqualityExpressionWithName(OperatorIds.NOT_EQUAL);
+ consumeEqualityExpressionWithName(OperatorIds.NOT_EQUAL);
break;
-
+
case 1004 : if (DEBUG) { System.out.println("AndExpression_NotName ::= AndExpression_NotName AND..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.AND);
+ consumeBinaryExpression(OperatorIds.AND);
break;
-
+
case 1005 : if (DEBUG) { System.out.println("AndExpression_NotName ::= Name AND EqualityExpression"); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.AND);
+ consumeBinaryExpressionWithName(OperatorIds.AND);
break;
-
+
case 1007 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.XOR);
+ consumeBinaryExpression(OperatorIds.XOR);
break;
-
+
case 1008 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::= Name XOR..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.XOR);
+ consumeBinaryExpressionWithName(OperatorIds.XOR);
break;
-
+
case 1010 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.OR);
+ consumeBinaryExpression(OperatorIds.OR);
break;
-
+
case 1011 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::= Name OR..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.OR);
+ consumeBinaryExpressionWithName(OperatorIds.OR);
break;
-
+
case 1013 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.AND_AND);
+ consumeBinaryExpression(OperatorIds.AND_AND);
break;
-
+
case 1014 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::= Name AND_AND..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.AND_AND);
+ consumeBinaryExpressionWithName(OperatorIds.AND_AND);
break;
-
+
case 1016 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeBinaryExpression(OperatorIds.OR_OR);
+ consumeBinaryExpression(OperatorIds.OR_OR);
break;
-
+
case 1017 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::= Name OR_OR..."); } //$NON-NLS-1$
- consumeBinaryExpressionWithName(OperatorIds.OR_OR);
+ consumeBinaryExpressionWithName(OperatorIds.OR_OR);
break;
-
+
case 1019 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::=..."); } //$NON-NLS-1$
- consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ;
+ consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ;
break;
-
+
case 1020 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::= Name QUESTION..."); } //$NON-NLS-1$
- consumeConditionalExpressionWithName(OperatorIds.QUESTIONCOLON) ;
+ consumeConditionalExpressionWithName(OperatorIds.QUESTIONCOLON) ;
break;
-
+
case 1024 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); } //$NON-NLS-1$
- consumeAnnotationTypeDeclarationHeaderName() ;
+ consumeAnnotationTypeDeclarationHeaderName() ;
break;
-
+
case 1025 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); } //$NON-NLS-1$
- consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ;
+ consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ;
break;
-
+
case 1026 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); } //$NON-NLS-1$
- consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ;
+ consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ;
break;
-
+
case 1027 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); } //$NON-NLS-1$
- consumeAnnotationTypeDeclarationHeaderName() ;
+ consumeAnnotationTypeDeclarationHeaderName() ;
break;
-
+
case 1028 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeader ::=..."); } //$NON-NLS-1$
- consumeAnnotationTypeDeclarationHeader() ;
+ consumeAnnotationTypeDeclarationHeader() ;
break;
-
+
case 1029 : if (DEBUG) { System.out.println("AnnotationTypeDeclaration ::=..."); } //$NON-NLS-1$
- consumeAnnotationTypeDeclaration() ;
+ consumeAnnotationTypeDeclaration() ;
break;
-
+
case 1031 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::="); } //$NON-NLS-1$
- consumeEmptyAnnotationTypeMemberDeclarationsopt() ;
+ consumeEmptyAnnotationTypeMemberDeclarationsopt() ;
break;
-
+
case 1032 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$
- consumeAnnotationTypeMemberDeclarationsopt() ;
+ consumeAnnotationTypeMemberDeclarationsopt() ;
break;
-
+
case 1034 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarations ::=..."); } //$NON-NLS-1$
- consumeAnnotationTypeMemberDeclarations() ;
+ consumeAnnotationTypeMemberDeclarations() ;
break;
-
+
case 1035 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt..."); } //$NON-NLS-1$
- consumeMethodHeaderNameWithTypeParameters(true);
+ consumeMethodHeaderNameWithTypeParameters(true);
break;
-
+
case 1036 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt Type..."); } //$NON-NLS-1$
- consumeMethodHeaderName(true);
+ consumeMethodHeaderName(true);
break;
-
+
case 1037 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::="); } //$NON-NLS-1$
- consumeEmptyMethodHeaderDefaultValue() ;
+ consumeEmptyMethodHeaderDefaultValue() ;
break;
-
+
case 1038 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::= DefaultValue"); } //$NON-NLS-1$
- consumeMethodHeaderDefaultValue();
+ consumeMethodHeaderDefaultValue();
break;
-
+
case 1039 : if (DEBUG) { System.out.println("AnnotationMethodHeader ::= AnnotationMethodHeaderName"); } //$NON-NLS-1$
- consumeMethodHeader();
+ consumeMethodHeader();
break;
-
+
case 1040 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclaration ::=..."); } //$NON-NLS-1$
- consumeAnnotationTypeMemberDeclaration() ;
+ consumeAnnotationTypeMemberDeclaration() ;
break;
-
+
case 1048 : if (DEBUG) { System.out.println("AnnotationName ::= AT UnannotatableName"); } //$NON-NLS-1$
- consumeAnnotationName() ;
+ consumeAnnotationName() ;
break;
-
+
case 1049 : if (DEBUG) { System.out.println("NormalAnnotation ::= AnnotationName LPAREN..."); } //$NON-NLS-1$
- consumeNormalAnnotation(false) ;
+ consumeNormalAnnotation(false) ;
break;
-
+
case 1050 : if (DEBUG) { System.out.println("MemberValuePairsopt ::="); } //$NON-NLS-1$
- consumeEmptyMemberValuePairsopt() ;
+ consumeEmptyMemberValuePairsopt() ;
break;
-
+
case 1053 : if (DEBUG) { System.out.println("MemberValuePairs ::= MemberValuePairs COMMA..."); } //$NON-NLS-1$
- consumeMemberValuePairs() ;
+ consumeMemberValuePairs() ;
break;
-
+
case 1054 : if (DEBUG) { System.out.println("MemberValuePair ::= SimpleName EQUAL EnterMemberValue"); } //$NON-NLS-1$
- consumeMemberValuePair() ;
+ consumeMemberValuePair() ;
break;
-
+
case 1055 : if (DEBUG) { System.out.println("EnterMemberValue ::="); } //$NON-NLS-1$
- consumeEnterMemberValue() ;
+ consumeEnterMemberValue() ;
break;
-
+
case 1056 : if (DEBUG) { System.out.println("ExitMemberValue ::="); } //$NON-NLS-1$
- consumeExitMemberValue() ;
+ consumeExitMemberValue() ;
break;
-
+
case 1058 : if (DEBUG) { System.out.println("MemberValue ::= Name"); } //$NON-NLS-1$
- consumeMemberValueAsName() ;
+ consumeMemberValueAsName() ;
break;
-
+
case 1061 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$
- consumeMemberValueArrayInitializer() ;
+ consumeMemberValueArrayInitializer() ;
break;
-
+
case 1062 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$
- consumeMemberValueArrayInitializer() ;
+ consumeMemberValueArrayInitializer() ;
break;
-
+
case 1063 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$
- consumeEmptyMemberValueArrayInitializer() ;
+ consumeEmptyMemberValueArrayInitializer() ;
break;
-
+
case 1064 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); } //$NON-NLS-1$
- consumeEmptyMemberValueArrayInitializer() ;
+ consumeEmptyMemberValueArrayInitializer() ;
break;
-
+
case 1065 : if (DEBUG) { System.out.println("EnterMemberValueArrayInitializer ::="); } //$NON-NLS-1$
- consumeEnterMemberValueArrayInitializer() ;
+ consumeEnterMemberValueArrayInitializer() ;
break;
-
+
case 1067 : if (DEBUG) { System.out.println("MemberValues ::= MemberValues COMMA MemberValue"); } //$NON-NLS-1$
- consumeMemberValues() ;
+ consumeMemberValues() ;
break;
-
+
case 1068 : if (DEBUG) { System.out.println("MarkerAnnotation ::= AnnotationName"); } //$NON-NLS-1$
- consumeMarkerAnnotation(false) ;
+ consumeMarkerAnnotation(false) ;
break;
-
+
case 1069 : if (DEBUG) { System.out.println("SingleMemberAnnotationMemberValue ::= MemberValue"); } //$NON-NLS-1$
- consumeSingleMemberAnnotationMemberValue() ;
+ consumeSingleMemberAnnotationMemberValue() ;
break;
-
+
case 1070 : if (DEBUG) { System.out.println("SingleMemberAnnotation ::= AnnotationName LPAREN..."); } //$NON-NLS-1$
- consumeSingleMemberAnnotation(false) ;
+ consumeSingleMemberAnnotation(false) ;
break;
-
+
case 1071 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt..."); } //$NON-NLS-1$
- consumeRecoveryMethodHeaderNameWithTypeParameters();
+ consumeRecoveryMethodHeaderNameWithTypeParameters();
break;
-
+
case 1072 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt Type..."); } //$NON-NLS-1$
- consumeRecoveryMethodHeaderName();
+ consumeRecoveryMethodHeaderName();
break;
-
+
case 1073 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= ModifiersWithDefault..."); } //$NON-NLS-1$
- consumeRecoveryMethodHeaderNameWithTypeParameters();
+ consumeRecoveryMethodHeaderNameWithTypeParameters();
break;
-
+
case 1074 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= ModifiersWithDefault Type"); } //$NON-NLS-1$
- consumeRecoveryMethodHeaderName();
+ consumeRecoveryMethodHeaderName();
break;
-
+
case 1075 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); } //$NON-NLS-1$
- consumeMethodHeader();
+ consumeMethodHeader();
break;
-
+
case 1076 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); } //$NON-NLS-1$
- consumeMethodHeader();
+ consumeMethodHeader();
break;
-
+
case 1079 : if (DEBUG) { System.out.println("RecoveryCallinHeader ::= RecoveryCallinBindingLeftLong"); } //$NON-NLS-1$
- consumeCallinHeader();
+ consumeCallinHeader();
break;
-
+
case 1080 : if (DEBUG) { System.out.println("RecoveryCallinHeader ::= Modifiersopt CallinLabel..."); } //$NON-NLS-1$
- consumeCallinHeader();
+ consumeCallinHeader();
break;
-
+
case 1081 : if (DEBUG) { System.out.println("RecoveryCallinBindingLeftLong ::=..."); } //$NON-NLS-1$
- consumeCallinBindingLeft(true);
+ consumeCallinBindingLeft(true);
break;
-
+
case 1082 : if (DEBUG) { System.out.println("RecoveryCallinHeader ::= Modifiersopt..."); } //$NON-NLS-1$
- consumeCallinHeader();
+ consumeCallinHeader();
break;
-
+
case 1083 : if (DEBUG) { System.out.println("RecoveryCallinHeader ::= Modifiersopt CallinLabel..."); } //$NON-NLS-1$
- consumeCallinHeader();
+ consumeCallinHeader();
break;
-
+
case 1084 : if (DEBUG) { System.out.println("RecoveryCalloutHeader ::=..."); } //$NON-NLS-1$
- consumeCalloutHeader();
+ consumeCalloutHeader();
break;
-
+
case 1085 : if (DEBUG) { System.out.println("RecoveryCalloutBindingLeftLong ::=..."); } //$NON-NLS-1$
- consumeCalloutBindingLeft(true);
+ consumeCalloutBindingLeft(true);
break;
-
+
case 1086 : if (DEBUG) { System.out.println("RecoveryCalloutHeader ::=..."); } //$NON-NLS-1$
- consumeCalloutHeader();
+ consumeCalloutHeader();
break;
-
+
case 1087 : if (DEBUG) { System.out.println("RecoveryCalloutHeader ::= Modifiersopt..."); } //$NON-NLS-1$
- consumeCalloutHeader();
+ consumeCalloutHeader();
break;
-
+
case 1088 : if (DEBUG) { System.out.println("RecoveryMethodSpecLong ::= RecoveryMethodHeaderName..."); } //$NON-NLS-1$
- consumeMethodSpecLong(false);
+ consumeMethodSpecLong(false);
break;
-
+
}
}
protected void consumeVariableDeclaratorIdParameter () {
@@ -11085,17 +11085,17 @@ public boolean isAssistParser() {
return false;
}
protected void consumeNestedLambda() {
- // NestedLambda ::= $empty - we get here just after the type+parenthesis elided singleton parameter or just before the '(' of the parameter list.
+ // NestedLambda ::= $empty - we get here just after the type+parenthesis elided singleton parameter or just before the '(' of the parameter list.
consumeNestedType();
this.nestedMethod[this.nestedType] ++;
LambdaExpression lambda = new LambdaExpression(this.compilationUnit.compilationResult, isAssistParser());
pushOnAstStack(lambda);
- this.processingLambdaParameterList = true;
+ this.processingLambdaParameterList = true;
}
protected void consumeLambdaHeader() {
// LambdaHeader ::= LambdaParameters '->' Synthetic/fake production with a synthetic non-terminal. Body not seen yet.
-
+
//{ObjectTeams: two unused ints from consumeToken() (for TokenNameARROW, for use as TokenNameBINDOUT):
this.intPtr-=2;
int arrowPosition = this.intStack[this.intPtr--] - 1; // saved during consumeToken()
@@ -11103,7 +11103,7 @@ protected void consumeLambdaHeader() {
int arrowPosition = this.scanner.currentPosition - 1;
*/
// SH}
-
+
Argument [] arguments = null;
int length = this.astLengthStack[this.astLengthPtr--];
this.astPtr -= length;
@@ -11163,11 +11163,11 @@ private void setArgumentsTypeVar(LambdaExpression lexp) {
}
}
protected void consumeLambdaExpression() {
-
+
// LambdaExpression ::= LambdaHeader LambdaBody
this.nestedType--;
-
+
this.astLengthPtr--; // pop length for LambdaBody (always 1)
Statement body = (Statement) this.astStack[this.astPtr--];
if (body instanceof Block) {
@@ -11183,7 +11183,7 @@ protected void consumeLambdaExpression() {
this.astLengthPtr--;
lexp.setBody(body);
lexp.sourceEnd = body.sourceEnd;
-
+
if (body instanceof Expression && ((Expression) body).isTrulyExpression()) {
Expression expression = (Expression) body;
expression.statementEnd = body.sourceEnd;
@@ -11202,7 +11202,7 @@ protected void consumeLambdaExpression() {
if (lexp.compilationResult.getCompilationUnit() == null) {
// unit built out of model. Stash a textual representation of lambda to enable LE.copy().
int length = lexp.sourceEnd - lexp.sourceStart + 1;
- System.arraycopy(this.scanner.getSource(), lexp.sourceStart, lexp.text = new char [length], 0, length);
+ System.arraycopy(this.scanner.getSource(), lexp.sourceStart, lexp.text = new char [length], 0, length);
}
}
@@ -11219,18 +11219,18 @@ protected Argument typeElidedArgument() {
ClassFileConstants.AccDefault,
true);
arg.declarationSourceStart = (int) (namePositions >>> 32);
- return arg;
+ return arg;
}
protected void consumeTypeElidedLambdaParameter(boolean parenthesized) {
// LambdaParameters ::= Identifier
// TypeElidedFormalParameter ::= Modifiersopt Identifier
-
+
int modifier = ClassFileConstants.AccDefault;
int annotationLength = 0;
int modifiersStart = 0;
- if (parenthesized) { // The grammar is permissive enough to allow optional modifiers for the parenthesized version, they should be rejected if present.
+ if (parenthesized) { // The grammar is permissive enough to allow optional modifiers for the parenthesized version, they should be rejected if present.
modifiersStart = this.intStack[this.intPtr--];
modifier = this.intStack[this.intPtr--];
// pop annotations
@@ -11242,7 +11242,7 @@ protected void consumeTypeElidedLambdaParameter(boolean parenthesized) {
if (modifier != ClassFileConstants.AccDefault || annotationLength != 0) {
problemReporter().illegalModifiersForElidedType(arg);
arg.declarationSourceStart = modifiersStart;
- }
+ }
if (!parenthesized) { // in the absence of '(' and ')', record positions.
pushOnIntStack(arg.declarationSourceStart);
pushOnIntStack(arg.declarationSourceEnd);
@@ -11262,13 +11262,13 @@ protected void consumeElidedLeftBraceAndReturn() {
this.stateStackLengthStack = new int[stackLength + 4], 0,
stackLength);
}
- this.stateStackLengthStack[this.valueLambdaNestDepth] = this.stateStackTop;
+ this.stateStackLengthStack[this.valueLambdaNestDepth] = this.stateStackTop;
}
protected void consumeExpression() {
/* Expression ::= AssignmentExpression
Alert ! Sleight of hand - Part II: See if we are at the state with the item: "ElidedLeftBraceAndReturn Expression .ElidedSemicolonAndRightBrace"
If so, push back the current token into the lexer stream, materialize the synthetic terminal marker symbol, switch and continue.
- */
+ */
if (this.valueLambdaNestDepth >= 0 && this.stateStackLengthStack[this.valueLambdaNestDepth] == this.stateStackTop - 1) {
this.valueLambdaNestDepth--;
this.scanner.ungetToken(this.currentToken);
@@ -11296,7 +11296,7 @@ public ReferenceExpression newReferenceExpression() {
}
protected void consumeReferenceExpressionTypeForm(boolean isPrimitive) { // actually Name or Type form.
-
+
// ReferenceExpression ::= PrimitiveType Dims '::' NonWildTypeArgumentsopt IdentifierOrNew
// ReferenceExpression ::= Name Dimsopt '::' NonWildTypeArgumentsopt IdentifierOrNew
@@ -11309,14 +11309,14 @@ protected void consumeReferenceExpressionTypeForm(boolean isPrimitive) { // actu
referenceExpression.nameSourceStart = (int) (this.identifierPositionStack[this.identifierPtr] >>> 32);
selector = this.identifierStack[this.identifierPtr--];
this.identifierLengthPtr--;
-
+
int length = this.genericsLengthStack[this.genericsLengthPtr--];
if (length > 0) {
this.genericsPtr -= length;
System.arraycopy(this.genericsStack, this.genericsPtr + 1, typeArguments = new TypeReference[length], 0, length);
this.intPtr--; // pop type arguments source start.
}
-
+
int dimension = this.intStack[this.intPtr--];
boolean typeAnnotatedName = false;
for (int i = this.identifierLengthStack[this.identifierLengthPtr], j = 0; i > 0 && this.typeAnnotationLengthPtr >= 0; --i, j++) {
@@ -11326,7 +11326,7 @@ protected void consumeReferenceExpressionTypeForm(boolean isPrimitive) { // actu
break;
}
}
-
+
if (dimension > 0 || typeAnnotatedName) {
if (!isPrimitive) {
pushOnGenericsLengthStack(0);
@@ -11360,7 +11360,7 @@ protected void consumeReferenceExpressionPrimaryForm() {
System.arraycopy(this.genericsStack, this.genericsPtr + 1, typeArguments = new TypeReference[length], 0, length);
this.intPtr--; // pop type arguments source start.
}
-
+
Expression primary = this.expressionStack[this.expressionPtr--];
this.expressionLengthPtr--;
referenceExpression.initialize(this.compilationUnit.compilationResult, primary, typeArguments, selector, sourceEnd);
@@ -11385,7 +11385,7 @@ protected void consumeReferenceExpressionSuperForm() {
System.arraycopy(this.genericsStack, this.genericsPtr + 1, typeArguments = new TypeReference[length], 0, length);
this.intPtr--; // pop type arguments source start.
}
-
+
SuperReference superReference = new SuperReference(this.intStack[this.intPtr--], this.endPosition);
referenceExpression.initialize(this.compilationUnit.compilationResult, superReference, typeArguments, selector, sourceEnd);
consumeReferenceExpression(referenceExpression);
@@ -11398,7 +11398,7 @@ protected void consumeReferenceExpression(ReferenceExpression referenceExpressio
if (referenceExpression.compilationResult.getCompilationUnit() == null) {
// unit built out of model. Stash a textual representation to enable RE.copy().
int length = referenceExpression.sourceEnd - referenceExpression.sourceStart + 1;
- System.arraycopy(this.scanner.getSource(), referenceExpression.sourceStart, referenceExpression.text = new char [length], 0, length);
+ System.arraycopy(this.scanner.getSource(), referenceExpression.sourceStart, referenceExpression.text = new char [length], 0, length);
}
this.referenceContext.compilationResult().hasFunctionalTypes = true;
markEnclosingMemberWithLocalOrFunctionalType(LocalTypeKind.METHOD_REFERENCE);
@@ -11412,7 +11412,7 @@ protected void consumeReferenceExpressionTypeArgumentsAndTrunk(boolean qualified
protected void consumeReferenceExpressionGenericTypeForm() {
// ReferenceExpression ::= Name BeginTypeArguments ReferenceExpressionTypeArgumentsAndTrunk '::' NonWildTypeArgumentsopt IdentifierOrNew
-
+
ReferenceExpression referenceExpression = newReferenceExpression();
TypeReference type;
TypeReference [] typeArguments = null;
@@ -11430,7 +11430,7 @@ protected void consumeReferenceExpressionGenericTypeForm() {
System.arraycopy(this.genericsStack, this.genericsPtr + 1, typeArguments = new TypeReference[length], 0, length);
this.intPtr--; // pop type arguments source start.
}
-
+
int typeSourceEnd = this.intStack[this.intPtr--];
boolean qualified = this.intStack[this.intPtr--] != 0;
int dims = this.intStack[this.intPtr--];
@@ -11438,13 +11438,13 @@ protected void consumeReferenceExpressionGenericTypeForm() {
Annotation [][] annotationsOnDimensions = dims == 0 ? null : getAnnotationsOnDimensions(dims);
TypeReference rightSide = getTypeReference(0);
type = computeQualifiedGenericsFromRightSide(rightSide, dims, annotationsOnDimensions);
- } else {
+ } else {
pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
type = getTypeReference(dims);
}
this.intPtr--; // pop '<' position
type.sourceEnd = typeSourceEnd;
-
+
referenceExpression.initialize(this.compilationUnit.compilationResult, type, typeArguments, selector, sourceEnd);
consumeReferenceExpression(referenceExpression);
@@ -11469,7 +11469,7 @@ protected void consumeSingleMemberAnnotation(boolean isTypeAnnotation) {
singleMemberAnnotation.memberValue = this.expressionStack[this.expressionPtr--];
this.expressionLengthPtr--;
singleMemberAnnotation.declarationSourceEnd = this.rParenPos;
-
+
if (isTypeAnnotation) {
pushOnTypeAnnotationStack(singleMemberAnnotation);
} else {
@@ -11925,7 +11925,7 @@ protected void consumeStatementTry(boolean withFinally, boolean hasResources) {
// TryStatement ::= 'try' Block Catchesopt Finally
// TryStatementWithResources ::= 'try' ResourceSpecification TryBlock Catchesopt
// TryStatementWithResources ::= 'try' ResourceSpecification TryBlock Catchesopt Finally
-
+
int length;
TryStatement tryStmt = new TryStatement();
//finally
@@ -11963,7 +11963,7 @@ protected void consumeStatementTry(boolean withFinally, boolean hasResources) {
length);
tryStmt.resources = stmts;
-
+
if (this.options.sourceLevel < ClassFileConstants.JDK1_7) {
problemReporter().autoManagedResourcesNotBelow17(stmts);
}
@@ -12099,9 +12099,9 @@ protected void consumeTextBlock() {
this.checkExternalizeStrings &&
this.lastPosistion < this.scanner.currentPosition &&
!this.statementRecoveryActivated) {
- textBlock =
+ textBlock =
new TextBlock(
- textBlock2,
+ textBlock2,
this.scanner.startPosition,
this.scanner.currentPosition - 1,
Util.getLineNumber(this.scanner.startPosition, this.scanner.lineEnds, 0, this.scanner.linePtr));
@@ -12120,7 +12120,7 @@ protected void consumeTextBlock() {
protected void consumeSwitchBlock() {
// SwitchBlock ::= '{' SwitchBlockStatements SwitchLabels '}'
concatNodeLists();
-
+
}
protected void consumeSwitchBlockStatement() {
// SwitchBlockStatement ::= SwitchLabels BlockStatements
@@ -12274,13 +12274,13 @@ protected void consumeSwitchLabeledExpression() {
yieldStatement.isImplicit = true;
this.astStack[this.astPtr] = yieldStatement;
concatNodeLists();
-}
+}
protected void consumeSwitchLabeledBlock() {
concatNodeLists();
-}
+}
protected void consumeSwitchLabeledThrowStatement() {
// TODO: Semicolon not there - so we call this early
- consumeStatementThrow();
+ consumeStatementThrow();
concatNodeLists();
}
protected void consumeThrowExpression() {
@@ -12774,7 +12774,7 @@ protected void consumeTypeAnchor(boolean haveBase) {
// where '@OT' is the synthetic token returned by the parser when a '@' is in a position suitable for a type anchor
// see also skipThisAnchor() and consumeQualifiedBaseTypeAnchor() for related productions
-
+
// could be either TypeAnchor or TypeAnnotation
// create TypeAnchor for now, two avoid awaiting the decision between Annotation w or w/o member values
NameReference anchor = haveBase ?
@@ -12865,7 +12865,7 @@ protected void confirmTypeAnchor() {
// TypeAnchorOrAnnotatedTypeArgument1 -> AnyTypeAnchor '>'
// TypeAnchorOrAnnotatedTypeArgument2 -> AnyTypeAnchor '>>'
// TypeAnchorOrAnnotatedTypeArgument3 -> AnyTypeAnchor '>>>'
-
+
// tentative type anchor is indeed a type anchor (not converted to type annotation).
// need to remove the empty type annotation list now (see consumeTypeAnchor()).
this.typeAnnotationLengthPtr--;
@@ -12875,7 +12875,7 @@ protected boolean confirmTypeAnnotation() {
// /.$putCase consumeZeroTypeAnnotations(); $break ./
// - internally calls confirmTypeAnnotation()
// TypeAnnotationsopt -> TypeAnnotations
-
+
int sentinelPos = -1;
if (this.typeAnnotationLengthPtr != -1) {
int len = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr];
@@ -12943,7 +12943,7 @@ protected void consumeQualifiedBaseTypeAnchor() {
pushOnGenericsLengthStack(0); // handle type arguments
pushOnTypeAnnotationLengthStack(0); // unannotated by construction, but haven't yet pushed zero type annotatations
TypeReference prefix = getTypeReference(0); // consumes the above zero type annotations
-
+
Reference anchor = new QualifiedBaseReference(prefix, this.intStack[this.intPtr--], this.intStack[this.intPtr--]);
pushOnGenericsStack(new TypeAnchorReference(anchor, this.intStack[this.intPtr--]));
// anchor has not type annotations, yet it will be consumed in a context where type annotations are possible
@@ -13484,7 +13484,7 @@ protected void consumeRecordDeclaration() {
rd.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
}
protected void consumeRecordHeaderPart() {
- // RecordHeaderPart ::= RecordHeaderName RecordHeader ClassHeaderImplementsopt
+ // RecordHeaderPart ::= RecordHeaderName RecordHeader ClassHeaderImplementsopt
TypeDeclaration typeDecl = (TypeDeclaration) this.astStack[this.astPtr];
assert typeDecl instanceof RecordDeclaration;
// do nothing
@@ -13570,11 +13570,11 @@ private void convertToFields(RecordDeclaration rd, Argument[] args) {
* declare the fields of the record class. Each record component in the RecordHeader
* declares one private final field in the record class whose name is same as the
* Identifier in the record component.
- *
+ *
* JLS 14 Sec 8.10.3 Record Components
* For each record component appearing in the record component list:
* An implicitly declared private final field with the same name as the record
- * component and the type as the declared type of the record component.
+ * component and the type as the declared type of the record component.
*/
f.modifiers |= ClassFileConstants.AccPrivate | ClassFileConstants.AccFinal;
f.modifiersSourceStart = arg.modifiersSourceStart;
@@ -13586,7 +13586,7 @@ private void convertToFields(RecordDeclaration rd, Argument[] args) {
* "This field is annotated with the annotation that appears on the corresponding
* record component, if this annotation type is applicable to a field declaration
* or type context."
- *
+ *
* However, at this point there is no sufficient information to conclude the ElementType
* targeted by the annotation. Hence, do a blanket assignment for now and later (read binding
* time) weed out the irrelevant ones.
@@ -13643,14 +13643,14 @@ protected void consumeRecordComponent(boolean isVarArgs) {
varArgsAnnotations = new Annotation[length],
0,
length);
- }
+ }
}
firstDimensions = this.intStack[this.intPtr--];
TypeReference type = getTypeReference(firstDimensions);
if (isVarArgs || extendedDimensions != 0) {
if (isVarArgs) {
- type = augmentTypeWithAdditionalDimensions(type, 1, varArgsAnnotations != null ? new Annotation[][] { varArgsAnnotations } : null, true);
- }
+ type = augmentTypeWithAdditionalDimensions(type, 1, varArgsAnnotations != null ? new Annotation[][] { varArgsAnnotations } : null, true);
+ }
if (extendedDimensions != 0) {
type = augmentTypeWithAdditionalDimensions(type, extendedDimensions, annotationsOnExtendedDimensions, false);
}
@@ -13921,7 +13921,7 @@ private void checkForRecordMemberErrors(RecordDeclaration recordDecl, int nCreat
if (f != null && !f.isStatic()) {
if (f instanceof Initializer)
problemReporter().recordInstanceInitializerBlockInRecord((Initializer) f);
- else
+ else
problemReporter().recordNonStaticFieldDeclarationInRecord(f);
}
}
@@ -14620,7 +14620,7 @@ protected void annotateTypeReference(Wildcard ref) {
}
protected TypeReference getTypeReference(int dim) {
//{ObjectTeams: wrap to introduce 2nd parameter
- return getTypeReference(dim, false);
+ return getTypeReference(dim, false);
}
protected TypeReference getTypeReference(int dim, boolean liftingTypeAllowed) {
if (this.astPtr > -1 && this.astStack[this.astPtr] instanceof LiftingTypeReference) {
@@ -14758,7 +14758,7 @@ protected TypeReference getTypeReferenceForGenericType(int dim, int identifierLe
}
/* We used to eagerly mark the PSTR as constituting diamond usage if we encountered <>, but that is too eager and
complicates error handling by making it hard to distinguish legitimate use cases from ill formed ones. We are
- more discriminating now and tag a type as being diamond only where <> can legally occur.
+ more discriminating now and tag a type as being diamond only where <> can legally occur.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=339478#c11
*/
return parameterizedSingleTypeReference;
@@ -14800,7 +14800,7 @@ protected TypeReference getTypeReferenceForGenericType(int dim, int identifierLe
}
/* We used to eagerly mark the PQTR as constituting diamond usage if we encountered <>, but that is too eager and
complicates error handling by making it hard to distinguish legitimate use cases from ill formed ones. We are
- more discriminating now and tag a type as being diamond only where <> can legally occur.
+ more discriminating now and tag a type as being diamond only where <> can legally occur.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=339478#c11
*/
return parameterizedQualifiedTypeReference;
@@ -15086,7 +15086,7 @@ public void initialize(boolean parsingCompilationUnit) {
this.referenceContext = null;
this.endStatementPosition = 0;
this.valueLambdaNestDepth = -1;
-
+
//remove objects from stack too, while the same parser/compiler couple is
//re-used between two compilations ....
@@ -15439,20 +15439,20 @@ protected void optimizedConcatNodeLists() {
}
@Override
public boolean atConflictScenario(int token) {
-
+
/* Answer true if the parser is at a configuration where the scanner must look ahead and help disambiguate between (a) '<' as an operator and '<' as the
start of <type argument> and (b) the use of '(' in '(' expression ')' and '( type ')' and '(' lambda formal parameters ')'. (c) whether the token @
- begins a Java SE5 style declaration annotation or if it begins a SE8 style type annotation. When requested thus, the scanner helps by fabricating
- synthetic tokens and injecting them into the stream ahead of the tokens that trigger conflicts in the absence of these artificial tokens. These
+ begins a Java SE5 style declaration annotation or if it begins a SE8 style type annotation. When requested thus, the scanner helps by fabricating
+ synthetic tokens and injecting them into the stream ahead of the tokens that trigger conflicts in the absence of these artificial tokens. These
manufactured token help transform the grammar into LALR(1) by splitting the states so that they have unambigious prefixes.
-
- We do this by claiming to the automaton that the next token seen is the (suitable) synthetic token and observing the response of the state machine.
+
+ We do this by claiming to the automaton that the next token seen is the (suitable) synthetic token and observing the response of the state machine.
Error signals we are NOT at a conflict site, while shift or shift/reduce signals that we are. Accept is impossible, while there may be intermediate
reductions that are called for -- It is axiomatic of the push down automaton that corresponds to the LALR grammar that it will never shift on invalid
input.
-
+
Obviously, the dry runs should not alter the parser state in any way or otherwise cause side effects. Proof by argument that this is the case:
-
+
- The only pieces of state needed to answer the question are: this.stack, this.stateStackTop and the last action variable `act`. None of the various
and sundry stacks used in the AST constructions process are touched here.
- As we reduce, we DON'T call the semantic action functions i.e the consume* method calls are skipped.
@@ -15460,10 +15460,10 @@ public boolean atConflictScenario(int token) {
- this.stateStackTop and the last action variable `act` of the automaton are readily cloned, these being primitives and changes are to the replicas.
- We never remove elements from the state stack here (or elsewhere for that matter). Pops are implemented by mere adjustments of the stack pointer.
- During this algorithm, either the stack pointer monotonically decreases or stays fixed. (The only way for the stack pointer to increase would call
- for a shift or a shift/reduce at which point the algorithm is ready to terminate already.) This means that we don't have to replicate the stack.
+ for a shift or a shift/reduce at which point the algorithm is ready to terminate already.) This means that we don't have to replicate the stack.
Pushes can be mimiced by writing to a local stackTopState variable, leaving the original stack untouched.
-
- Though this code looks complex, we should exit early in most situations.
+
+ Though this code looks complex, we should exit early in most situations.
*/
if (this.unstackedAct == ERROR_ACTION) { // automaton is not running.
return false;
@@ -15476,7 +15476,7 @@ public boolean atConflictScenario(int token) {
// SH}
token = token == TokenNameLPAREN ? TokenNameBeginLambda : TokenNameBeginTypeArguments;
}
-
+
return automatonWillShift(token, this.unstackedAct);
}
/*main loop of the automat
@@ -15505,7 +15505,7 @@ protected void parse() {
this.unstackedAct = ERROR_ACTION;
this.stateStackTop = -1;
this.currentToken = getFirstToken();
-
+
try {
this.scanner.setActiveParser(this);
ProcessTerminals : for (;;) {
@@ -15547,7 +15547,7 @@ try {
act = this.stack[this.stateStackTop--];
continue ProcessTerminals;
} else {
- // FALL THROUGH.
+ // FALL THROUGH.
}
}
}
@@ -15576,7 +15576,7 @@ try {
this.lastCheckPoint = this.scanner.currentPosition;
this.currentToken = 0;
this.restartRecovery = true;
- }
+ }
if(this.statementRecoveryActivated) {
jumpOverType();
}
@@ -15662,12 +15662,12 @@ try {
}
this.scanner.checkNonExternalizedStringLiterals = false;
-
+
if (this.scanner.checkUninternedIdentityComparison) {
this.compilationUnit.validIdentityComparisonLines = this.scanner.getIdentityComparisonLines();
this.scanner.checkUninternedIdentityComparison = false;
}
-
+
if (this.reportSyntaxErrorIsRequired && this.hasError && !this.statementRecoveryActivated) {
if(!this.options.performStatementsRecovery) {
reportSyntaxErrors(isDietParse, oldFirstToken);
@@ -16646,8 +16646,8 @@ protected void pushOnAstStack(ASTNode node) {
protected void pushOnTypeAnnotationStack(Annotation annotation) {
//{ObjectTeams: detect the situation of having pushed the sentinel plus exactly one type annotation:
- boolean atSentinel = this.typeAnnotationPtr > 0
- && this.typeAnnotationPtr <= this.typeAnnotationStack.length
+ boolean atSentinel = this.typeAnnotationPtr > 0
+ && this.typeAnnotationPtr <= this.typeAnnotationStack.length
&& this.typeAnnotationStack[this.typeAnnotationPtr-1] == annotationSentinel
&& this.typeAnnotationLengthPtr > -1
&& this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr] == 1;
@@ -16977,7 +16977,7 @@ public void recoveryExitFromVariable() {
} else if(this.currentElement instanceof RecoveredField
&& !(this.currentElement instanceof RecoveredInitializer)) {
// Do not move focus to parent if we are still inside an array initializer
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=292087
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=292087
if (this.currentElement.bracketBalance <= 0) {
int end = ((RecoveredField)this.currentElement).fieldDeclaration.sourceEnd;
this.currentElement.updateSourceEndIfNecessary(end);
@@ -17249,11 +17249,11 @@ protected void resetStacks() {
this.identifierPtr = -1;
this.identifierLengthPtr = -1;
this.intPtr = -1;
-
+
this.nestedMethod[this.nestedType = 0] = 0; // need to reset for further reuse
this.variablesCounter[this.nestedType] = 0;
this.switchNestingLevel = 0;
-
+
this.dimensions = 0 ;
this.realBlockStack[this.realBlockPtr = 0] = 0;
this.recoveredStaticInitializerStart = 0;
@@ -17465,11 +17465,11 @@ protected void updateSourcePosition(Expression exp) {
exp.sourceStart = this.intStack[this.intPtr--];
}
public void copyState(Parser from) {
-
+
Parser parser = from;
// Stack pointers.
-
+
this.stateStackTop = parser.stateStackTop;
this.unstackedAct = parser.unstackedAct;
this.identifierPtr = parser.identifierPtr;
@@ -17490,9 +17490,9 @@ public void copyState(Parser from) {
this.switchNestingLevel = parser.switchNestingLevel;
this.realBlockPtr = parser.realBlockPtr;
this.valueLambdaNestDepth = parser.valueLambdaNestDepth;
-
+
// Stacks.
-
+
int length;
System.arraycopy(parser.stack, 0, this.stack = new int [length = parser.stack.length], 0, length);
System.arraycopy(parser.identifierStack, 0, this.identifierStack = new char [length = parser.identifierStack.length][], 0, length);
@@ -17517,7 +17517,7 @@ public void copyState(Parser from) {
System.arraycopy(parser.stack, 0, this.stack = new int [length = parser.stack.length], 0, length);
// Loose variables.
-
+
this.listLength = parser.listLength;
this.listTypeParameterLength = parser.listTypeParameterLength;
this.dimensions = parser.dimensions;
@@ -17540,8 +17540,8 @@ public boolean automatonWillShift(int token, int lastAction) {
stackTop --;
lastAction += ERROR_ACTION;
}
- for (;;) {
- if (lastAction > ERROR_ACTION) {
+ for (;;) {
+ if (lastAction > ERROR_ACTION) {
lastAction -= ERROR_ACTION; /* reduce or shift-reduce on loop entry from above, reduce on loop back */
do { /* reduce */
stackTop -= rhs[lastAction] - 1;
@@ -17559,11 +17559,11 @@ public boolean automatonWillShift(int token, int lastAction) {
stackTopState = lastAction; // "push"
lastAction = tAction(lastAction, token); // can be looked up from a precomputed cache.
if (lastAction <= NUM_RULES) {
- stackTop --;
+ stackTop --;
lastAction += ERROR_ACTION;
continue;
}
- // Error => false, Shift, Shift/Reduce => true, Accept => impossible.
+ // Error => false, Shift, Shift/Reduce => true, Accept => impossible.
return lastAction != ERROR_ACTION;
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java
index 8a93709d2..6998df001 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java
@@ -160,7 +160,7 @@ public RecoveredElement add(Statement stmt, int bracketBalanceValue) {
* Record a statement declaration
*/
public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) {
-
+
resetPendingModifiers();
/* do not consider a nested block starting passed the block end (if set)
@@ -307,7 +307,7 @@ public Block updatedBlock(int depth, Set<TypeDeclaration> knownTypes){
// if block was not marked to be preserved or empty, then ignore it
if (!this.preserveContent || this.statementCount == 0) return null;
-
+
Statement[] updatedStatements = new Statement[this.statementCount];
int updatedCount = 0;
@@ -362,7 +362,7 @@ public Block updatedBlock(int depth, Set<TypeDeclaration> knownTypes){
}
}
updatedStatements[updatedCount++] = updatedStatement;
-
+
if (updatedStatement instanceof LocalDeclaration) {
LocalDeclaration localDeclaration = (LocalDeclaration) updatedStatement;
if(localDeclaration.declarationSourceEnd > lastEnd) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredElement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredElement.java
index 479654530..680f039de 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredElement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredElement.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
@@ -37,11 +37,11 @@ public class RecoveredElement {
public int bracketBalance;
public boolean foundOpeningBrace;
protected Parser recoveringParser;
-
+
// There is no RecoveredLambdaElement, we just keep track of entry and exit of lambdas via a counter. This allows to prevent certain incorrect mutations of current element.
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=430667.
public int lambdaNestLevel;
-
+
public RecoveredElement(RecoveredElement parent, int bracketBalance){
this(parent, bracketBalance, null);
}
@@ -142,7 +142,7 @@ public RecoveredElement add(Statement statement, int bracketBalanceValue) {
if (this.parent == null) return this; // ignore
if (this instanceof RecoveredType) {
TypeDeclaration typeDeclaration = ((RecoveredType) this).typeDeclaration;
- if (typeDeclaration != null && (typeDeclaration.bits & ASTNode.IsAnonymousType) != 0) {
+ if (typeDeclaration != null && (typeDeclaration.bits & ASTNode.IsAnonymousType) != 0) {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=291040, new X(<SelectOnMessageSend:zoo()>) { ???
if (statement.sourceStart > typeDeclaration.sourceStart && statement.sourceEnd < typeDeclaration.sourceEnd) {
return this;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredExport.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredExport.java
index dda131eb8..531e5a9e0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredExport.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredExport.java
@@ -7,10 +7,10 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
- *
+ *
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.parser;
@@ -23,7 +23,7 @@ public class RecoveredExport extends RecoveredElement {
public ExportsStatement exportReference;
RecoveredModuleReference[] targets;
int targetCount = 0;
-
+
public RecoveredExport(ExportsStatement exportReference, RecoveredElement parent, int bracketBalance) {
super(parent, bracketBalance);
this.exportReference = exportReference;
@@ -49,7 +49,7 @@ public class RecoveredExport extends RecoveredElement {
/* if target not finished, then target becomes current */
if (target.sourceEnd == 0) return element;
return this;
-
+
}
/*
* Answer the associated parsed structure
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java
index 629d983d4..e97da2d1a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java
@@ -39,7 +39,7 @@ public class RecoveredField extends RecoveredElement {
public RecoveredAnnotation[] annotations;
public int annotationCount;
-
+
public int modifiers;
public int modifiersStart;
@@ -71,7 +71,7 @@ public RecoveredElement add(FieldDeclaration addedfieldDeclaration, int bracketB
/* default behavior is to delegate recording to parent if any */
resetPendingModifiers();
if (this.parent == null) return this; // ignore
-
+
if (this.fieldDeclaration.declarationSourceStart == addedfieldDeclaration.declarationSourceStart) {
if (this.fieldDeclaration.initialization != null) {
this.updateSourceEndIfNecessary(this.fieldDeclaration.initialization.sourceEnd);
@@ -96,7 +96,7 @@ public RecoveredElement add(Statement statement, int bracketBalanceValue) {
if (statement.sourceEnd > 0)
this.alreadyCompletedFieldInitialization = true;
// else we may still be inside the initialization, having parsed only a part of it yet
- if (!(statement instanceof AllocationExpression) &&
+ if (!(statement instanceof AllocationExpression) &&
this.fieldDeclaration.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT) {
AllocationExpression alloc = new AllocationExpression();
alloc.arguments = new Expression[] {(Expression) statement};
@@ -249,7 +249,7 @@ public FieldDeclaration updatedFieldDeclaration(int depth, Set<TypeDeclaration>
recoveredInitializers.expressions[recoveredInitializersCount++] = anonymousType.allocation;
}
else {
- this.fieldDeclaration.initialization = anonymousType.allocation;
+ this.fieldDeclaration.initialization = anonymousType.allocation;
}
int end = anonymousType.declarationSourceEnd;
if (end > this.fieldDeclaration.declarationSourceEnd) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=307337
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredInitializer.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredInitializer.java
index 0889678c2..d770857db 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredInitializer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredInitializer.java
@@ -68,7 +68,7 @@ public RecoveredElement add(Block nestedBlockDeclaration, int bracketBalanceValu
}
if (this.initializerBody == null) {
return this.initializerBody = new RecoveredBlock(nestedBlockDeclaration, this, bracketBalanceValue);
- }
+ }
this.initializerBody.blockDeclaration.sourceEnd = 0; /* needed to allow adding more elements to the existing initializerBody */
if (nestedBlockDeclaration.sourceEnd == 0) return this.initializerBody;
return this.initializerBody.add(nestedBlockDeclaration, bracketBalanceValue, true);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethodMapping.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethodMapping.java
index d8f65aac1..395c73fc9 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethodMapping.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethodMapping.java
@@ -341,7 +341,7 @@ public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd) {
// recover missing base method spec:
MethodSpec baseSpec = null;
if ( this.methodMappingDeclaration.isCallin()
- || (((CalloutMappingDeclaration)this.methodMappingDeclaration).baseMethodSpec == null))
+ || (((CalloutMappingDeclaration)this.methodMappingDeclaration).baseMethodSpec == null))
{
if (this.methodMappingDeclaration.hasSignature) {
if (parser.identifierPtr > 0) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredModule.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredModule.java
index 785f0996c..d2f333b59 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredModule.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredModule.java
@@ -7,10 +7,10 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
- *
+ *
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.parser;
@@ -24,7 +24,7 @@ import org.eclipse.jdt.internal.compiler.ast.RequiresStatement;
import org.eclipse.jdt.internal.compiler.ast.UsesStatement;
public class RecoveredModule extends RecoveredElement {
-
+
public RecoveredExportsStatement[] exports;
public int exportCount;
public RecoveredOpensStatement[] opens;
@@ -43,7 +43,7 @@ public class RecoveredModule extends RecoveredElement {
}
@Override
public RecoveredElement add(ModuleStatement moduleStatement, int bracketBalanceValue) {
-
+
// TODO: can't we do away with all these additions except for ProvidesStatement - to check
// if there are any corner cases that uses these.
if (moduleStatement instanceof ExportsStatement) {
@@ -61,7 +61,7 @@ public class RecoveredModule extends RecoveredElement {
if (moduleStatement instanceof UsesStatement) {
return add((UsesStatement) moduleStatement, bracketBalanceValue);
}
-
+
return this;
}
@@ -279,7 +279,7 @@ public class RecoveredModule extends RecoveredElement {
providesStmts[actualCount++] = this.services[i].updatedProvidesStatement();
}
mod.services = providesStmts;
- mod.servicesCount = actualCount;
+ mod.servicesCount = actualCount;
}
}
@Override
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredModuleReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredModuleReference.java
index e15b27e52..2a357d6d7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredModuleReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredModuleReference.java
@@ -7,10 +7,10 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
- *
+ *
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.parser;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredStatement.java
index c4257c41f..7849d2ced 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredStatement.java
@@ -29,7 +29,7 @@ public class RecoveredStatement extends RecoveredElement {
public Statement statement;
RecoveredBlock nestedBlock;
-
+
public RecoveredStatement(Statement statement, RecoveredElement parent, int bracketBalance){
super(parent, bracketBalance);
this.statement = statement;
@@ -84,7 +84,7 @@ public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){
public RecoveredElement add(Block nestedBlockDeclaration, int bracketBalanceValue) {
if (this.statement instanceof ForeachStatement) {
ForeachStatement foreach = (ForeachStatement) this.statement;
-
+
// see RecoveredBlock.add(Block, int):
resetPendingModifiers();
@@ -103,7 +103,7 @@ public RecoveredElement add(Block nestedBlockDeclaration, int bracketBalanceValu
addBlockStatement(element);
}
this.nestedBlock = element;
-
+
if (nestedBlockDeclaration.sourceEnd == 0) return element;
return this;
} else {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredType.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredType.java
index 228753e8d..c8015a0eb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredType.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredType.java
@@ -47,7 +47,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.ast.AbstractMethodMap
@SuppressWarnings({"rawtypes", "unchecked"})
public class RecoveredType extends RecoveredStatement implements TerminalTokens {
public static final int MAX_TYPE_DEPTH = 256;
-
+
public TypeDeclaration typeDeclaration;
public RecoveredAnnotation[] annotations;
@@ -582,7 +582,7 @@ public TypeDeclaration updatedTypeDeclaration(int depth, Set<TypeDeclaration> kn
if(knownTypes.contains(this.typeDeclaration)) return null;
knownTypes.add(this.typeDeclaration);
-
+
int lastEnd = this.typeDeclaration.bodyStart;
/* update annotations */
if (this.modifiers != 0) {
@@ -621,7 +621,7 @@ public TypeDeclaration updatedTypeDeclaration(int depth, Set<TypeDeclaration> kn
this.memberTypes[this.memberTypeCount - 1].typeDeclaration.declarationSourceEnd = bodyEndValue;
this.memberTypes[this.memberTypeCount - 1].typeDeclaration.bodyEnd = bodyEndValue;
}
-
+
int updatedCount = 0;
for (int i = 0; i < this.memberTypeCount; i++){
TypeDeclaration updatedTypeDeclaration = this.memberTypes[i].updatedTypeDeclaration(depth + 1, knownTypes);
@@ -633,8 +633,8 @@ public TypeDeclaration updatedTypeDeclaration(int depth, Set<TypeDeclaration> kn
int length = existingCount + updatedCount;
System.arraycopy(memberTypeDeclarations, 0, memberTypeDeclarations = new TypeDeclaration[length], 0, length);
}
-
- if (memberTypeDeclarations.length > 0) {
+
+ if (memberTypeDeclarations.length > 0) {
this.typeDeclaration.memberTypes = memberTypeDeclarations;
if(memberTypeDeclarations[memberTypeDeclarations.length - 1].declarationSourceEnd > lastEnd) {
lastEnd = memberTypeDeclarations[memberTypeDeclarations.length - 1].declarationSourceEnd;
@@ -662,14 +662,14 @@ public TypeDeclaration updatedTypeDeclaration(int depth, Set<TypeDeclaration> kn
for (int i = 0; i < this.fieldCount; i++){
fieldDeclarations[existingCount + i] = this.fields[i].updatedFieldDeclaration(depth, knownTypes);
}
-
+
for (int i = this.fieldCount - 1; 0 < i; i--) {
if (fieldDeclarations[existingCount + i - 1].declarationSourceStart == fieldDeclarations[existingCount + i].declarationSourceStart) {
fieldDeclarations[existingCount + i - 1].declarationSourceEnd = fieldDeclarations[existingCount + i].declarationSourceEnd;
fieldDeclarations[existingCount + i - 1].declarationEnd = fieldDeclarations[existingCount + i].declarationEnd;
}
}
-
+
this.typeDeclaration.fields = fieldDeclarations;
if(fieldDeclarations[fieldDeclarations.length - 1].declarationSourceEnd > lastEnd) {
lastEnd = fieldDeclarations[fieldDeclarations.length - 1].declarationSourceEnd;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredTypeReference.java
index a26f32a35..4355ce729 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredTypeReference.java
@@ -7,10 +7,10 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
- *
+ *
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.parser;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredUnit.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredUnit.java
index 45d483719..6b7f3d6bd 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredUnit.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredUnit.java
@@ -172,7 +172,7 @@ public RecoveredElement add(ModuleDeclaration moduleDeclaration, int bracketBala
}
@Override
public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue) {
-
+
if ((typeDeclaration.bits & ASTNode.IsAnonymousType) != 0){
if (this.typeCount > 0) {
// add it to the last type
@@ -295,7 +295,7 @@ public CompilationUnitDeclaration updatedCompilationUnitDeclaration(){
this.types[this.typeCount - 1].typeDeclaration.declarationSourceEnd = this.unitDeclaration.sourceEnd;
this.types[this.typeCount - 1].typeDeclaration.bodyEnd = this.unitDeclaration.sourceEnd;
}
-
+
Set<TypeDeclaration> knownTypes = new HashSet<>();
int actualCount = existingCount;
for (int i = 0; i < this.typeCount; i++){
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveryScanner.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveryScanner.java
index 7e37c855e..933ba7928 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveryScanner.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveryScanner.java
@@ -44,7 +44,7 @@ public class RecoveryScanner extends Scanner {
scanner.previewEnabled);
setData(data);
}
-
+
public RecoveryScanner(
boolean tokenizeWhiteSpace,
boolean checkNonExternalizedStringLiterals,
@@ -103,7 +103,7 @@ public class RecoveryScanner extends Scanner {
this.data.insertedTokensPosition[this.data.insertedTokensPtr] = position;
this.data.insertedTokenUsed[this.data.insertedTokensPtr] = false;
}
-
+
public void insertTokenAhead(int token, int index) {
if(!this.record) return;
if (token == TerminalTokens.TokenNameRestrictedIdentifierrecord)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
index dd69d2b2f..ac7a4f5e9 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
@@ -116,18 +116,18 @@ public class Scanner implements TerminalTokens {
public boolean _insideParameterMapping = false;
enum LookaheadState { INIT, ONE_TOKEN, ID_SEEN, TWO_TOKENS, ID_CONSUMED }
- /**
+ /**
* A little state machine for lookahead of up-to 2 tokens.
* This is used to disambiguate whether a '->' inside parameter mappings is
- * an ARROW (lambda) or a SYNTHBINDOUT (parameter mapping role-to-base)
+ * an ARROW (lambda) or a SYNTHBINDOUT (parameter mapping role-to-base)
*/
protected class BindoutLookahead {
-
+
LookaheadState state = LookaheadState.INIT;
int[] tokens = new int[2];
char[] identifier = null;
int[][] positions = new int[2][];
-
+
public BindoutLookahead() throws InvalidInputException {
int token = this.tokens[0] = getNextToken0();
this.positions[0] = new int[] {Scanner.this.startPosition, Scanner.this.currentPosition};
@@ -149,7 +149,7 @@ public class Scanner implements TerminalTokens {
this.state = LookaheadState.ONE_TOKEN;
return TerminalTokens.TokenNameNotAToken;
case ONE_TOKEN :
- // == we have one non-matching token => pop that token and unregister
+ // == we have one non-matching token => pop that token and unregister
Scanner.this._bindoutLookahead = null;
return popToken(0);
case ID_SEEN :
@@ -183,7 +183,7 @@ public class Scanner implements TerminalTokens {
}
}
protected BindoutLookahead _bindoutLookahead = null;
-
+
public char[] peekPendingIdentifier() {
if (this._bindoutLookahead != null)
return this._bindoutLookahead.identifier;
@@ -199,17 +199,17 @@ public class Scanner implements TerminalTokens {
this._insideParameterMapping = false;
this._bindoutLookahead = null;
}
-
+
public void setOTFlags(CompilerOptions options) {
this.parseOTJonly = !options.allowScopedKeywords;
this.parsePureJavaOnly = options.isPureJava;
}
-
+
public void copyOTFlags(Scanner other) {
this.parseOTJonly = other.parseOTJonly;
this.parsePureJavaOnly = other.parsePureJavaOnly;
}
-
+
/**
* Check whether a given terminal token is currently enabled.
* Some keywords can be disabled:
@@ -420,7 +420,7 @@ public class Scanner implements TerminalTokens {
private VanguardParser vanguardParser;
ConflictedParser activeParser = null;
private boolean consumingEllipsisAnnotations = false;
-
+
public static final int RoundBracket = 0;
public static final int SquareBracket = 1;
public static final int CurlyBracket = 2;
@@ -863,7 +863,7 @@ public char[] getCurrentTextBlock() {
}
}
}
- // The last line with closing delimiter is part of the
+ // The last line with closing delimiter is part of the
// determining line list even if empty
if (!blank || (i+1 == size)) {
if (prefix < 0 || whitespaces < prefix) {
@@ -934,7 +934,7 @@ private char[] normalize(char[] content) {
return result.toString().toCharArray();
}
// This method is for handling the left over escaped characters during the first
-// scanning (scanForStringLiteral). Admittedly this goes over the text block
+// scanning (scanForStringLiteral). Admittedly this goes over the text block
// content again char by char, but this is required in order to correctly
// treat all the white space and line endings
private boolean getLineContent(StringBuilder result, char[] line, int start, int end, boolean merge, boolean lastLine) {
@@ -995,13 +995,13 @@ private boolean getLineContent(StringBuilder result, char[] line, int start, int
// has read \ZeroToThree OctalDigit NonOctalDigit --> ignore last character
}
}
- } else {
+ } else {
// has read \OctalDigit NonDigit--> ignore last character
}
- } else {
+ } else {
// has read \OctalDigit NonOctalDigit--> ignore last character
}
- } else {
+ } else {
// has read \OctalDigit --> ignore last character
}
} catch (InvalidInputException e) {
@@ -1020,10 +1020,10 @@ private boolean getLineContent(StringBuilder result, char[] line, int start, int
}
}
}
- }
+ }
}
end = merge ? end : end >= line.length ? end : end + 1;
- char[] chars = lastPointer == 0 ?
+ char[] chars = lastPointer == 0 ?
CharOperation.subarray(line, start, end) :
CharOperation.subarray(line, lastPointer + 1, end);
// The below check is because CharOperation.subarray tend to return null when the
@@ -1255,14 +1255,14 @@ public final int getNextChar(char testedChar1, char testedChar2) {
}
/*
* This method consumes digits as well as underscores if underscores are located between digits
- * @throws InvalidInputException if underscores are not located between digits or if underscores are used in source < 1.7
+ * @throws InvalidInputException if underscores are not located between digits or if underscores are used in source < 1.7
*/
private final void consumeDigits(int radix) throws InvalidInputException {
consumeDigits(radix, false);
}
/*
* This method consumes digits as well as underscores if underscores are located between digits
- * @throws InvalidInputException if underscores are not located between digits or if underscores are used in source < 1.7
+ * @throws InvalidInputException if underscores are not located between digits or if underscores are used in source < 1.7
*/
private final void consumeDigits(int radix, boolean expectingDigitFirst) throws InvalidInputException {
final int USING_UNDERSCORE = 1;
@@ -1636,18 +1636,18 @@ private void updateCase(int token) {
this.inCase = true;
this.breakPreviewAllowed = true;
}
- if (token == TokenNameCOLON || token == TokenNameARROW)
+ if (token == TokenNameCOLON || token == TokenNameARROW)
this.inCase = false;
}
public int getNextToken() throws InvalidInputException {
-
+
int token;
if (this.nextToken != TokenNameNotAToken) {
token = this.nextToken;
this.nextToken = TokenNameNotAToken;
return token; // presumed to be unambiguous.
}
-
+
//{ObjectTeams: consume lookahead for parameter mappings:
if (this._bindoutLookahead != null) {
int result = this._bindoutLookahead.getNextToken();
@@ -2351,7 +2351,7 @@ private int scanForStringLiteral() throws InvalidInputException {
break;
}
this.unicodeAsBackSlash = false;
- if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
&& (this.source[this.currentPosition] == 'u')) {
getNextUnicodeChar();
isUnicode = true;
@@ -2376,7 +2376,7 @@ private int scanForStringLiteral() throws InvalidInputException {
// Kludge, retain the '\' and also
// when scanEscapeCharacter reads space in form of \040 and
// set the next character to 's'
- // so, we get an escaped scape, i.e. \s, which will later be
+ // so, we get an escaped scape, i.e. \s, which will later be
// replaced by space
unicodeStore('\\');
this.currentCharacter = 's';
@@ -2390,7 +2390,7 @@ private int scanForStringLiteral() throws InvalidInputException {
this.currentPosition = oldPos;
this.currentCharacter = this.source[this.currentPosition];
break outer;
-
+
}
}
if (this.withoutUnicodePtr != 0) {
@@ -2701,7 +2701,7 @@ public final void jumpOverMethodBody(int found) {
} catch (InvalidInputException ex) {
// ignore
}
-
+
Inner: while (this.currentPosition <= this.eofPosition) {
if (isTextBlock) {
switch (this.currentCharacter) {
@@ -2719,7 +2719,7 @@ public final void jumpOverMethodBody(int found) {
firstClosingBrace = this.currentPosition;
break;
case '\r' :
- if (this.source[this.currentPosition] == '\n')
+ if (this.source[this.currentPosition] == '\n')
this.currentPosition++;
//$FALL-THROUGH$
case '\n' :
@@ -3670,7 +3670,7 @@ void updateScanContext(int token) {
case TokenNameprovides:
case TokenNameto:
case TokenNamewith:
- case TokenNametransitive:
+ case TokenNametransitive:
case TokenNameDOT:
case TokenNameimport:
case TokenNameAT:
@@ -3749,8 +3749,8 @@ private void parseTags() {
}
pos = CharOperation.indexOf(TAG_PREFIX, s, true, end, sourceEnd);
}
- }
-
+ }
+
if (this.checkUninternedIdentityComparison &&
(pos = CharOperation.indexOf(IDENTITY_COMPARISON_TAG, s, true, sourceStart, sourceEnd)) != -1) {
if (this.validIdentityComparisonLines == null) {
@@ -4761,7 +4761,7 @@ private int internalScanIdentifierOrKeyword(int index, int length, char[] data)
&& (data[++index] == 'r')
&& (data[++index] == 'n'))
return TokenNamereturn;
- else if ((data[index] == 'c')
+ else if ((data[index] == 'c')
&& (data[++index] == 'o')
&& (data[++index] == 'r')
&& (data[++index] == 'd'))
@@ -4778,10 +4778,10 @@ private int internalScanIdentifierOrKeyword(int index, int length, char[] data)
&& (data[++index] == 'e')
&& (data[++index] == 's')) {
return TokenNamerequires;
- } else
+ } else
return TokenNameIdentifier;
//{ObjectTeams: 'replace' (only if after "<-"):
- case 7:
+ case 7:
if (callinSeen) {
if ( (data[++index] == 'e')
&& (data[++index] == 'p')
@@ -4970,7 +4970,7 @@ private int internalScanIdentifierOrKeyword(int index, int length, char[] data)
case 'u' : //uses
switch(length) {
case 4 :
- if (areRestrictedModuleKeywordsActive()
+ if (areRestrictedModuleKeywordsActive()
&& (data[++index] == 's') && (data[++index] == 'e') && (data[++index] == 's'))
return TokenNameuses;
else
@@ -5844,12 +5844,12 @@ public static boolean isKeyword(int token) {
// Vanguard Scanner - A Private utility helper class for the scanner.
private static final class VanguardScanner extends Scanner {
-
+
public VanguardScanner(long sourceLevel, long complianceLevel, boolean previewEnabled) {
super (false /*comment*/, false /*whitespace*/, false /*nls*/, sourceLevel, complianceLevel, null/*taskTag*/,
null/*taskPriorities*/, false /*taskCaseSensitive*/, previewEnabled);
}
-
+
@Override
public int getNextToken() throws InvalidInputException {
int token;
@@ -5874,12 +5874,12 @@ private static final class VanguardScanner extends Scanner {
token = TokenNameAT308;
}
}
- return token == TokenNameEOF ? TokenNameNotAToken : token;
+ return token == TokenNameEOF ? TokenNameNotAToken : token;
}
}
private static class Goal {
-
+
int first; // steer the parser towards a single minded pursuit.
int [] follow; // the definite terminal symbols that signal the successful reduction to goal.
int rule;
@@ -5890,26 +5890,26 @@ private static class Goal {
static int VarargTypeAnnotationsRule = 0;
static int BlockStatementoptRule = 0;
static int YieldStatementRule = 0;
-
+
static Goal LambdaParameterListGoal;
static Goal IntersectionCastGoal;
static Goal VarargTypeAnnotationGoal;
static Goal ReferenceExpressionGoal;
static Goal BlockStatementoptGoal;
static Goal YieldStatementGoal;
-
+
static {
-
+
for (int i = 1; i <= ParserBasicInformation.NUM_RULES; i++) { // 0 == $acc
if ("ParenthesizedLambdaParameterList".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
LambdaParameterListRule = i;
- else
+ else
if ("ParenthesizedCastNameAndBounds".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
IntersectionCastRule = i;
- else
+ else
if ("ReferenceExpressionTypeArgumentsAndTrunk".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
ReferenceExpressionRule = i;
- else
+ else
if ("TypeAnnotations".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
VarargTypeAnnotationsRule = i;
else
@@ -5918,9 +5918,9 @@ private static class Goal {
else
if ("YieldStatement".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
YieldStatementRule = i;
-
+
}
-
+
LambdaParameterListGoal = new Goal(TokenNameARROW, new int[] { TokenNameARROW }, LambdaParameterListRule);
IntersectionCastGoal = new Goal(TokenNameLPAREN, followSetOfCast(), IntersectionCastRule);
VarargTypeAnnotationGoal = new Goal(TokenNameAT, new int[] { TokenNameELLIPSIS }, VarargTypeAnnotationsRule);
@@ -5935,7 +5935,7 @@ private static class Goal {
this.follow = follow;
this.rule = rule;
}
-
+
boolean hasBeenReached(int act, int token) {
/*
System.out.println("[Goal = " + Parser.name[Parser.non_terminal_index[Parser.lhs[this.rule]]] + "] " + "Saw: " + Parser.name[Parser.non_terminal_index[Parser.lhs[act]]] + "::" + //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -5951,10 +5951,10 @@ private static class Goal {
}
return false;
}
-
+
private static int [] followSetOfCast() {
return new int [] { TokenNameIdentifier, TokenNamenew, TokenNamesuper, TokenNamethis,
- TokenNamefalse, TokenNametrue, TokenNamenull,
+ TokenNamefalse, TokenNametrue, TokenNamenull,
TokenNameIntegerLiteral, TokenNameLongLiteral, TokenNameFloatingPointLiteral, TokenNameDoubleLiteral, TokenNameCharacterLiteral, TokenNameStringLiteral, TokenNameTextBlock,
TokenNameNOT, TokenNameTWIDDLE, TokenNameLPAREN
};
@@ -5962,10 +5962,10 @@ private static class Goal {
}
// Vanguard Parser - A Private utility helper class for the scanner.
private static class VanguardParser extends Parser {
-
+
public static final boolean SUCCESS = true;
public static final boolean FAILURE = false;
-
+
Goal currentGoal;
public VanguardParser(VanguardScanner scanner) {
@@ -5975,14 +5975,14 @@ private static class VanguardParser extends Parser {
public VanguardParser(ProblemReporter reporter) {
super(reporter, false);
}
-
+
// Canonical LALR pushdown automaton identical to Parser.parse() minus side effects of any kind, returns the rule reduced.
protected boolean parse(Goal goal) {
this.currentGoal = goal;
try {
int act = START_STATE;
this.stateStackTop = -1;
- this.currentToken = goal.first;
+ this.currentToken = goal.first;
ProcessTerminals : for (;;) {
int stackLength = this.stack.length;
if (++this.stateStackTop >= stackLength) {
@@ -6125,7 +6125,7 @@ protected final boolean maybeAtLambdaOrCast() { // Could the '(' we saw just now
return this.activeParser.atConflictScenario(TokenNameLPAREN);
}
}
-
+
protected final boolean maybeAtReferenceExpression() { // Did the '<' we saw just now herald a reference expression's type arguments and trunk ?
switch (this.lookBack[1]) {
@@ -6151,8 +6151,8 @@ protected final boolean maybeAtReferenceExpression() { // Did the '<' we saw jus
case TokenNameAND: // T extends Object & Comparable<? super T>
case TokenNameimplements: // class A implements I<Z>
case TokenNamethrows: // throws Y<Z>
- case TokenNameAT: // @Deprecated <T> void foo() {}
- case TokenNameinstanceof: // if (o instanceof List<E>[])
+ case TokenNameAT: // @Deprecated <T> void foo() {}
+ case TokenNameinstanceof: // if (o instanceof List<E>[])
return false;
default:
break;
@@ -6188,7 +6188,7 @@ private final boolean maybeAtEllipsisAnnotationsStart() { // Did the '@' we saw
protected final boolean atTypeAnnotation() { // Did the '@' we saw just now herald a type annotation ? We should not ask the parser whether it would shift @308 !
return !this.activeParser.atConflictScenario(TokenNameAT);
}
-//{ObjectTeams: one more variant of '@' to check:
+//{ObjectTeams: one more variant of '@' to check:
protected final boolean atTypeAnchor() { // Did the '@' we saw just now herald a type anchor ?
// Note: if we proceed with ATOT while actually a normal type annotation is present,
// the erroneous TypeAnchorReference is deconstructed again in Parser.convertTypeAnchor()!
@@ -6245,7 +6245,7 @@ int disambiguatedRestrictedIdentifierrecord(int restrictedIdentifierToken) {
return restrictedIdentifierToken;
if (this.sourceLevel < ClassFileConstants.JDK14 || !this.previewEnabled)
return TokenNameIdentifier;
-
+
return disambiguaterecordWithLookAhead() ?
restrictedIdentifierToken : TokenNameIdentifier;
}
@@ -6384,7 +6384,7 @@ int disambiguatedRestrictedKeyword(int restrictedKeywordToken) {
if (lookAhead == TokenNameSEMICOLON)
token = TokenNameIdentifier;
} catch (InvalidInputException e) {
- //
+ //
}
}
break;
@@ -6452,7 +6452,7 @@ protected boolean isAtAssistIdentifier() {
// Position the scanner at the next block statement and return the start token. We recognize empty statements.
public int fastForward(Statement unused) {
-
+
int token;
while (true) {
@@ -6461,7 +6461,7 @@ public int fastForward(Statement unused) {
} catch (InvalidInputException e) {
return TokenNameEOF;
}
- /* FOLLOW map of BlockStatement, since the non-terminal is recursive is a super set of its own FIRST set.
+ /* FOLLOW map of BlockStatement, since the non-terminal is recursive is a super set of its own FIRST set.
We use FOLLOW rather than FIRST since we want to recognize empty statements. i.e if (x > 10) { x = 0 }
*/
switch(token) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java
index affd0f4b1..0b32416b4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java
@@ -32,7 +32,7 @@ package org.eclipse.jdt.internal.compiler.parser;
public interface TerminalTokens {
// special tokens not part of grammar - not autogenerated
- int
+ int
TokenNameNotAToken = 0,
TokenNameWHITESPACE = 1000,
TokenNameCOMMENT_LINE = 1001,
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java
index 8b7e50804..a5917212d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java
@@ -2616,11 +2616,11 @@ public class DiagnoseParser implements ParserBasicInformation, TerminalTokens, C
@Override
public boolean atConflictScenario(int token) {
/* There is too much voodoo that goes on here in DiagnoseParser (multiple machines, lexer stream reset etc.)
- So we take a simple minded view that we will always ask for disambiguation, except there is one scenario
+ So we take a simple minded view that we will always ask for disambiguation, except there is one scenario
that needs special handling, we let the lexer stream deal with that: In X<String>.Y<Integer>:: the second
'<' should not be tagged for disambiguation. If a synthetic token gets injected there, there will be syntax
error. See that this is not a problem for the regular/normal parser.
- */
+ */
return (token == TokenNameLPAREN || token == TokenNameAT || (token == TokenNameLESS && !this.lexStream.awaitingColonColon()));
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/IProblemRechecker.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/IProblemRechecker.java
index 0517b9b3c..57ca6acb6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/IProblemRechecker.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/IProblemRechecker.java
@@ -21,10 +21,10 @@ package org.eclipse.jdt.internal.compiler.problem;
import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
import org.eclipse.jdt.internal.compiler.impl.IrritantSet;
-/**
+/**
* Protocol for rechecking problems that were detected early during compilation
* but might later turn out to be false alarms.
- *
+ *
* @author stephan
* @since 1.3.0
*/
@@ -34,7 +34,7 @@ public interface IProblemRechecker {
* Answer whether a given problem should actually be reported.
* Implementing classes are responsible for remembering enough context
* so that checking can be performed.
- *
+ *
* @param foundIrritants if reporting is suppressed by a suppress warnings annotation,
* the fact of suppression should be recorded in this array of irritant sets
* (cf. {@link CompilationUnitDeclaration#finalizeProblems()}).
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java
index 1530b596e..d06ff0a61 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java
@@ -49,7 +49,7 @@ public class ProblemHandler {
public IErrorHandlingPolicy policy;
public final IProblemFactory problemFactory;
public final CompilerOptions options;
-
+
/* When temporarily switching policies, store here the original root policy (for temporary resume). */
private IErrorHandlingPolicy rootPolicy;
@@ -138,7 +138,7 @@ public void handle(
try {
protectedHandle(problemId, problemArguments, elaborationId, messageArguments, severity, problemStartPosition, problemEndPosition, referenceContext, unitResult);
} finally {
- this.rechecker = null;
+ this.rechecker = null;
}
}
private void protectedHandle(
@@ -158,7 +158,7 @@ private void protectedHandle(
return;
boolean mandatory = (severity & (ProblemSeverities.Error | ProblemSeverities.Optional)) == ProblemSeverities.Error;
- if ((severity & ProblemSeverities.InternalError) == 0 && this.policy.ignoreAllErrors()) {
+ if ((severity & ProblemSeverities.InternalError) == 0 && this.policy.ignoreAllErrors()) {
// Error is not to be exposed, but clients may need still notification as to whether there are silently-ignored-errors.
// if no reference context, we need to abort from the current compilation process
if (referenceContext == null) {
@@ -177,7 +177,7 @@ private void protectedHandle(
if ((severity & ProblemSeverities.Optional) != 0 && problemId != IProblem.Task && !this.options.ignoreSourceFolderWarningOption) {
//{ObjectTeams: NPE prevention:
if (unitResult != null) {
-// orig:
+// orig:
ICompilationUnit cu = unitResult.getCompilationUnit();
try{
if (cu != null && cu.ignoreOptionalProblems())
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
index b62675f72..58f8edf75 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
@@ -35,7 +35,7 @@
* bug 382789 - [compiler][null] warn when syntactically-nonnull expression is compared against null
* bug 376590 - Private fields with @Inject are ignored by unused field validation
* bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
- * bug 402028 - [1.8][compiler] null analysis for reference expressions
+ * bug 402028 - [1.8][compiler] null analysis for reference expressions
* bug 401796 - [1.8][compiler] don't treat default methods as overriding an independent inherited abstract method
* bug 404649 - [1.8][compiler] detect illegal reference to indirect or redundant super
* bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
@@ -690,25 +690,25 @@ public static int getIrritant(int problemID) {
case IProblem.ComparingIdentical:
return CompilerOptions.ComparingIdentical;
-
+
case IProblem.MissingSynchronizedModifierInInheritedMethod:
return CompilerOptions.MissingSynchronizedModifierInInheritedMethod;
case IProblem.ShouldImplementHashcode:
return CompilerOptions.ShouldImplementHashcode;
-
+
case IProblem.DeadCode:
return CompilerOptions.DeadCode;
-
+
case IProblem.Task :
return CompilerOptions.Tasks;
case IProblem.UnusedObjectAllocation:
return CompilerOptions.UnusedObjectAllocation;
-
+
case IProblem.MethodCanBeStatic:
return CompilerOptions.MethodCanBeStatic;
-
+
case IProblem.MethodCanBePotentiallyStatic:
return CompilerOptions.MethodCanBePotentiallyStatic;
@@ -720,14 +720,14 @@ public static int getIrritant(int problemID) {
return CompilerOptions.PotentiallyUnclosedCloseable;
case IProblem.ExplicitlyClosedAutoCloseable:
return CompilerOptions.ExplicitlyClosedAutoCloseable;
-
+
case IProblem.RedundantSpecificationOfTypeArguments:
return CompilerOptions.RedundantSpecificationOfTypeArguments;
//{ObjectTeams:
case IProblem.DeprecatedBaseclass:
case IProblem.CallinToDeprecated:
return CompilerOptions.AdaptingDeprecated;
-
+
case IProblem.DefinitelyMissingBaseCall:
case IProblem.DefinitelyDuplicateBaseCall:
case IProblem.PotentiallyMissingBaseCall:
@@ -743,14 +743,14 @@ public static int getIrritant(int problemID) {
case IProblem.FieldAccessHasNoEffect:
return CompilerOptions.EffectlessFieldaccess;
-
+
case IProblem.FragileCallinBindingReferenceType:
case IProblem.FragileCallinBindingBaseType:
return CompilerOptions.FragileCallin;
case IProblem.UnusedParamMap:
return CompilerOptions.UnusedParammap;
-
+
case IProblem.CallinOverriddenInTeam:
return CompilerOptions.EffectlessCallinBinding;
@@ -781,7 +781,7 @@ public static int getIrritant(int problemID) {
return CompilerOptions.Decapsulation;
case IProblem.DecapsulationFieldWrite:
return CompilerOptions.DecapsulationWrite;
-
+
case IProblem.RegularlyImportedBaseclass:
case IProblem.IllegalBaseImport:
case IProblem.IllegalBaseImportNoAspectBinding:
@@ -802,10 +802,10 @@ public static int getIrritant(int problemID) {
case IProblem.DangerousCallinBinding:
return CompilerOptions.DangerousCallin;
-
+
case IProblem.IgnoringRoleMethodReturn:
return CompilerOptions.IgnoringRoleReturn;
-
+
case IProblem.OtreCannotWeaveIntoJava8:
return CompilerOptions.OTREintoJava8;
@@ -827,11 +827,11 @@ public static int getIrritant(int problemID) {
case IProblem.JavadocRoleTagInRegular:
return CompilerOptions.InvalidJavadoc;
// SH}
-
+
case IProblem.MissingNonNullByDefaultAnnotationOnPackage:
case IProblem.MissingNonNullByDefaultAnnotationOnType:
return CompilerOptions.MissingNonNullByDefaultAnnotation;
-
+
case IProblem.UnusedTypeParameter:
return CompilerOptions.UnusedTypeParameter;
@@ -915,7 +915,7 @@ public static int getProblemCategory(int severity, int problemID) {
case CompilerOptions.APILeak:
case CompilerOptions.UnstableAutoModuleName:
return CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM;
-
+
case CompilerOptions.OverriddenPackageDefaultMethod :
case CompilerOptions.IncompatibleNonInheritedInterfaceMethod :
case CompilerOptions.LocalVariableHiding :
@@ -948,7 +948,7 @@ public static int getProblemCategory(int severity, int problemID) {
case CompilerOptions.Task :
return CategorizedProblem.CAT_UNSPECIFIED; // TODO may want to improve
-
+
case CompilerOptions.MissingJavadocComments :
case CompilerOptions.MissingJavadocTags :
case CompilerOptions.InvalidJavadoc :
@@ -959,11 +959,11 @@ public static int getProblemCategory(int severity, int problemID) {
case CompilerOptions.UncheckedTypeOperation :
case CompilerOptions.RawTypeReference :
return CategorizedProblem.CAT_UNCHECKED_RAW;
-
+
case CompilerOptions.ForbiddenReference :
case CompilerOptions.DiscouragedReference :
return CategorizedProblem.CAT_RESTRICTION;
-
+
//{ObjectTeams:
case CompilerOptions.NotExactlyOneBasecall:
case CompilerOptions.BaseclassCycle:
@@ -1665,7 +1665,7 @@ public void cannotReferToNonFinalOuterLocal(LocalVariableBinding local, ASTNode
public void cannotReferToNonEffectivelyFinalOuterLocal(VariableBinding local, ASTNode location) {
String[] arguments = new String[] { new String(local.readableName()) };
this.handle(
- IProblem.OuterLocalMustBeEffectivelyFinal,
+ IProblem.OuterLocalMustBeEffectivelyFinal,
arguments,
arguments,
nodeSourceStart(local, location),
@@ -1674,7 +1674,7 @@ public void cannotReferToNonEffectivelyFinalOuterLocal(VariableBinding local, AS
public void cannotReferToNonFinalField(VariableBinding local, ASTNode location) {
String[] arguments = new String[] { new String(local.readableName()) };
this.handle(
- IProblem.FieldMustBeFinal,
+ IProblem.FieldMustBeFinal,
arguments,
arguments,
nodeSourceStart(local, location),
@@ -1777,14 +1777,14 @@ public void lambdaParameterTypeMismatched(Argument argument, TypeReference type,
public void lambdaExpressionCannotImplementGenericMethod(LambdaExpression lambda, MethodBinding sam) {
final String selector = new String(sam.selector);
this.handle(
- IProblem.NoGenericLambda,
+ IProblem.NoGenericLambda,
new String[] { selector, new String(sam.declaringClass.readableName())},
new String[] { selector, new String(sam.declaringClass.shortReadableName())},
lambda.sourceStart,
lambda.diagnosticsSourceEnd());
}
public void missingValueFromLambda(LambdaExpression lambda, TypeBinding returnType) {
- this.handle(IProblem.MissingValueFromLambda,
+ this.handle(IProblem.MissingValueFromLambda,
new String[] {new String(returnType.readableName())},
new String[] {new String(returnType.shortReadableName())},
lambda.sourceStart,
@@ -1939,9 +1939,9 @@ public int computeSeverity(int problemID){
return ProblemSeverities.Ignore;
}
break;
- // For compatibility with javac 8b111 for now.
+ // For compatibility with javac 8b111 for now.
case IProblem.RepeatableAnnotationWithRepeatingContainerAnnotation:
- case IProblem.ToleratedMisplacedTypeAnnotations:
+ case IProblem.ToleratedMisplacedTypeAnnotations:
return ProblemSeverities.Warning;
case IProblem.IllegalUseOfUnderscoreAsAnIdentifier:
return this.underScoreIsError ? ProblemSeverities.Error : ProblemSeverities.Warning;
@@ -2038,7 +2038,7 @@ public void deprecatedMethod(final MethodBinding method, ASTNode location) {
String selector = new String(method.selector);
String signature = typesAsString(method, false);
String shortSignature = typesAsString(method, true);
-
+
boolean isConstructor = method.isConstructor();
int start = -1;
if (isConstructor) {
@@ -2135,7 +2135,7 @@ public void deprecatedModule(ModuleReference moduleReference, ModuleBinding requ
args,
args,
moduleReference.sourceStart,
- moduleReference.sourceEnd);
+ moduleReference.sourceEnd);
} else {
String[] args = { String.valueOf(requiredModule.name()) };
handle( isTerminally ? IProblem.UsingTerminallyDeprecatedModule : IProblem.UsingDeprecatedModule,
@@ -2636,7 +2636,7 @@ public void fakeReachable(ASTNode location) {
LocalDeclaration declaration = (LocalDeclaration) location;
sourceStart = declaration.declarationSourceStart;
sourceEnd = declaration.declarationSourceEnd;
- }
+ }
this.handle(
IProblem.DeadCode,
NoArgument,
@@ -2958,7 +2958,7 @@ public void hiddenCatchBlock(ReferenceBinding exceptionType, ASTNode location) {
public void hierarchyCircularity(SourceTypeBinding sourceType, ReferenceBinding superType, TypeReference reference) {
:giro */
public void hierarchyCircularity(SourceTypeBinding sourceType, ReferenceBinding superType, ASTNode reference) {
-// SH}
+// SH}
int start = 0;
int end = 0;
@@ -3320,7 +3320,7 @@ public void illegalModifierForInterfaceField(FieldDeclaration fieldDecl) {
fieldDecl.sourceEnd);
}
public void illegalModifierForInterfaceMethod(AbstractMethodDeclaration methodDecl, long level) {
-
+
int problem = level < ClassFileConstants.JDK1_8 ? IProblem.IllegalModifierForInterfaceMethod :
level < ClassFileConstants.JDK9 ? IProblem.IllegalModifierForInterfaceMethod18 : IProblem.IllegalModifierForInterfaceMethod9;
// cannot include parameter types since they are not resolved yet
@@ -3970,14 +3970,14 @@ public void indirectAccessToStaticMethod(ASTNode location, MethodBinding method)
}
public void inheritedDefaultMethodConflictsWithOtherInherited(SourceTypeBinding type, MethodBinding defaultMethod, MethodBinding otherMethod) {
TypeDeclaration typeDecl = type.scope.referenceContext;
- String[] problemArguments = new String[] {
- String.valueOf(defaultMethod.readableName()),
- String.valueOf(defaultMethod.declaringClass.readableName()),
+ String[] problemArguments = new String[] {
+ String.valueOf(defaultMethod.readableName()),
+ String.valueOf(defaultMethod.declaringClass.readableName()),
String.valueOf(otherMethod.declaringClass.readableName()) };
- String[] messageArguments = new String[] {
- String.valueOf(defaultMethod.shortReadableName()),
- String.valueOf(defaultMethod.declaringClass.shortReadableName()),
- String.valueOf(otherMethod.declaringClass.shortReadableName()) };
+ String[] messageArguments = new String[] {
+ String.valueOf(defaultMethod.shortReadableName()),
+ String.valueOf(defaultMethod.declaringClass.shortReadableName()),
+ String.valueOf(otherMethod.declaringClass.shortReadableName()) };
this.handle(IProblem.InheritedDefaultMethodConflictsWithOtherInherited,
problemArguments,
messageArguments,
@@ -4235,7 +4235,7 @@ public void invalidConstructor(Statement statement, MethodBinding targetConstruc
{
if (statement instanceof CopyInheritance.RoleConstructorCall)
statement = ((RoleConstructorCall)statement).allocationOrig;
- noSuchEnclosingInstance(targetConstructor.declaringClass.enclosingType(), statement,
+ noSuchEnclosingInstance(targetConstructor.declaringClass.enclosingType(), statement,
targetConstructor.problemId() == ProblemReasons.NonStaticReferenceInConstructorInvocation);
return;
}
@@ -4368,7 +4368,7 @@ public void invalidConstructor(Statement statement, MethodBinding targetConstruc
sourceStart,
sourceEnd);
return;
- case ProblemReasons.InferredApplicableMethodInapplicable:
+ case ProblemReasons.InferredApplicableMethodInapplicable:
case ProblemReasons.InvocationTypeInferenceFailure:
// FIXME(stephan): construct suitable message (https://bugs.eclipse.org/404675)
problemConstructor = (ProblemMethodBinding) targetConstructor;
@@ -4766,7 +4766,7 @@ public void invalidMethod(MessageSend messageSend, MethodBinding method, Scope s
ASTNode invocation = (messageSend instanceof CopyInheritance.RoleConstructorCall)
? ((RoleConstructorCall)messageSend).allocationOrig
: messageSend;
- noSuchEnclosingInstance(method.declaringClass.enclosingType(), invocation,
+ noSuchEnclosingInstance(method.declaringClass.enclosingType(), invocation,
method.problemId() == ProblemReasons.NonStaticReferenceInConstructorInvocation);
return;
}
@@ -4820,7 +4820,7 @@ public void invalidMethod(MessageSend messageSend, MethodBinding method, Scope s
// reverse the mapping from lower() to _OT$getBase():
if ( (method.problemId() == ProblemReasons.NotFound)
&& CharOperation.equals(messageSend.selector, IOTConstants._OT_GETBASE))
- method.selector = IOTConstants.LOWER;
+ method.selector = IOTConstants.LOWER;
// SH}
int id = IProblem.UndefinedMethod; //default...
@@ -5113,13 +5113,13 @@ public void invalidMethod(MessageSend messageSend, MethodBinding method, Scope s
if (messageSend.expressionContext == ExpressionContext.VANILLA_CONTEXT) {
TypeVariableBinding[] typeVariables = method.shallowOriginal().typeVariables;
String typeArguments = typesAsString(typeVariables, false);
- this.handle(IProblem.CannotInferInvocationType,
+ this.handle(IProblem.CannotInferInvocationType,
new String[] { typeArguments, String.valueOf(shownMethod.original().readableName()) },
new String[] { typeArguments, String.valueOf(shownMethod.original().shortReadableName()) },
messageSend.sourceStart,
messageSend.sourceEnd);
} else {
- // FIXME(stephan): turn into an exception once we are sure about this
+ // FIXME(stephan): turn into an exception once we are sure about this
this.handle(IProblem.GenericInferenceError,
new String[] { "Unknown error at invocation of "+String.valueOf(shownMethod.readableName())}, //$NON-NLS-1$
new String[] { "Unknown error at invocation of "+String.valueOf(shownMethod.shortReadableName())}, //$NON-NLS-1$
@@ -5621,7 +5621,7 @@ public void misplacedTypeAnnotations(Annotation first, Annotation last) {
NoArgument,
NoArgument,
first.sourceStart,
- last.sourceEnd);
+ last.sourceEnd);
}
public void illegalUsageOfTypeAnnotations(Annotation annotation) {
this.handle(
@@ -5629,7 +5629,7 @@ public void illegalUsageOfTypeAnnotations(Annotation annotation) {
NoArgument,
NoArgument,
annotation.sourceStart,
- annotation.sourceEnd);
+ annotation.sourceEnd);
}
public void illegalTypeAnnotationsInStaticMemberAccess(Annotation first, Annotation last) {
this.handle(
@@ -5640,7 +5640,7 @@ public void illegalTypeAnnotationsInStaticMemberAccess(Annotation first, Annotat
last.sourceEnd);
}
public void isClassPathCorrect(char[][] wellKnownTypeName, CompilationUnitDeclaration compUnitDecl, Object location, boolean implicitAnnotationUse) {
- // ProblemReporter is not designed to be reentrant. Just in case, we discovered a build path problem while we are already
+ // ProblemReporter is not designed to be reentrant. Just in case, we discovered a build path problem while we are already
// in the midst of reporting some other problem, save and restore reference context thereby mimicking a stack.
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=442755.
ReferenceContext savedContext = this.referenceContext;
@@ -5867,7 +5867,7 @@ public void javadocDuplicatedThrowsClassName(TypeReference typeReference, int mo
}
}
public void javadocDuplicatedUsesTag(
-
+
int sourceStart, int sourceEnd){
this.handle(IProblem.JavadocDuplicateUsesTag, NoArgument, NoArgument, sourceStart, sourceEnd);
}
@@ -6717,7 +6717,7 @@ public void localVariableNonNullComparedToNull(LocalVariableBinding local, ASTNo
problemId = IProblem.SpecdNonNullLocalVariableComparisonYieldsFalse;
} else {
arguments = new String[] {new String(local.name) };
- problemId = IProblem.NonNullLocalVariableComparisonYieldsFalse;
+ problemId = IProblem.NonNullLocalVariableComparisonYieldsFalse;
}
this.handle(
problemId,
@@ -6743,7 +6743,7 @@ public void localVariableNullComparedToNonNull(LocalVariableBinding local, ASTNo
/**
* @param expr expression being compared for null or nonnull
- * @param checkForNull true if checking for null, false if checking for nonnull
+ * @param checkForNull true if checking for null, false if checking for nonnull
*/
public boolean expressionNonNullComparison(Expression expr, boolean checkForNull) {
int problemId = 0;
@@ -6774,7 +6774,7 @@ public boolean expressionNonNullComparison(Expression expr, boolean checkForNull
}
// check all those kinds of expressions that can possible answer NON_NULL from nullStatus():
if (expr instanceof MessageSend) {
- problemId = checkForNull
+ problemId = checkForNull
? IProblem.NonNullMessageSendComparisonYieldsFalse
: IProblem.RedundantNullCheckOnNonNullMessageSend;
MethodBinding method = ((MessageSend)expr).binding;
@@ -6792,12 +6792,12 @@ public boolean expressionNonNullComparison(Expression expr, boolean checkForNull
? IProblem.NonNullSpecdFieldComparisonYieldsFalse
: IProblem.RedundantNullCheckOnNonNullSpecdField;
char[][] nonNullName = this.options.nonNullAnnotationName;
- arguments = new String[] { new String(field.name),
+ arguments = new String[] { new String(field.name),
new String(nonNullName[nonNullName.length-1]) };
} else if (field.constant() != Constant.NotAConstant) {
- problemId = checkForNull ? IProblem.ConstNonNullFieldComparisonYieldsFalse : IProblem.RedundantNullCheckOnConstNonNullField;
+ problemId = checkForNull ? IProblem.ConstNonNullFieldComparisonYieldsFalse : IProblem.RedundantNullCheckOnConstNonNullField;
char[][] nonNullName = this.options.nonNullAnnotationName;
- arguments = new String[] { new String(field.name),
+ arguments = new String[] { new String(field.name),
new String(nonNullName[nonNullName.length-1]) };
} else {
// signaling redundancy based on syntactic analysis:
@@ -6809,8 +6809,8 @@ public boolean expressionNonNullComparison(Expression expr, boolean checkForNull
binding = field;
start = nodeSourceStart(binding, location);
end = nodeSourceEnd(binding, location);
- } else if (expr instanceof AllocationExpression
- || expr instanceof ArrayAllocationExpression
+ } else if (expr instanceof AllocationExpression
+ || expr instanceof ArrayAllocationExpression
|| expr instanceof ArrayInitializer
|| expr instanceof ClassLiteralAccess
|| expr instanceof ThisReference) {
@@ -6839,7 +6839,7 @@ public boolean expressionNonNullComparison(Expression expr, boolean checkForNull
}
if (problemId == 0) {
// standard case, fill in details now
- problemId = checkForNull
+ problemId = checkForNull
? IProblem.NonNullExpressionComparisonYieldsFalse
: IProblem.RedundantNullCheckOnNonNullExpression;
start = location.sourceStart;
@@ -6940,7 +6940,7 @@ public void localVariableNullReference(LocalVariableBinding local, ASTNode locat
public void fieldFreeTypeVariableReference(FieldBinding variable, long position) {
char[][] nullableName = this.options.nullableAnnotationName;
- String[] arguments = new String[] {new String(variable.type.readableName()),
+ String[] arguments = new String[] {new String(variable.type.readableName()),
new String(nullableName[nullableName.length-1])};
this.handle(
IProblem.UncheckedAccessOfValueOfFreeTypeVariable,
@@ -6955,7 +6955,7 @@ public void localVariableFreeTypeVariableReference(LocalVariableBinding local, A
int severity = computeSeverity(IProblem.UncheckedAccessOfValueOfFreeTypeVariable);
if (severity == ProblemSeverities.Ignore) return;
char[][] nullableName = this.options.nullableAnnotationName;
- String[] arguments = new String[] {new String(local.type.readableName()),
+ String[] arguments = new String[] {new String(local.type.readableName()),
new String(nullableName[nullableName.length-1])};
this.handle(
IProblem.UncheckedAccessOfValueOfFreeTypeVariable,
@@ -6970,7 +6970,7 @@ public void methodReturnTypeFreeTypeVariableReference(MethodBinding method, ASTN
int severity = computeSeverity(IProblem.UncheckedAccessOfValueOfFreeTypeVariable);
if (severity == ProblemSeverities.Ignore) return;
char[][] nullableName = this.options.nullableAnnotationName;
- String[] arguments = new String[] {new String(method.returnType.readableName()),
+ String[] arguments = new String[] {new String(method.returnType.readableName()),
new String(nullableName[nullableName.length-1])};
this.handle(
IProblem.UncheckedAccessOfValueOfFreeTypeVariable,
@@ -7047,10 +7047,10 @@ public void localVariableRedundantCheckOnNonNull(LocalVariableBinding local, AST
problemId = IProblem.RedundantNullCheckOnSpecdNonNullLocalVariable;
} else {
arguments = new String[] {new String(local.name) };
- problemId = IProblem.RedundantNullCheckOnNonNullLocalVariable;
+ problemId = IProblem.RedundantNullCheckOnNonNullLocalVariable;
}
this.handle(
- problemId,
+ problemId,
arguments,
arguments,
severity,
@@ -7920,7 +7920,7 @@ public void overridesDeprecatedMethod(MethodBinding localMethod, MethodBinding i
sinceValue},
localMethod.sourceStart(),
localMethod.sourceEnd());
-
+
} else {
this.handle(
(inheritedMethod.tagBits & TagBits.AnnotationTerminallyDeprecated) != 0
@@ -7995,7 +7995,7 @@ public void packageIsNotExpectedPackage(CompilationUnitDeclaration compUnitDecl)
end = -1;
} else {
end = hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceEnd;
- }
+ }
this.handle(
IProblem.PackageIsNotExpectedPackage,
arguments,
@@ -8715,7 +8715,7 @@ public void scannerError(Parser parser, String errorTokenName) {
endPos,
parser.compilationUnit.compilationResult);
}
-public void shouldImplementHashcode(SourceTypeBinding type) {
+public void shouldImplementHashcode(SourceTypeBinding type) {
this.handle(
IProblem.ShouldImplementHashcode,
new String[] {new String(type.readableName())},
@@ -9185,19 +9185,19 @@ public void typeMismatchError(TypeBinding typeArgument, TypeVariableBinding type
typeParamName = typeParameter.sourceName();
else
typeParamName = typeParameter.readableName();
-// orig:
+// orig:
this.handle(
//{OT
typeParameter.firstBound == null ? IProblem.ValueTypeArgumentMismatch :
//TO}
IProblem.TypeArgumentMismatch,
-/*
+/*
new String[] { new String(typeArgument.readableName()), new String(genericType.readableName()), new String(typeParameter.sourceName()), parameterBoundAsString(typeParameter, false) },
new String[] { new String(typeArgument.shortReadableName()), new String(genericType.shortReadableName()), new String(typeParameter.sourceName()), parameterBoundAsString(typeParameter, true) },
:giro */
new String[] { new String(typeArgument.readableName()), new String(genericType.readableName()), new String(typeParamName), parameterBoundAsString(typeParameter, false) },
new String[] { new String(typeArgument.shortReadableName()), new String(genericType.shortReadableName()), new String(typeParamName), parameterBoundAsString(typeParameter, true) },
-// SH}
+// SH}
location.sourceStart,
location.sourceEnd);
}
@@ -9339,8 +9339,8 @@ public void unhandledException(TypeBinding exceptionType, ASTNode location) {
if (this.referenceContext instanceof GuardPredicateDeclaration) {
checkedExceptionInGuard(exceptionType, location);
return;
- } else if (this.referenceContext instanceof MethodDeclaration
- && ((MethodDeclaration)this.referenceContext).isMappingWrapper == WrapperKind.CALLIN)
+ } else if (this.referenceContext instanceof MethodDeclaration
+ && ((MethodDeclaration)this.referenceContext).isMappingWrapper == WrapperKind.CALLIN)
{
// problem occurs in parameter mapping, declare exception now instead of reporting the error:
MethodDeclaration wrapperMethod = (MethodDeclaration) this.referenceContext;
@@ -9354,7 +9354,7 @@ public void unhandledException(TypeBinding exceptionType, ASTNode location) {
callinDespiteLiftingProblem(roleType, teamModel.canLiftingFail(roleType), location);
}
return;
- } else if (Lifting.isUnsafeLiftCall(exceptionType, location))
+ } else if (Lifting.isUnsafeLiftCall(exceptionType, location))
{
// add a specific link into the OTJLD to an otherwise normal error message:
this.handle(
@@ -9437,8 +9437,8 @@ public void uninitializedNonNullField(FieldBinding field, ASTNode location) {
char[][] nonNullAnnotationName = this.options.nonNullAnnotationName;
if(!field.isNonNull()) {
String[] arguments = new String[] {
- new String(field.readableName()),
- new String(field.type.readableName()),
+ new String(field.readableName()),
+ new String(field.type.readableName()),
new String(nonNullAnnotationName[nonNullAnnotationName.length-1])
};
this.handle(
@@ -9446,7 +9446,7 @@ public void uninitializedNonNullField(FieldBinding field, ASTNode location) {
arguments,
arguments,
nodeSourceStart(field, location),
- nodeSourceEnd(field, location));
+ nodeSourceEnd(field, location));
return;
}
String[] arguments = new String[] {
@@ -9478,7 +9478,7 @@ public void uninitializedLocalVariable(LocalVariableBinding binding, ASTNode loc
arguments,
nodeSourceStart(binding, location),
nodeSourceEnd(binding, location));
-
+
}
}
private boolean methodHasMissingSwitchDefault() {
@@ -9488,7 +9488,7 @@ private boolean methodHasMissingSwitchDefault() {
} else if (this.referenceContext instanceof AbstractMethodDeclaration) {
methodScope = ((AbstractMethodDeclaration)this.referenceContext).scope;
}
- return methodScope != null && methodScope.hasMissingSwitchDefault;
+ return methodScope != null && methodScope.hasMissingSwitchDefault;
}
public void unmatchedBracket(int position, ReferenceContext context, CompilationResult compilationResult) {
this.handle(
@@ -10007,19 +10007,19 @@ public void unusedLocalVariable(LocalDeclaration localDecl) {
}
public void unusedObjectAllocation(AllocationExpression allocationExpression) {
this.handle(
- IProblem.UnusedObjectAllocation,
- NoArgument,
- NoArgument,
- allocationExpression.sourceStart,
+ IProblem.UnusedObjectAllocation,
+ NoArgument,
+ NoArgument,
+ allocationExpression.sourceStart,
allocationExpression.sourceEnd);
}
public void unusedPrivateConstructor(ConstructorDeclaration constructorDecl) {
int severity = computeSeverity(IProblem.UnusedPrivateConstructor);
if (severity == ProblemSeverities.Ignore) return;
-
+
if (excludeDueToAnnotation(constructorDecl.annotations, IProblem.UnusedPrivateConstructor)) return;
-
+
MethodBinding constructor = constructorDecl.binding;
this.handle(
IProblem.UnusedPrivateConstructor,
@@ -10120,7 +10120,7 @@ public void unusedPrivateMethod(AbstractMethodDeclaration methodDecl) {
return;
}
if (excludeDueToAnnotation(methodDecl.annotations, IProblem.UnusedPrivateMethod)) return;
-
+
this.handle(
IProblem.UnusedPrivateMethod,
new String[] {
@@ -10278,7 +10278,7 @@ public void illegalUseOfUnderscoreAsAnIdentifier(int sourceStart, int sourceEnd,
sourceStart,
sourceEnd);
} finally {
- this.underScoreIsError = false;
+ this.underScoreIsError = false;
}
}
public void varargsArgumentNeedCast(MethodBinding method, TypeBinding argumentType, InvocationSite location) {
@@ -10349,7 +10349,7 @@ public void varargsConflict(MethodBinding method1, MethodBinding method2, Source
TypeBinding.equalsEquals(method1.declaringClass, type) ? method1.sourceEnd() : type.sourceEnd());
}
public void safeVarargsOnFixedArityMethod(MethodBinding method) {
- String [] arguments = new String[] { new String(method.isConstructor() ? method.declaringClass.shortReadableName() : method.selector)};
+ String [] arguments = new String[] { new String(method.isConstructor() ? method.declaringClass.shortReadableName() : method.selector)};
this.handle(
IProblem.SafeVarargsOnFixedArityMethod,
arguments,
@@ -10358,7 +10358,7 @@ public void safeVarargsOnFixedArityMethod(MethodBinding method) {
method.sourceEnd());
}
public void safeVarargsOnNonFinalInstanceMethod(MethodBinding method) {
- String [] arguments = new String[] { new String(method.isConstructor() ? method.declaringClass.shortReadableName() : method.selector)};
+ String [] arguments = new String[] { new String(method.isConstructor() ? method.declaringClass.shortReadableName() : method.selector)};
this.handle(
IProblem.SafeVarargsOnNonFinalInstanceMethod,
arguments,
@@ -10633,7 +10633,7 @@ public void cannotInferElidedTypes(AllocationExpression allocationExpression) {
IProblem.CannotInferElidedTypes,
arguments,
arguments,
- allocationExpression.sourceStart,
+ allocationExpression.sourceStart,
allocationExpression.sourceEnd);
}
public void diamondNotWithExplicitTypeArguments(TypeReference[] typeArguments) {
@@ -10641,7 +10641,7 @@ public void diamondNotWithExplicitTypeArguments(TypeReference[] typeArguments) {
IProblem.CannotUseDiamondWithExplicitTypeArguments,
NoArgument,
NoArgument,
- typeArguments[0].sourceStart,
+ typeArguments[0].sourceStart,
typeArguments[typeArguments.length - 1].sourceEnd);
}
public void rawConstructorReferenceNotWithExplicitTypeArguments(TypeReference[] typeArguments) {
@@ -10649,7 +10649,7 @@ public void rawConstructorReferenceNotWithExplicitTypeArguments(TypeReference[]
IProblem.IllegalTypeArgumentsInRawConstructorReference,
NoArgument,
NoArgument,
- typeArguments[0].sourceStart,
+ typeArguments[0].sourceStart,
typeArguments[typeArguments.length - 1].sourceEnd);
}
public void diamondNotWithAnoymousClasses(TypeReference type) {
@@ -10657,7 +10657,7 @@ public void diamondNotWithAnoymousClasses(TypeReference type) {
IProblem.CannotUseDiamondWithAnonymousClasses,
NoArgument,
NoArgument,
- type.sourceStart,
+ type.sourceStart,
type.sourceEnd);
}
public void anonymousDiamondWithNonDenotableTypeArguments(TypeReference type, TypeBinding tb) {
@@ -10665,7 +10665,7 @@ public void anonymousDiamondWithNonDenotableTypeArguments(TypeReference type, Ty
IProblem.NonDenotableTypeArgumentForAnonymousDiamond,
new String[]{new String(tb.leafComponentType().shortReadableName()), type.toString()},
new String[]{new String(tb.leafComponentType().shortReadableName()), type.toString()},
- type.sourceStart,
+ type.sourceStart,
type.sourceEnd);
}
public void redundantSpecificationOfTypeArguments(ASTNode location, TypeBinding[] argumentTypes) {
@@ -10731,7 +10731,7 @@ public void explicitlyClosedAutoCloseable(FakedTrackingVariable trackVar) {
args,
args,
trackVar.sourceStart,
- trackVar.sourceEnd);
+ trackVar.sourceEnd);
}
public void nullityMismatch(Expression expression, TypeBinding providedType, TypeBinding requiredType, int nullStatus, char[][] annotationName) {
@@ -10750,7 +10750,7 @@ public void nullityMismatch(Expression expression, TypeBinding providedType, Typ
if (var == null && expression instanceof Reference) {
var = ((Reference)expression).lastFieldBinding();
}
- if(var != null && var.type.isFreeTypeVariable()) {
+ if(var != null && var.type.isFreeTypeVariable()) {
nullityMismatchVariableIsFreeTypeVariable(var, expression);
return;
}
@@ -10791,7 +10791,7 @@ public void nullityMismatchIsNull(Expression expression, TypeBinding requiredTyp
argumentsShort = new String[] { new String(requiredType.sourceName()) };
} else {
arguments = new String[] { new String(requiredType.nullAnnotatedReadableName(this.options, false)) };
- argumentsShort = new String[] { new String(requiredType.nullAnnotatedReadableName(this.options, true)) };
+ argumentsShort = new String[] { new String(requiredType.nullAnnotatedReadableName(this.options, true)) };
}
}
this.handle(problemId, arguments, argumentsShort, expression.sourceStart, expression.sourceEnd);
@@ -11147,7 +11147,7 @@ public void roleFileMustDeclareOneType(CompilationUnitDeclaration roleUnit) {
public void roleFileMismatchingName(CompilationUnitDeclaration cud, TypeDeclaration roFiType) {
String[] args = new String[] {
new String(cud.getFileName()),
- new String(roFiType.name)
+ new String(roFiType.name)
};
this.handle(IProblem.RoleFileMismatchingName, args, args, roFiType.sourceStart, roFiType.sourceEnd);
}
@@ -11634,15 +11634,15 @@ public void illegalBaseImportNoAspectBinding(ImportReference ref, String project
}
public void baseImportFromSplitPackage(ImportReference ref, String expectedPlugin) {
- String[] args = {
+ String[] args = {
new String(CharOperation.concatWith(ref.tokens, '.')),
- expectedPlugin
+ expectedPlugin
};
this.handle(
- expectedPlugin.charAt(0) == '['
- ? IProblem.BaseImportFromSplitPackagePlural
+ expectedPlugin.charAt(0) == '['
+ ? IProblem.BaseImportFromSplitPackagePlural
: IProblem.BaseImportFromSplitPackage,
- args, args,
+ args, args,
ProblemSeverities.Warning,
ref.sourceStart, ref.sourceEnd);
}
@@ -11669,7 +11669,7 @@ public void ambiguousUpcastOrLowering(ASTNode location, TypeBinding expectedType
String[] args = { String.valueOf(providedType.readableName()),
String.valueOf(expectedType.readableName()),
String.valueOf(providedType.baseclass().readableName()) };
- this.handle(IProblem.AmbiguousUpcastOrLowering, args, args, location.sourceStart, location.sourceEnd);
+ this.handle(IProblem.AmbiguousUpcastOrLowering, args, args, location.sourceStart, location.sourceEnd);
}
//-- 2.3 --
public void noDefaultCtorInBoundRole(MessageSend send, MethodBinding binding) {
@@ -11733,7 +11733,7 @@ public void fieldInRoleWithInstantiationPolicy(ReferenceBinding typeBinding, Fie
int severity = 0;
switch (instantiationPolicy) {
case ONDEMAND: break; // no problem
- case ALWAYS:
+ case ALWAYS:
problemId = IProblem.FieldInRoleWithInstantiationPolicy;
severity = ProblemSeverities.Warning;
break;
@@ -12052,7 +12052,7 @@ public void abstractPotentiallyRelevantRole(RoleModel role, TeamModel teamModel)
TypeDeclaration typeDecl = role.getAst();
if (typeDecl == null)
typeDecl = teamModel.getAst();
- this.referenceContext = typeDecl;
+ this.referenceContext = typeDecl;
teamModel.tagBits |= TeamModel.HasAbstractRelevantRole;
String[] args = new String[] {
new String(teamModel.getBinding().sourceName()),
@@ -12070,7 +12070,7 @@ public void abstractRelevantRole(RoleModel role, TeamModel teamModel) {
TypeDeclaration typeDecl = role.getAst();
if (typeDecl == null)
typeDecl = teamModel.getAst();
- this.referenceContext = typeDecl;
+ this.referenceContext = typeDecl;
String[] args = new String[] {
new String(teamModel.getBinding().sourceName()),
new String(role.getBinding().sourceName())
@@ -12227,7 +12227,7 @@ public void callinCalloutUndeclaredException(
public void callinToCtorMustBeAfter(MethodSpec methodSpec, MethodBinding baseMethod) {
String[] args = new String[] {
- String.valueOf(baseMethod.readableName())
+ String.valueOf(baseMethod.readableName())
};
this.handle(IProblem.CallinToConstructorMustUseAfter, args, args, methodSpec.sourceStart, methodSpec.sourceEnd);
}
@@ -12497,22 +12497,22 @@ public void boundMethodProblem (MethodSpec spec, ReferenceBinding type, boolean
spec.sourceStart,
spec.sourceEnd);
return;
- case ProblemReasons.ParameterizedMethodTypeMismatch:
+ case ProblemReasons.ParameterizedMethodTypeMismatch:
code = IProblem.ParameterizedMethodArgumentTypeMismatch;
ProblemMethodBinding method = (ProblemMethodBinding) spec.resolvedMethod;
- shownMethod = method.closestMatch;
+ shownMethod = method.closestMatch;
args = new String[] {
new String(shownMethod.selector),
typesAsString(shownMethod, shownMethod.getSourceParameters(), false),
new String(shownMethod.declaringClass.readableName()),
typesAsString(((ParameterizedGenericMethodBinding)shownMethod).typeArguments, false),
- typesAsString(method, method.getSourceParameters(), false)
+ typesAsString(method, method.getSourceParameters(), false)
};
break;
}
}
if (code == -1) {
- String[] msgs = new String[] {"unexpected problem reason "+problemId }; //$NON-NLS-1$
+ String[] msgs = new String[] {"unexpected problem reason "+problemId }; //$NON-NLS-1$
this.handle(IProblem.MissingImplementation, msgs, msgs, spec.declarationSourceStart, spec.declarationSourceEnd);
} else {
this.handle(code, args, args, spec.declarationSourceStart, spec.declarationSourceEnd);
@@ -12631,7 +12631,7 @@ public void inferredCalloutInCompoundAssignment(ASTNode location, char[] fieldNa
public void calloutToEnclosing(CalloutMappingDeclaration mapping, RoleModel role) {
String[] args = { String.valueOf(role.getBinding().readableName()),
String.valueOf(role.getBaseTypeBinding().readableName()) };
- this.handle(IProblem.CalloutToEnclosing, args, args, mapping.sourceStart, mapping.sourceEnd);
+ this.handle(IProblem.CalloutToEnclosing, args, args, mapping.sourceStart, mapping.sourceEnd);
}
// -- 3.2 --
public void unusedParamMap(
@@ -13437,7 +13437,7 @@ public void ignoringRoleMethodReturn(MethodSpec roleMethodSpec) {
IProblem.IgnoringRoleMethodReturn,
args,
args,
- start,
+ start,
end);
}
@@ -13507,9 +13507,9 @@ public void baseArgInNonSimpleExpression(SingleNameReference nameRef) {
nameRef.sourceEnd);
}
public void illegalBindingDirectionNonReplaceCallin(ParameterMapping mapping) {
- this.handle(IProblem.IllegalBindingDirectionNonReplaceCallin,
- NoArgument, NoArgument,
- mapping.sourceStart,
+ this.handle(IProblem.IllegalBindingDirectionNonReplaceCallin,
+ NoArgument, NoArgument,
+ mapping.sourceStart,
mapping.sourceEnd);
}
// -- 4.5 --
@@ -13671,14 +13671,14 @@ public void mismatchingAfterInPrecedence(NameReference name, boolean precedenceI
CallinCalloutBinding binding = (CallinCalloutBinding) name.binding;
String[] args = new String[] { CallinMappingDeclaration.callinModifier(binding.callinModifier) };
this.handle(
- IProblem.NonAfterCallinInAfterPrecedence,
+ IProblem.NonAfterCallinInAfterPrecedence,
args,
args,
name.sourceStart,
name.sourceEnd);
} else {
this.handle(
- IProblem.AfterCallinInNonAfterPrecedence,
+ IProblem.AfterCallinInNonAfterPrecedence,
NoArgument,
NoArgument,
name.sourceStart,
@@ -14079,9 +14079,9 @@ public void valueParamWrongPosition(TypeAnchorReference reference) {
}
public void syntaxErrorInRoleClassLiteral(Expression typeExpr) {
- this.handle(IProblem.SyntaxErrorSingleTypeReferenceExpected,
+ this.handle(IProblem.SyntaxErrorSingleTypeReferenceExpected,
NoArgument, NoArgument, typeExpr.sourceStart, typeExpr.sourceEnd);
-
+
}
// ==== LIMITATIONS: ====
public void unsupportedUseOfGenerics(ASTNode location) {
@@ -14456,7 +14456,7 @@ public void incompatibleWeavingScheme(BinaryTypeBinding type, WeavingScheme sche
}
public void callinBindingToInterface(AbstractMethodMappingDeclaration callinMapping, ReferenceBinding baseIfc) {
String[] args = { String.valueOf(baseIfc.readableName()) };
- this.handle(IProblem.CallinBindingToInterface, args, args, callinMapping.sourceStart, callinMapping.sourceEnd);
+ this.handle(IProblem.CallinBindingToInterface, args, args, callinMapping.sourceStart, callinMapping.sourceEnd);
}
public void otreCannotWeaveIntoJava8(TypeReference baseclassRef, ReferenceBinding baseclass, int major) {
this.handle(IProblem.OtreCannotWeaveIntoJava8,
@@ -14509,9 +14509,9 @@ public void migrateToWrongBase(Expression expression, TypeBinding providedType,
private void nullityMismatchIsFreeTypeVariable(TypeBinding providedType, int sourceStart, int sourceEnd) {
char[][] nullableName = this.options.nullableAnnotationName;
char[][] nonNullName = this.options.nonNullAnnotationName;
- String[] arguments = new String[] {
- new String(nonNullName[nonNullName.length-1]),
- new String(providedType.readableName()),
+ String[] arguments = new String[] {
+ new String(nonNullName[nonNullName.length-1]),
+ new String(providedType.readableName()),
new String(nullableName[nullableName.length-1])};
this.handle(IProblem.RequiredNonNullButProvidedFreeTypeVariable, arguments, arguments, sourceStart, sourceEnd);
}
@@ -14534,14 +14534,14 @@ public void illegalRedefinitionToNonNullParameter(Argument argument, ReferenceBi
}
if (inheritedAnnotationName == null) {
this.handle(
- IProblem.IllegalDefinitionToNonNullParameter,
+ IProblem.IllegalDefinitionToNonNullParameter,
new String[] { new String(argument.name), new String(declaringClass.readableName()) },
new String[] { new String(argument.name), new String(declaringClass.shortReadableName()) },
sourceStart,
argument.type.sourceEnd);
} else {
this.handle(
- IProblem.IllegalRedefinitionToNonNullParameter,
+ IProblem.IllegalRedefinitionToNonNullParameter,
new String[] { new String(argument.name), new String(declaringClass.readableName()), CharOperation.toString(inheritedAnnotationName)},
new String[] { new String(argument.name), new String(declaringClass.shortReadableName()), new String(inheritedAnnotationName[inheritedAnnotationName.length-1])},
sourceStart,
@@ -14550,7 +14550,7 @@ public void illegalRedefinitionToNonNullParameter(Argument argument, ReferenceBi
}
public void parameterLackingNullableAnnotation(Argument argument, ReferenceBinding declaringClass, char[][] inheritedAnnotationName) {
this.handle(
- IProblem.ParameterLackingNullableAnnotation,
+ IProblem.ParameterLackingNullableAnnotation,
new String[] { new String(declaringClass.readableName()), CharOperation.toString(inheritedAnnotationName)},
new String[] { new String(declaringClass.shortReadableName()), new String(inheritedAnnotationName[inheritedAnnotationName.length-1])},
argument.type.sourceStart,
@@ -14558,7 +14558,7 @@ public void parameterLackingNullableAnnotation(Argument argument, ReferenceBindi
}
public void parameterLackingNonnullAnnotation(Argument argument, ReferenceBinding declaringClass, char[][] inheritedAnnotationName) {
this.handle(
- IProblem.ParameterLackingNonNullAnnotation,
+ IProblem.ParameterLackingNonNullAnnotation,
new String[] { new String(declaringClass.readableName()), CharOperation.toString(inheritedAnnotationName)},
new String[] { new String(declaringClass.shortReadableName()), new String(inheritedAnnotationName[inheritedAnnotationName.length-1])},
argument.type.sourceStart,
@@ -14590,7 +14590,7 @@ public void illegalParameterRedefinition(Argument argument, ReferenceBinding dec
}
}
this.handle(
- IProblem.IllegalParameterNullityRedefinition,
+ IProblem.IllegalParameterNullityRedefinition,
new String[] { new String(argument.name), new String(declaringClass.readableName()), new String(inheritedParameter.nullAnnotatedReadableName(this.options, false)) },
new String[] { new String(argument.name), new String(declaringClass.shortReadableName()), new String(inheritedParameter.nullAnnotatedReadableName(this.options, true)) },
sourceStart,
@@ -14635,14 +14635,14 @@ public void illegalReturnRedefinition(AbstractMethodDeclaration abstractMethodDe
// 1.7-
returnType.append('@').append(CharOperation.concatWith(nonNullAnnotationName, '.'));
returnType.append(' ').append(inheritedReturnType.readableName());
-
+
returnTypeShort.append('@').append(nonNullAnnotationName[nonNullAnnotationName.length-1]);
returnTypeShort.append(' ').append(inheritedReturnType.shortReadableName());
}
String[] arguments = new String[] { methodSignature.toString(), returnType.toString() };
String[] argumentsShort = new String[] { shortSignature.toString(), returnTypeShort.toString() };
this.handle(
- problemId,
+ problemId,
arguments,
argumentsShort,
sourceStart,
@@ -14744,7 +14744,7 @@ public void cannotImplementIncompatibleNullness(ReferenceContext context, Method
}
}
String[] problemArguments = {
- showReturn
+ showReturn
? new String(currentMethod.returnType.nullAnnotatedReadableName(this.options, false))+' '
: "", //$NON-NLS-1$
new String(currentMethod.selector),
@@ -14753,7 +14753,7 @@ public void cannotImplementIncompatibleNullness(ReferenceContext context, Method
new String(inheritedMethod.declaringClass.readableName())
};
String[] messageArguments = {
- showReturn
+ showReturn
? new String(currentMethod.returnType.nullAnnotatedReadableName(this.options, true))+' '
: "", //$NON-NLS-1$
new String(currentMethod.selector),
@@ -14865,7 +14865,7 @@ public void contradictoryNullAnnotationsInferred(MethodBinding inferredMethod, i
typesAsString(inferredMethod, true, true)
};
this.handle(
- isFunctionalExpression ? IProblem.ContradictoryNullAnnotationsInferredFunctionType : IProblem.ContradictoryNullAnnotationsInferred,
+ isFunctionalExpression ? IProblem.ContradictoryNullAnnotationsInferredFunctionType : IProblem.ContradictoryNullAnnotationsInferred,
arguments, shortArguments, sourceStart, sourceEnd);
}
@@ -14920,7 +14920,7 @@ public void conflictingInheritedNullAnnotations(ASTNode location, boolean previo
public void illegalAnnotationForBaseType(TypeReference type, Annotation[] annotations, long nullAnnotationTagBit)
{
- int typeBit = (nullAnnotationTagBit == TagBits.AnnotationNullable)
+ int typeBit = (nullAnnotationTagBit == TagBits.AnnotationNullable)
? TypeIds.BitNullableAnnotation : TypeIds.BitNonNullAnnotation;
char[][] annotationNames = (nullAnnotationTagBit == TagBits.AnnotationNonNull)
? this.options.nonNullAnnotationName
@@ -14971,7 +14971,7 @@ String internalAnnotatedTypeName(char[] annotationName, char[] typeName, int dim
char[] fullName;
if (dims > 0) {
int plainLen = annotationName.length+typeName.length+2; // adding '@' and ' ' ...
- fullName = new char[plainLen+(2*dims)]; // ... and []*
+ fullName = new char[plainLen+(2*dims)]; // ... and []*
System.arraycopy(typeName, 0, fullName, 0, typeName.length);
fullName[typeName.length] = ' ';
fullName[typeName.length+1] = '@';
@@ -14981,7 +14981,7 @@ String internalAnnotatedTypeName(char[] annotationName, char[] typeName, int dim
fullName[plainLen+i+1] = ']';
}
} else {
- fullName = new char[annotationName.length+typeName.length+2]; // adding '@' and ' '
+ fullName = new char[annotationName.length+typeName.length+2]; // adding '@' and ' '
fullName[0] = '@';
System.arraycopy(annotationName, 0, fullName, 1, annotationName.length);
fullName[annotationName.length+1] = ' ';
@@ -15054,9 +15054,9 @@ public void illegalModifiers(int modifierSourceStart, int modifiersSourceEnd) {
public void arrayReferencePotentialNullReference(ArrayReference arrayReference) {
// TODO(stephan): merge with other expressions
this.handle(IProblem.ArrayReferencePotentialNullReference, NoArgument, NoArgument, arrayReference.sourceStart, arrayReference.sourceEnd);
-
+
}
-public void nullityMismatchingTypeAnnotation(Expression expression, TypeBinding providedType, TypeBinding requiredType, NullAnnotationMatching status)
+public void nullityMismatchingTypeAnnotation(Expression expression, TypeBinding providedType, TypeBinding requiredType, NullAnnotationMatching status)
{
if (providedType == requiredType) return; //$IDENTITY-COMPARISON$
@@ -15090,7 +15090,7 @@ public void nullityMismatchingTypeAnnotation(Expression expression, TypeBinding
String[] arguments;
String[] shortArguments;
-
+
int problemId = 0;
String superHint = null;
String superHintShort = null;
@@ -15150,10 +15150,10 @@ public void nullityMismatchTypeArgument(TypeBinding typeVariable, TypeBinding ty
String.valueOf(typeArgument.nullAnnotatedReadableName(this.options, true))
};
this.handle(
- IProblem.NullityMismatchTypeArgument,
- arguments,
- shortArguments,
- location.sourceStart,
+ IProblem.NullityMismatchTypeArgument,
+ arguments,
+ shortArguments,
+ location.sourceStart,
location.sourceEnd);
}
@@ -15171,10 +15171,10 @@ public void cannotRedefineTypeArgumentNullity(TypeBinding typeVariable, Binding
shortArguments[1] = String.valueOf(superElement.shortReadableName());
}
this.handle(
- IProblem.IllegalRedefinitionOfTypeVariable,
- arguments,
- shortArguments,
- location.sourceStart,
+ IProblem.IllegalRedefinitionOfTypeVariable,
+ arguments,
+ shortArguments,
+ location.sourceStart,
location.sourceEnd);
}
@@ -15195,7 +15195,7 @@ public void nonNullTypeVariableInUnannotatedBinary(LookupEnvironment environment
char[][] nonNullName = this.options.nonNullAnnotationName;
String shortNonNullName = String.valueOf(nonNullName[nonNullName.length-1]);
-
+
if (typeVariable.declaringElement instanceof ReferenceBinding) {
String[] arguments = new String[] {
shortNonNullName,
@@ -15206,7 +15206,7 @@ public void nonNullTypeVariableInUnannotatedBinary(LookupEnvironment environment
String.valueOf(declaringClass.nullAnnotatedReadableName(this.options, true)),
String.valueOf(declaringClass.original().shortReadableName()) };
this.handle(IProblem.NonNullTypeVariableFromLegacyMethod,
- arguments,
+ arguments,
shortArguments,
severity,
expression.sourceStart,
@@ -15224,11 +15224,11 @@ public void nonNullTypeVariableInUnannotatedBinary(LookupEnvironment environment
String.valueOf(substitution.nullAnnotatedReadableName(this.options, true)),
String.valueOf(declaringClass.original().shortReadableName()) };
this.handle(IProblem.NonNullMethodTypeVariableFromLegacyMethod,
- arguments,
- shortArguments,
+ arguments,
+ shortArguments,
severity,
expression.sourceStart,
- expression.sourceEnd);
+ expression.sourceEnd);
}
}
}
@@ -15437,7 +15437,7 @@ public void danglingReference(ReferenceExpression expression, TypeBinding receiv
buffer.append(new String(parameters[i].readableName()));
shortBuffer.append(new String(parameters[i].shortReadableName()));
}
-
+
int id = IProblem.DanglingReference;
this.handle(
id,
@@ -15461,7 +15461,7 @@ public void incompatibleReturnType(ReferenceExpression expression, MethodBinding
new String[] { new String(method.declaringClass.shortReadableName()), new String(returnType.shortReadableName())},
expression.sourceStart,
expression.sourceEnd);
-
+
} else {
StringBuffer buffer = new StringBuffer();
StringBuffer shortBuffer = new StringBuffer();
@@ -15490,7 +15490,7 @@ public void illegalSuperAccess(TypeBinding superType, TypeBinding directSuperTyp
}
if (directSuperType.problemId() != ProblemReasons.AttemptToBypassDirectSuper)
needImplementation(location);
- handle(IProblem.SuperAccessCannotBypassDirectSuper,
+ handle(IProblem.SuperAccessCannotBypassDirectSuper,
new String[] { String.valueOf(superType.readableName()), String.valueOf(directSuperType.readableName()) },
new String[] { String.valueOf(superType.shortReadableName()), String.valueOf(directSuperType.shortReadableName()) },
location.sourceStart,
@@ -15529,23 +15529,23 @@ public void genericInferenceProblem(String message, InvocationSite invocationSit
start = invocationSite.sourceStart();
end = invocationSite.sourceEnd();
}
- this.handle(IProblem.GenericInferenceError, args, args, severity|ProblemSeverities.InternalError, start, end);
+ this.handle(IProblem.GenericInferenceError, args, args, severity|ProblemSeverities.InternalError, start, end);
}
public void uninternedIdentityComparison(EqualExpression expr, TypeBinding lhs, TypeBinding rhs, CompilationUnitDeclaration unit) {
-
+
char [] lhsName = lhs.sourceName();
char [] rhsName = rhs.sourceName();
-
+
if (CharOperation.equals(lhsName, "VoidTypeBinding".toCharArray()) //$NON-NLS-1$
|| CharOperation.equals(lhsName, "NullTypeBinding".toCharArray()) //$NON-NLS-1$
|| CharOperation.equals(lhsName, "ProblemReferenceBinding".toCharArray())) //$NON-NLS-1$
return;
-
+
if (CharOperation.equals(rhsName, "VoidTypeBinding".toCharArray()) //$NON-NLS-1$
|| CharOperation.equals(rhsName, "NullTypeBinding".toCharArray()) //$NON-NLS-1$
|| CharOperation.equals(rhsName, "ProblemReferenceBinding".toCharArray())) //$NON-NLS-1$
return;
-
+
boolean[] validIdentityComparisonLines = unit.validIdentityComparisonLines;
if (validIdentityComparisonLines != null) {
int problemStartPosition = expr.left.sourceStart;
@@ -15556,7 +15556,7 @@ public void uninternedIdentityComparison(EqualExpression expr, TypeBinding lhs,
if (lineNumber <= validIdentityComparisonLines.length && validIdentityComparisonLines[lineNumber - 1])
return;
}
-
+
this.handle(
IProblem.UninternedIdentityComparison,
new String[] {
@@ -15577,7 +15577,7 @@ public void invalidTypeArguments(TypeReference[] typeReference) {
typeReference[typeReference.length - 1].sourceEnd);
}
public void invalidModule(ModuleReference ref) {
- this.handle(IProblem.UndefinedModule,
+ this.handle(IProblem.UndefinedModule,
NoArgument, new String[] { CharOperation.charToString(ref.moduleName) },
ref.sourceStart, ref.sourceEnd);
}
@@ -15607,28 +15607,28 @@ public void exportingForeignPackage(PackageVisibilityStatement ref, ModuleBindin
ref.pkgRef.sourceEnd);
}
public void duplicateModuleReference(int problem, ModuleReference ref) {
- this.handle(problem,
+ this.handle(problem,
NoArgument, new String[] { CharOperation.charToString(ref.moduleName) },
ref.sourceStart, ref.sourceEnd);
}
public void duplicateTypeReference(int problem, TypeReference ref) {
- this.handle(problem,
+ this.handle(problem,
NoArgument, new String[] { ref.toString() },
ref.sourceStart, ref.sourceEnd);
}
public void duplicateTypeReference(int problem, TypeReference ref1, TypeReference ref2) {
- this.handle(problem,
+ this.handle(problem,
NoArgument, new String[] { ref1.toString(), ref2.toString() },
ref1.sourceStart, ref2.sourceEnd);
}
public void duplicateResourceReference(Reference ref) {
- this.handle(IProblem.DuplicateResource,
+ this.handle(IProblem.DuplicateResource,
NoArgument, new String[] {ref.toString() },
ProblemSeverities.Warning,
ref.sourceStart, ref.sourceEnd);
}
public void cyclicModuleDependency(ModuleBinding binding, ModuleReference ref) {
- this.handle(IProblem.CyclicModuleDependency,
+ this.handle(IProblem.CyclicModuleDependency,
NoArgument, new String[] { CharOperation.charToString(binding.moduleName), CharOperation.charToString(ref.moduleName) },
ref.sourceStart, ref.sourceEnd);
}
@@ -15647,13 +15647,13 @@ public void unlikelyArgumentType(Expression argument, MethodBinding method, Type
new String(argumentType.readableName()),
new String(method.readableName()),
new String(receiverType.readableName())
- },
+ },
new String[] {
new String(argumentType.shortReadableName()),
new String(method.shortReadableName()),
new String(receiverType.shortReadableName())
- },
- argument.sourceStart,
+ },
+ argument.sourceStart,
argument.sourceEnd);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfInteger.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfInteger.java
index 4c8165c74..2000a4411 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfInteger.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfInteger.java
@@ -136,7 +136,7 @@ public final class HashtableOfInteger {
}
this.keyTable[index] = intKey;
this.valueTable[index] = value;
-
+
// assumes the threshold is never equal to the size of the table
if (++this.elementSize > this.threshold) {
rehash();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfModule.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfModule.java
index 5cd85c902..f382a76ff 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfModule.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfModule.java
@@ -7,10 +7,10 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
- *
+ *
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.util;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfObject.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfObject.java
index a30af491b..79d6dc5a0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfObject.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfObject.java
@@ -136,7 +136,7 @@ public final class HashtableOfObject implements Cloneable {
}
this.keyTable[index] = key;
this.valueTable[index] = value;
-
+
// assumes the threshold is never equal to the size of the table
if (++this.elementSize > this.threshold) {
rehash();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/JRTUtil.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/JRTUtil.java
index 5216b5941..2234ec89d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/JRTUtil.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/JRTUtil.java
@@ -70,7 +70,7 @@ public class JRTUtil {
public FileVisitResult visitFile(T file, T mod, BasicFileAttributes attrs) throws IOException;
/**
- * Invoked when a root directory of a module being visited. The element returned
+ * Invoked when a root directory of a module being visited. The element returned
* contains only the module name segment - e.g. "java.base". Clients can use this to control
* how the JRT needs to be processed, for e.g., clients can skip a particular module
* by returning FileVisitResult.SKIP_SUBTREE
@@ -83,17 +83,17 @@ public class JRTUtil {
public FileVisitResult preVisitDirectory(T dir, BasicFileAttributes attrs) throws IOException {
return FileVisitResult.CONTINUE;
}
-
+
@Override
public FileVisitResult visitFile(T file, BasicFileAttributes attrs) throws IOException {
return FileVisitResult.CONTINUE;
}
-
+
@Override
public FileVisitResult visitFileFailed(T file, IOException exc) throws IOException {
return FileVisitResult.CONTINUE;
}
-
+
@Override
public FileVisitResult postVisitDirectory(T dir, IOException exc) throws IOException {
return FileVisitResult.CONTINUE;
@@ -123,7 +123,7 @@ public class JRTUtil {
images.put(key, system = JrtFileSystem.getNewJrtFileSystem(image, release));
} catch (IOException e) {
e.printStackTrace();
- // Needs better error handling downstream? But for now, make sure
+ // Needs better error handling downstream? But for now, make sure
// a dummy JrtFileSystem is not created.
}
}
@@ -143,9 +143,9 @@ public class JRTUtil {
*
* The file system contains the following top level directories:
* /modules/$MODULE/$PATH
- * /packages/$PACKAGE/$MODULE
+ * /packages/$PACKAGE/$MODULE
* The latter provides quick look up of the module that contains a particular package. However,
- * this method only notifies its clients of the entries within the modules (latter) sub-directory.
+ * this method only notifies its clients of the entries within the modules (latter) sub-directory.
* Clients can decide which notifications they want to receive. See {@link JRTUtil#NOTIFY_ALL},
* {@link JRTUtil#NOTIFY_FILES}, {@link JRTUtil#NOTIFY_PACKAGES} and {@link JRTUtil#NOTIFY_MODULES}.
*
@@ -218,7 +218,7 @@ class JrtFileSystemWithOlderRelease extends JrtFileSystem {
*
* @param jrt the path to the root of the JRE whose libraries we are interested in.
* @param release the older release where classes and modules should be searched for.
- * @throws IOException
+ * @throws IOException
*/
JrtFileSystemWithOlderRelease(File jrt, String release) throws IOException {
super(jrt);
@@ -227,7 +227,7 @@ class JrtFileSystemWithOlderRelease extends JrtFileSystem {
}
@Override
void initialize(File jdk) throws IOException {
- // Just to make sure we don't do anything in super.initialize()
+ // Just to make sure we don't do anything in super.initialize()
// before setting this.release
}
void initialize(File jdk, String rel) throws IOException {
@@ -322,7 +322,7 @@ class JrtFileSystemWithOlderRelease extends JrtFileSystem {
}
}
}
-
+
}
class JrtFileSystem {
private final Map<String, String> packageToModule = new HashMap<String, String>();
@@ -333,16 +333,16 @@ class JrtFileSystem {
Path modRoot = null;
String jdkHome = null;
public static JrtFileSystem getNewJrtFileSystem(File jrt, String release) throws IOException {
- return (release == null) ? new JrtFileSystem(jrt) :
+ return (release == null) ? new JrtFileSystem(jrt) :
new JrtFileSystemWithOlderRelease(jrt, release);
-
+
}
/**
* The jrt file system is based on the location of the JRE home whose libraries
* need to be loaded.
*
* @param jrt the path to the root of the JRE whose libraries we are interested in.
- * @throws IOException
+ * @throws IOException
*/
JrtFileSystem(File jrt) throws IOException {
initialize(jrt);
@@ -547,7 +547,7 @@ class JrtFileSystem {
JRTUtil.MODULE_TO_LOAD.indexOf(mod.toString()) == -1)) {
return FileVisitResult.SKIP_SUBTREE;
}
- return ((notify & JRTUtil.NOTIFY_MODULES) == 0) ?
+ return ((notify & JRTUtil.NOTIFY_MODULES) == 0) ?
FileVisitResult.CONTINUE : visitor.visitModule(dir, JRTUtil.sanitizedFileName(mod));
}
if ((notify & JRTUtil.NOTIFY_PACKAGES) == 0) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/ManifestAnalyzer.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/ManifestAnalyzer.java
index eb72d852c..79119d373 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/ManifestAnalyzer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/ManifestAnalyzer.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -32,13 +32,13 @@ public class ManifestAnalyzer {
"Class-Path:".toCharArray(); //$NON-NLS-1$
private int classpathSectionsCount;
private ArrayList calledFilesNames;
-
+
/**
* Analyzes the manifest contents. The given input stream is read using a UTF-8 encoded reader.
* If the contents of the input stream is not encoded using a UTF-8 encoding, the analysis will fail.
- *
+ *
* @param inputStream the given input stream.
- *
+ *
* @return <code>true</code> if the analysis is successful, <code>false</code> otherwise.
* @throws IOException if an exception occurs while analyzing the file
*/
@@ -49,9 +49,9 @@ public class ManifestAnalyzer {
/**
* Analyzes the manifest contents.
- *
+ *
* @param chars the content of the manifest
- *
+ *
* @return <code>true</code> if the analysis is successful, <code>false</code> otherwise.
*/
public boolean analyzeManifestContents(char[] chars) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Sorting.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Sorting.java
index 607b2f21d..ab351f5d4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Sorting.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Sorting.java
@@ -38,7 +38,7 @@ public class Sorting {
ReferenceBinding[] unsorted = new ReferenceBinding[len];
ReferenceBinding[] sorted = new ReferenceBinding[len];
System.arraycopy(types, 0, unsorted, 0, len);
-
+
int o = 0;
for(int i=0; i<len; i++)
o = sort(unsorted, i, sorted, o);
@@ -123,6 +123,6 @@ public class Sorting {
public int compare(InferenceVariable iv1, InferenceVariable iv2) {
return iv1.rank - iv2.rank;
}
- });
+ });
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java
index 2a4b7a99d..432cba4a5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* daolaf@gmail.com - Contribution for bug 3292227
@@ -791,10 +791,10 @@ public class Util implements SuffixConstants {
}
return true; // it is neither a ".java" file nor a ".class" file, so this is a potential archive name
}
-
+
public static final int ZIP_FILE = 0;
public static final int JMOD_FILE = 1;
-
+
/**
* Returns the kind of archive this file is. The format is one of
* #ZIP_FILE or {@link #JMOD_FILE}
@@ -807,7 +807,7 @@ public class Util implements SuffixConstants {
return -1; // dot was before the last file separator, it cannot be a zip archive name
int length = name.length();
int extensionLength = length - lastDot - 1;
-
+
if (extensionLength == EXTENSION_java.length()) {
for (int i = extensionLength-1; i >=0; i--) {
if (Character.toLowerCase(name.charAt(length - extensionLength + i)) != EXTENSION_java.charAt(i)) {
@@ -1437,7 +1437,7 @@ public class Util implements SuffixConstants {
if (c != C_ARRAY) {
throw newIllegalArgumentException(string, start);
}
-
+
c = string[++start];
while(c == C_ARRAY) {
// need a minimum 2 char
@@ -1726,7 +1726,7 @@ public class Util implements SuffixConstants {
}
return true;
}
-
+
public static void appendEscapedChar(StringBuffer buffer, char c, boolean stringLiteral) {
switch (c) {
case '\b' :
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/ConfigHelper.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/ConfigHelper.java
index 316e6b0c2..c59da3fd8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/ConfigHelper.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/ConfigHelper.java
@@ -1,8 +1,8 @@
/**********************************************************************
* This file is part of "Object Teams Development Tooling"-Software
- *
+ *
* Copyright 2009 Stephan Herrmann
- *
+ *
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,9 +10,9 @@
*
* SPDX-License-Identifier: EPL-2.0
* $Id$
- *
+ *
* Please visit http://www.eclipse.org/objectteams for updates and contact.
- *
+ *
* Contributors:
* Stephan Herrmann - Initial API and implementation
**********************************************************************/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/IOTConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/IOTConstants.java
index 2236f73fe..f0254107e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/IOTConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/IOTConstants.java
@@ -182,7 +182,7 @@ public interface IOTConstants
// OTDYN uses just one method for both:
public static final char[] ADD_REMOVE_ROLE = (OT_DOLLAR + "addOrRemoveRole").toCharArray();
-
+
// predefined classes and interfaces:
public static final char[] ORG = "org".toCharArray();
public static final char[] OBJECTTEAMS = "objectteams".toCharArray();
@@ -232,16 +232,16 @@ public interface IOTConstants
public static final char[][] ROLE_CAST_EXCEPTION = {ORG, OBJECTTEAMS,
"RoleCastException".toCharArray()};
- /**
+ /**
* @since 3.7 (OT 2.0)
*/
public static final char[] INSTANTIATION = "Instantiation".toCharArray();
- /**
+ /**
* @since 3.7 (OT 2.0)
*/
public static final char[][] ORG_OBJECTTEAMS_INSTANTIATION = {ORG, OBJECTTEAMS,
INSTANTIATION};
-
+
public static final char[][] ILLEGAL_ROLE_CREATION_EXCEPTION = {ORG, OBJECTTEAMS,
"IllegalRoleCreationException".toCharArray()};
public static final char[][] ORG_OBJECTTEAMS_ITEAMMIGRATABLE = {ORG, OBJECTTEAMS,
@@ -251,8 +251,8 @@ public interface IOTConstants
"IBaseMigratable".toCharArray()};
public static final char[] MIGRATE_TO_BASE = "migrateToBase".toCharArray();
- public static final char[][] OTRE_INTERNAL_ERROR = new char[][]{"org".toCharArray(),
- "objectteams".toCharArray(),
+ public static final char[][] OTRE_INTERNAL_ERROR = new char[][]{"org".toCharArray(),
+ "objectteams".toCharArray(),
"OTREInternalError".toCharArray()};
/**
* @since 3.9 (OT 2.2)
@@ -312,7 +312,7 @@ public interface IOTConstants
public static final char[] QUERY_MODULE_SUFFIX = "_Queries__OT__".toCharArray();
// decapsulation accessor prefix:
public static final char[] OT_DECAPS = "_OT$decaps$".toCharArray();
-
+
// --------- for MethodBinding.otBits: --------------------------
/**
* have types been wrapped in the signature?
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/InferenceKind.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/InferenceKind.java
index 09580f3d8..7937ebbb6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/InferenceKind.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/InferenceKind.java
@@ -20,25 +20,25 @@ package org.eclipse.objectteams.otdt.core.compiler;
/**
* Kinds to differentiate inferred callouts.
- *
+ *
* @author stephan
* @since 1.3.2
*/
-public enum InferenceKind {
+public enum InferenceKind {
/** Not an inferred callout */
NONE,
/** Callout inferred from a declared super interface. */
INTERFACE,
/** Callout inferred from a self call. */
- SELFCALL,
+ SELFCALL,
/** Callout inferred from a reading field access (via 'this'). */
- FIELDGET,
+ FIELDGET,
/** Callout inferred from a writing field access (via 'this'). */
FIELDSET;
- /**
+ /**
* Some inferred callouts generate private methods that are not advertised in the interface,
- * Answer if this callout binding is advertised in the interface.
+ * Answer if this callout binding is advertised in the interface.
*/
public boolean isAdvertisedInInterface() {
if (this == NONE || this == INTERFACE)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/OTNameUtils.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/OTNameUtils.java
index 71d4ab92a..4b774a08f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/OTNameUtils.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/OTNameUtils.java
@@ -1,8 +1,8 @@
/**********************************************************************
* This file is part of "Object Teams Development Tooling"-Software
- *
+ *
* Copyright 2009 Stephan Herrmann
- *
+ *
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,9 +10,9 @@
*
* SPDX-License-Identifier: EPL-2.0
* $Id: OTNameUtils.java 23417 2010-02-03 20:13:55Z stephan $
- *
+ *
* Please visit http://www.eclipse.org/objectteams for updates and contact.
- *
+ *
* Contributors:
* Stephan Herrmann - Initial API and implementation
**********************************************************************/
@@ -30,7 +30,7 @@ import static org.eclipse.objectteams.otdt.core.compiler.IOTConstants.TSUPER_OT_
import org.eclipse.jdt.core.compiler.CharOperation;
/**
- * API class providing various operations for special names in generated OT/J code.
+ * API class providing various operations for special names in generated OT/J code.
* @author stephan
* @since 1.3.2
*/
@@ -39,7 +39,7 @@ public class OTNameUtils {
// for inferred callout to field:
private static final char[] SET = "set".toCharArray(); //$NON-NLS-1$
private static final char[] GET = "get".toCharArray(); //$NON-NLS-1$
-
+
/**
* Is selector the name of a predicate method?
*/
@@ -70,10 +70,10 @@ public class OTNameUtils {
return strippedName;
}
- /**
+ /**
* Given a fieldName (e.g. val) construct an accessor method name (getVal, or setVal) for inferred callout.
* @param isSetter asking for a "set" accessor?
- * @param fieldName
+ * @param fieldName
*/
public static char[] accessorName(boolean isSetter, char[] fieldName) {
if (fieldName == null)
@@ -84,10 +84,10 @@ public class OTNameUtils {
char[] prefix = isSetter ? OTNameUtils.SET : OTNameUtils.GET;
return CharOperation.concat(prefix, capitalized);
}
- /**
+ /**
* Given a fieldName (e.g. val) construct an accessor method name (getVal, or setVal) for inferred callout.
* @param isSetter asking for a "set" accessor?
- * @param fieldName
+ * @param fieldName
* @since 3.10 OT 2.3
*/
public static String accessorName(boolean isSetter, String fieldName) {
@@ -96,7 +96,7 @@ public class OTNameUtils {
int len = fieldName.length();
char[] accessor = new char[3+len];
System.arraycopy(isSetter ? OTNameUtils.SET : OTNameUtils.GET, 0, accessor, 0, 3);
- accessor[3] = Character.toUpperCase(fieldName.charAt(0));
+ accessor[3] = Character.toUpperCase(fieldName.charAt(0));
fieldName.getChars(1, len, accessor, 4);
return String.valueOf(accessor);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/Pair.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/Pair.java
index f73e910b5..6d21dfa07 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/Pair.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/Pair.java
@@ -20,10 +20,10 @@ package org.eclipse.objectteams.otdt.core.compiler;
/**
* Simple pair structure.
- *
+ *
* @author stephan
* @since 0.9.27
- *
+ *
* @param <T1> type of the first element
* @param <T2> type of the second element
*/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/exceptions/InternalCompilerError.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/exceptions/InternalCompilerError.java
index 10326d5dc..80edeac7b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/exceptions/InternalCompilerError.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/exceptions/InternalCompilerError.java
@@ -1,11 +1,11 @@
/**********************************************************************
* This file is part of "Object Teams Development Tooling"-Software
- *
+ *
* Copyright 2004, 2006 Fraunhofer Gesellschaft, Munich, Germany,
* for its Fraunhofer Institute for Computer Architecture and Software
* Technology (FIRST), Berlin, Germany and Technical University Berlin,
* Germany.
- *
+ *
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -13,9 +13,9 @@
*
* SPDX-License-Identifier: EPL-2.0
* $Id: InternalCompilerError.java 23416 2010-02-03 19:59:31Z stephan $
- *
+ *
* Please visit http://www.eclipse.org/objectteams for updates and contact.
- *
+ *
* Contributors:
* Fraunhofer FIRST - Initial API and implementation
* Technical University Berlin - Initial API and implementation
@@ -32,33 +32,33 @@ public class InternalCompilerError extends Error
{
super();
}
-
+
public InternalCompilerError(String message)
{
super(message);
}
-
+
public InternalCompilerError(String message, Throwable cause)
{
super(message, cause);
}
-
+
private static final String INTRO = new String(
"You discovered a bug in the Object Teams Development Tooling." + (char)Character.LINE_SEPARATOR + //$NON-NLS-1$
"Please consider filing a bug including this stacktrace and a description how to reproduce at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Objectteams" + (char)Character.LINE_SEPARATOR + //$NON-NLS-1$
"Thank you -- the OTDT Development Team." + (char)Character.LINE_SEPARATOR); //$NON-NLS-1$
-
+
@Override
public String getMessage()
{
return INTRO + super.getMessage();
}
-
+
public static void log(String message)
{
new InternalCompilerError(message).printStackTrace(System.out);
}
-
+
public static void log(String message, Throwable cause)
{
new InternalCompilerError(message, cause).printStackTrace(System.out);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/AbstractMethodMappingDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/AbstractMethodMappingDeclaration.java
index a45afa671..70b7579a8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/AbstractMethodMappingDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/AbstractMethodMappingDeclaration.java
@@ -183,7 +183,7 @@ public abstract class AbstractMethodMappingDeclaration
{
this.ignoreFurtherInvestigation = true;
}
-
+
@Override
public void tagAsHavingIgnoredMandatoryErrors(int problemId) {
// nothing here
@@ -363,9 +363,9 @@ public abstract class AbstractMethodMappingDeclaration
try {
for (int i = 0; i < baseMethodSpecs.length; i++) {
MethodSpec methodSpec = baseMethodSpecs[i];
-
+
methodSpec.resolveFeatureWithArgMapping(baseType, this.scope, /*isBaseSide*/true, /*callinExpected*/false, /*allowEnclosing*/false);
-
+
if (!methodSpec.isValid()) {
if ( methodSpec.problemId() == ProblemReasons.NotVisible
&& canAccessInvisibleBase())
@@ -601,7 +601,7 @@ public abstract class AbstractMethodMappingDeclaration
for (ParameterMapping mapping : this.mappings)
if (mapping.direction == TerminalTokens.TokenNameBINDIN) // ident <- expr
mapping.expression.traverse(new BaseScopeMarker(), this.scope);
-
+
// check 4.4(c) - sentence 2:
if (isCallin() && !isReplaceCallin())
for (ParameterMapping mapping : this.mappings)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/BaseAllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/BaseAllocationExpression.java
index f50c08426..ca509a9f7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/BaseAllocationExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/BaseAllocationExpression.java
@@ -142,7 +142,7 @@ public class BaseAllocationExpression extends Assignment {
if (!isArgOfOtherCtor(enclCtor, scope))
scope.problemReporter().baseConstructorExpressionOutsideCtorCall(this);
} else {
- if (enclCtor.statements[0] != this)
+ if (enclCtor.statements[0] != this)
scope.problemReporter().baseConstructorCallIsNotFirst(this);
}
@@ -313,7 +313,7 @@ public class BaseAllocationExpression extends Assignment {
TypeBinding.INT,
scope.createArrayType(scope.getJavaLangObject(), 1),
scope.getOrgObjectteamsITeam()
- },
+ },
Binding.NO_EXCEPTIONS,
(ReferenceBinding) baseclass);
allocSend.binding.returnType = scope.getJavaLangObject();
@@ -329,7 +329,7 @@ public class BaseAllocationExpression extends Assignment {
IntLiteral opKindLiteral = gen.intLiteral(0);
opKindLiteral.resolveType(scope);
-
+
Expression[] boxedArgs = null;
if (arguments != null) {
boxedArgs = new Expression[arguments.length];
@@ -348,7 +348,7 @@ public class BaseAllocationExpression extends Assignment {
boxedArgs[i] = argument;
}
}
- ArrayAllocationExpression packedArgs = gen.arrayAllocation(gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT),
+ ArrayAllocationExpression packedArgs = gen.arrayAllocation(gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT),
boxedArgs != null ? 1 : 0, boxedArgs); // arguments are already resolved at this point
ArrayBinding objectArray = scope.createArrayType(scope.getJavaLangObject(), 1);
if (packedArgs.initializer != null)
@@ -360,7 +360,7 @@ public class BaseAllocationExpression extends Assignment {
Reference teamReference = gen.qualifiedThisReference(scope.enclosingSourceType().enclosingType());
teamReference.resolveType(scope);
-
+
return new Expression[] { accessIdLiteral, opKindLiteral, packedArgs, teamReference };
}
@@ -489,7 +489,7 @@ public class BaseAllocationExpression extends Assignment {
return super.resolveType(scope);
return null;
}
-
+
@Override
public void computeConversion(Scope scope, TypeBinding runtimeType, TypeBinding compileTimeType) {
if (this.isExpression)
@@ -505,7 +505,7 @@ public class BaseAllocationExpression extends Assignment {
else
super.generateCode(currentScope, codeStream, valueRequired);
}
-
+
@Override
public String toString() {
if (this.expression == null)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/BaseCallMessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/BaseCallMessageSend.java
index 54d377c3c..7a641be6d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/BaseCallMessageSend.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/BaseCallMessageSend.java
@@ -221,7 +221,7 @@ public class BaseCallMessageSend extends AbstractExpressionWrapper
// receiver:
ReferenceBinding roleType = scope.enclosingSourceType();
this._receiver.adjustReceiver(roleType, isStatic, callinMethodDecl, gen, weavingScheme);
-
+
// empty base call surrogate is handled using a synthetic base call surrogate:
boolean isCallinBound = SyntheticBaseCallSurrogate.isCallinMethodBoundIn(callinMethodBinding, callinMethodBinding.declaringClass);
@@ -230,7 +230,7 @@ public class BaseCallMessageSend extends AbstractExpressionWrapper
resolveSyntheticBaseCallSurrogate(callinMethodDecl, scope, weavingScheme);
return this.resolvedType;
}
-
+
// selector:
if (weavingScheme == WeavingScheme.OTDRE) {
wrappedSend.selector = CallinImplementorDyn.OT_CALL_NEXT;
@@ -291,8 +291,8 @@ public class BaseCallMessageSend extends AbstractExpressionWrapper
}
/* manual resolve for an empty base call surrogate, which is indeed generated by the compiler, not the OTRE. */
- private void resolveSyntheticBaseCallSurrogate(MethodDeclaration callinMethodDecl, BlockScope scope, WeavingScheme weavingScheme)
- {
+ private void resolveSyntheticBaseCallSurrogate(MethodDeclaration callinMethodDecl, BlockScope scope, WeavingScheme weavingScheme)
+ {
// find the method:
MethodBinding callinMethod = callinMethodDecl.binding;
if (callinMethod == null) {
@@ -307,7 +307,7 @@ public class BaseCallMessageSend extends AbstractExpressionWrapper
// find the receiver type:
this._receiver.resolve(scope);
int depth = 0;
- while (this._receiver.resolvedType.isLocalType()) {
+ while (this._receiver.resolvedType.isLocalType()) {
this._receiver.resolvedType = this._receiver.resolvedType.enclosingType();
depth++;
}
@@ -321,7 +321,7 @@ public class BaseCallMessageSend extends AbstractExpressionWrapper
TypeBinding[] sendparams = new TypeBinding[this._sendOrig.arguments.length];
for (int i=0; i<sendparams.length; i++)
sendparams[i] = this._sendOrig.arguments[i].resolveType(scope);
-
+
// check arguments:
int sourceArgsLen = 0;
if (this.sourceArgs != null)
@@ -348,9 +348,9 @@ public class BaseCallMessageSend extends AbstractExpressionWrapper
}
}
}
-
+
// create and link the synthetic method binding:
- MethodBinding surrogate = null;
+ MethodBinding surrogate = null;
MethodModel model = callinMethod.model;
if (model != null)
surrogate = model.getBaseCallSurrogate();
@@ -373,10 +373,10 @@ public class BaseCallMessageSend extends AbstractExpressionWrapper
@Override
public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBinding compileTimeType) {
- if ( this._sendOrig.binding instanceof SyntheticBaseCallSurrogate
+ if ( this._sendOrig.binding instanceof SyntheticBaseCallSurrogate
&& this._sendOrig == this._wrappee // otherwise wrappee contains conversion
&& this.resolvedType.isBaseType()
- && this.resolvedType != TypeBinding.VOID)
+ && this.resolvedType != TypeBinding.VOID)
{
ReferenceBinding boxType = (ReferenceBinding) scope.getType(AstGenerator.boxTypeName((BaseTypeBinding) this.resolvedType), 3);
this._sendOrig.valueCast = boxType; // triggers insertion of checkcast to boxType
@@ -384,13 +384,13 @@ public class BaseCallMessageSend extends AbstractExpressionWrapper
}
super.computeConversion(scope, runtimeTimeType, compileTimeType);
}
-
+
private MethodDeclaration getEnclosingCallinMethod(Scope scope) {
if (this.enclosingCallinMethod == null)
this.enclosingCallinMethod = findEnclosingCallinMethod(scope, this);
return this.enclosingCallinMethod;
}
-
+
public static MethodDeclaration findEnclosingCallinMethod(Scope scope, ASTNode errorLocation) { // errorLocation == null => don't report
AbstractMethodDeclaration methodDecl = null;
MethodScope methodScope = scope.methodScope();
@@ -404,7 +404,7 @@ public class BaseCallMessageSend extends AbstractExpressionWrapper
}
if (errorLocation != null) {
if (methodDecl == null) {
- scope.problemReporter().baseCallOutsideMethod(errorLocation);
+ scope.problemReporter().baseCallOutsideMethod(errorLocation);
} else {
scope.problemReporter().basecallInRegularMethod(errorLocation, methodDecl);
}
@@ -467,9 +467,9 @@ public class BaseCallMessageSend extends AbstractExpressionWrapper
* <li>static callin method
* <li>containing a lambda
* <li>containing a base call
- * </ul>
+ * </ul>
* In this structure the base call (_OT$callNext()) needs to tunnel the call target
- * (team instance) through yet another synthetic argument.
+ * (team instance) through yet another synthetic argument.
*/
public static void lambdaCapture(LambdaExpression lambda, BlockScope currentScope) {
if (currentScope.compilerOptions().weavingScheme != WeavingScheme.OTDRE)
@@ -477,7 +477,7 @@ public class BaseCallMessageSend extends AbstractExpressionWrapper
MethodScope methodScope = currentScope.methodScope();
if (methodScope == null || methodScope.extraSyntheticArguments == null)
return;
- SyntheticArgumentBinding[] extraSyntheticArguments = methodScope.extraSyntheticArguments;
+ SyntheticArgumentBinding[] extraSyntheticArguments = methodScope.extraSyntheticArguments;
ASTVisitor findBaseCalls = new ASTVisitor() {
@Override
public boolean visit(BaseCallMessageSend messageSend, BlockScope scope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/CallinMappingDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/CallinMappingDeclaration.java
index 112d7c558..d777cc9e4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/CallinMappingDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/CallinMappingDeclaration.java
@@ -266,7 +266,7 @@ public class CallinMappingDeclaration extends AbstractMethodMappingDeclaration
if (baseMethod.isConstructor()) {
if (this.callinModifier != TokenNameafter) {
this.scope.problemReporter().callinToCtorMustBeAfter(this.baseMethodSpecs[i], baseMethod);
- this.binding.tagBits |= TagBits.HasMappingIncompatibility;
+ this.binding.tagBits |= TagBits.HasMappingIncompatibility;
}
}
}
@@ -293,7 +293,7 @@ public class CallinMappingDeclaration extends AbstractMethodMappingDeclaration
return false;
} else {
// before modifying the parameters array copy it:
- System.arraycopy(this.roleMethodSpec.parameters, 0,
+ System.arraycopy(this.roleMethodSpec.parameters, 0,
this.roleMethodSpec.parameters = new TypeBinding[roleParams.length], 0,
roleParams.length);
for (int j = 0; j < roleParams.length; j++) {
@@ -362,7 +362,7 @@ public class CallinMappingDeclaration extends AbstractMethodMappingDeclaration
methodSpec.argNeedsTranslation[j] = true;
this.roleMethodSpec.argNeedsTranslation[j] = true;
this.roleMethodSpec.parameters[j] = roleToLiftTo; // this applies to all bindings
-
+
// still need to check for ambiguity/abstract role:
ReferenceBinding enclosingTeam = this.scope.enclosingSourceType().enclosingType();
int iProblem = enclosingTeam.getTeamModel().canLiftingFail((ReferenceBinding)roleToLiftTo.leafComponentType());
@@ -462,7 +462,7 @@ public class CallinMappingDeclaration extends AbstractMethodMappingDeclaration
break;
}
}
- }
+ }
}
}
TypeVariableBinding returnVariable= MethodModel.checkedGetReturnTypeVariable(this.roleMethodSpec.resolvedMethod);
@@ -609,7 +609,7 @@ public class CallinMappingDeclaration extends AbstractMethodMappingDeclaration
}
}
}
-
+
private boolean typeUsesTypeVariable(TypeBinding type, TypeBinding variable) {
if (TypeBinding.equalsEquals(type.leafComponentType(), variable))
return true;
@@ -644,11 +644,11 @@ public class CallinMappingDeclaration extends AbstractMethodMappingDeclaration
}
/** Check details that require analyseCode() of methods to be finished: */
- public void analyseDetails(TypeDeclaration roleClass, WeavingScheme weavingScheme)
- {
+ public void analyseDetails(TypeDeclaration roleClass, WeavingScheme weavingScheme)
+ {
// check validity of base-super call
if ( this.roleMethodSpec.isValid()
- && MethodModel.hasCallinFlag(this.roleMethodSpec.resolvedMethod, CALLIN_FLAG_BASE_SUPER_CALL))
+ && MethodModel.hasCallinFlag(this.roleMethodSpec.resolvedMethod, CALLIN_FLAG_BASE_SUPER_CALL))
{
for (int i = 0; i < this.baseMethodSpecs.length; i++) {
MethodBinding baseMethod = this.baseMethodSpecs[i].resolvedMethod;
@@ -663,7 +663,7 @@ public class CallinMappingDeclaration extends AbstractMethodMappingDeclaration
}
// check whether a base result is missing
if ( this.baseMethodNeedingResultFromBasecall != null
- && !this.isResultMapped)
+ && !this.isResultMapped)
{
if (MethodModel.hasCallinFlag(this.roleMethodSpec.resolvedMethod, CALLIN_FLAG_DEFINITELY_MISSING_BASECALL))
{
@@ -967,7 +967,7 @@ public class CallinMappingDeclaration extends AbstractMethodMappingDeclaration
}
/**
- * Answer the name of the role that introduced this callin mapping
+ * Answer the name of the role that introduced this callin mapping
* (support for overriding in otredyn).
*/
public char[] declaringRoleName() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/FieldAccessSpec.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/FieldAccessSpec.java
index ac158341d..439d48d4e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/FieldAccessSpec.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/FieldAccessSpec.java
@@ -146,7 +146,7 @@ public class FieldAccessSpec extends MethodSpec {
}
} else if (baseType.isTeam()) {
// base class is a team, construct simple anchor
-
+
ReferenceBinding enclRole = scope.enclosingSourceType();
newAnchor = TypeAnalyzer.findField(enclRole, IOTConstants._OT_BASE, /*don't check static*/false, /*outer*/false);
} // else fieldLeafType might already be a anchored type,
@@ -161,7 +161,7 @@ public class FieldAccessSpec extends MethodSpec {
}
if ( !baseType.isRole()
- && this.resolvedField.canBeSeenBy(scope.enclosingReceiverType().baseclass(), this, scope))
+ && this.resolvedField.canBeSeenBy(scope.enclosingReceiverType().baseclass(), this, scope))
{
// no accessor method needed
this.implementationStrategy = ImplementationStrategy.DIRECT;
@@ -432,7 +432,7 @@ public class FieldAccessSpec extends MethodSpec {
}
@Override
- public int createAccessAttribute(RoleModel roleModel) {
+ public int createAccessAttribute(RoleModel roleModel) {
return roleModel.addAccessedBaseField(this.resolvedField, this.calloutModifier, null);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/LiftingTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/LiftingTypeReference.java
index 4e92f3c4a..02d8ea986 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/LiftingTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/LiftingTypeReference.java
@@ -284,7 +284,7 @@ public class LiftingTypeReference extends TypeReference {
public char[][] getParameterizedTypeName() {
return this.baseReference.getParameterizedTypeName();
}
-
+
@Override
public char[] getLastToken() {
return this.baseReference.getLastToken();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/MethodSpec.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/MethodSpec.java
index 2abf114db..3829f6d54 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/MethodSpec.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/MethodSpec.java
@@ -297,13 +297,13 @@ public class MethodSpec extends ASTNode implements InvocationSite
enhancedParameters = MethodSignatureEnhancer.enhanceParameters(scope, this.parameters);
CompilationResult compilationResult = scope.referenceContext().compilationResult();
CheckPoint cp = compilationResult.getCheckPoint(scope.referenceContext());
-
+
this.resolvedMethod = TypeAnalyzer.findMethod(scope, receiverClass, realSelector, enhancedParameters, isBaseSide, isBaseSide ? this : null);
boolean notFound = false, isVarargs = false;
if (this.resolvedMethod.isValidBinding())
isVarargs = this.resolvedMethod.isVarargs();
else
- notFound = this.resolvedMethod.problemId() == ProblemReasons.NotFound;
+ notFound = this.resolvedMethod.problemId() == ProblemReasons.NotFound;
if (notFound || (isVarargs && ((this.bits & IsVarArgs) == 0))) {
// second+ chance: try plain:
while (receiverClass != null) {
@@ -343,13 +343,13 @@ public class MethodSpec extends ASTNode implements InvocationSite
if (this.resolvedMethod != null) {
if (this.resolvedMethod.isValidBinding()) {
// check visibility of role-side in callin:
- if (!isBaseSide
- && scope.referenceContext() instanceof CallinMappingDeclaration
- && !this.resolvedMethod.canBeSeenBy(this, scope))
+ if (!isBaseSide
+ && scope.referenceContext() instanceof CallinMappingDeclaration
+ && !this.resolvedMethod.canBeSeenBy(this, scope))
{
scope.problemReporter().invisibleMethod(this, this.resolvedMethod);
this.resolvedMethod = new ProblemMethodBinding(this.resolvedMethod, this.selector, this.parameters, ProblemReasons.NotVisible);
- }
+ }
}
if (!this.resolvedMethod.isValidBinding() && this.resolvedMethod.declaringClass == null)
this.resolvedMethod.declaringClass = receiverClass; // needed for computeUniqueKey (via CallinCalloutBinding.computeUniqueKey)
@@ -490,7 +490,7 @@ public class MethodSpec extends ASTNode implements InvocationSite
default:
scope.problemReporter().missingImplementation(this, "Unexpected compile error at MethodSpec "+this); //$NON-NLS-1$
return;
- }
+ }
}
initTranslationBits();
}
@@ -514,7 +514,7 @@ public class MethodSpec extends ASTNode implements InvocationSite
void checkDecapsulation(ReferenceBinding baseClass, Scope scope) {
if (!this.resolvedMethod.canBeSeenBy(baseClass, this, scope)) {
WeavingScheme weavingScheme = scope.compilerOptions().weavingScheme;
- this.implementationStrategy = weavingScheme == WeavingScheme.OTDRE
+ this.implementationStrategy = weavingScheme == WeavingScheme.OTDRE
? ImplementationStrategy.DYN_ACCESS : ImplementationStrategy.DECAPS_WRAPPER;
this.accessId = createAccessAttribute(scope.enclosingSourceType().roleModel);
scope.problemReporter().decapsulation(this, baseClass, scope);
@@ -609,7 +609,7 @@ public class MethodSpec extends ASTNode implements InvocationSite
if (!TypeAnalyzer.isSameType(
scope.enclosingSourceType(),
specifiedArgType.resolvedType,
- realParameter))
+ realParameter))
{
scope.problemReporter().differentParamInMethodSpec(
this, specifiedArgType, realParameter,
@@ -672,7 +672,7 @@ public class MethodSpec extends ASTNode implements InvocationSite
return signature(this.resolvedMethod, weavingScheme);
}
/**
- * This method is used by
+ * This method is used by
* {@link org.eclipse.objectteams.otdt.internal.core.compiler.bytecode.CallinMethodMappingsAttribute CallinMethodMappingsAttribute}
* for decoding a mapping from its bytecode attribute.
* @param method
@@ -691,7 +691,7 @@ public class MethodSpec extends ASTNode implements InvocationSite
// manual retrenching?
boolean shouldRetrench = weavingScheme == WeavingScheme.OTRE && method.isCallin();
int offset = shouldRetrench ? MethodSignatureEnhancer.getEnhancingArgLen(weavingScheme) : 0;
- int paramLen = method.parameters.length;
+ int paramLen = method.parameters.length;
for (int i = offset; i < paramLen; i++) {
// 'weaken' to that erasure that was used in the tsuper version:
TypeBinding targetParameter = method.getCodeGenType(i);
@@ -702,8 +702,8 @@ public class MethodSpec extends ASTNode implements InvocationSite
? MethodModel.getReturnType(method)
: method.returnType;
// 'weaken' to that erasure that was used in the tsuper version:
- MethodBinding tsuperOriginal = (method.otBits & IOTConstants.IsCopyOfParameterized) != 0
- ? method.copyInheritanceSrc.original()
+ MethodBinding tsuperOriginal = (method.otBits & IOTConstants.IsCopyOfParameterized) != 0
+ ? method.copyInheritanceSrc.original()
: null;
TypeBinding returnType = (tsuperOriginal != null && tsuperOriginal.returnType.isTypeVariable() && !sourceReturnType.isTypeVariable())
? tsuperOriginal.returnType
@@ -779,7 +779,7 @@ public class MethodSpec extends ASTNode implements InvocationSite
public boolean isSuperAccess() {
return true; // grant access to inherited methods
}
-
+
@Override
public boolean isTypeAccess() {
return this.resolvedMethod != null && this.resolvedMethod.isStatic();
@@ -787,7 +787,7 @@ public class MethodSpec extends ASTNode implements InvocationSite
@Override
public void setActualReceiverType(ReferenceBinding receiverType) {
- // ignored
+ // ignored
}
@Override
@@ -797,7 +797,7 @@ public class MethodSpec extends ASTNode implements InvocationSite
@Override
public void setFieldIndex(int depth) {
- // ignored
+ // ignored
}
/**
@@ -807,7 +807,7 @@ public class MethodSpec extends ASTNode implements InvocationSite
public TypeBinding invocationTargetType() {
return null;
}
-
+
@Override
public InferenceContext18 freshInferenceContext(Scope scope) {
int nArgs = this.arguments.length;
@@ -821,13 +821,13 @@ public class MethodSpec extends ASTNode implements InvocationSite
return new InferenceContext18(scope, expressions, this, null);
}
-
+
@Override
public ExpressionContext getExpressionContext() {
return ExpressionContext.ASSIGNMENT_CONTEXT;
}
-
+
public int createAccessAttribute(RoleModel roleModel) {
- return roleModel.addInaccessibleBaseMethod(this.resolvedMethod);
+ return roleModel.addInaccessibleBaseMethod(this.resolvedMethod);
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLiftExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLiftExpression.java
index 661fa93c6..b9195d9d4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLiftExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLiftExpression.java
@@ -61,12 +61,12 @@ public class PotentialLiftExpression extends PotentialTranslationExpression {
// indeed needed can be propagated via the MethodSpec to the CallinMethodMappingsAttribute.
// Update (1.3.0M3): This is now done by a registered job (callback):
private Runnable liftingConfirmJob;
-
+
private TypeReference expectedTypeReference = null;
/** Job to perform if analysis confirms that lifting is required. */
public void onLiftingRequired(Runnable job) {
- this.liftingConfirmJob = job;
+ this.liftingConfirmJob = job;
}
/**
@@ -85,7 +85,7 @@ public class PotentialLiftExpression extends PotentialTranslationExpression {
this.operator = "lift"; //$NON-NLS-1$
this.teamExpr = teamExpr;
}
-
+
/**
* Create a wrapper for an expression that might require lifting.
*
@@ -113,7 +113,7 @@ public class PotentialLiftExpression extends PotentialTranslationExpression {
return null; // no chance
if (providedType.isParameterizedType())
providedType = providedType.erasure();
-
+
if (this.expectedType == null)
this.expectedType = this.expectedTypeReference.resolvedType;
this.checked = true;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLowerExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLowerExpression.java
index af61a275c..c27a2e545 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLowerExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialLowerExpression.java
@@ -62,7 +62,7 @@ public class PotentialLowerExpression extends PotentialTranslationExpression {
{
this(expression, expectedType, null);
}
-
+
public PotentialLowerExpression(
Expression expression,
TypeBinding expectedType,
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialRoleReceiverExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialRoleReceiverExpression.java
index 0bb366d23..61f0853fb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialRoleReceiverExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialRoleReceiverExpression.java
@@ -41,7 +41,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.AstGenerator;
* - direct
* - using a role reference as the implicit receiver
* Used to wrap RHS expressions in callin parameter mappings.
- *
+ *
* @author stephan
* @since 1.3.1
*/
@@ -50,9 +50,9 @@ public class PotentialRoleReceiverExpression extends Expression {
Expression expression;
char[] roleVarName;
TypeReference roleClassRef;
-
+
private Expression altExpression;
-
+
public PotentialRoleReceiverExpression(Expression expression, char[] roleName, TypeReference roleClassRef) {
super();
this.expression = expression;
@@ -84,20 +84,20 @@ public class PotentialRoleReceiverExpression extends Expression {
else
this.expression.generateCode(currentScope, codeStream, valueRequired);
}
-
+
@Override
public TypeBinding resolveType(BlockScope scope) {
ReferenceContext referenceContext = scope.referenceContext();
CompilationResult compilationResult = referenceContext.compilationResult();
CheckPoint cp = compilationResult.getCheckPoint(referenceContext);
-
+
// try normal:
this.resolvedType = this.expression.resolveType(scope);
if (this.resolvedType != null && this.resolvedType.isValidBinding()) {
this.constant = this.expression.constant;
return this.resolvedType;
}
-
+
// try alternative:
TypeBinding altResult = null;
AstGenerator gen = new AstGenerator(this.expression);
@@ -106,7 +106,7 @@ public class PotentialRoleReceiverExpression extends Expression {
if (this.expression instanceof SingleNameReference) {
this.altExpression = gen.fieldReference(
gen.castExpression(
- gen.singleNameReference(this.roleVarName),
+ gen.singleNameReference(this.roleVarName),
this.roleClassRef,
CastExpression.NEED_CLASS),
((SingleNameReference)this.expression).token);
@@ -126,7 +126,7 @@ public class PotentialRoleReceiverExpression extends Expression {
((MessageSend)this.expression).actualReceiverType = ((MessageSend)this.altExpression).actualReceiverType;
}
}
-
+
// evaluate results:
if (altResult != null && altResult.isValidBinding()) {
compilationResult.rollBack(cp);
@@ -137,7 +137,7 @@ public class PotentialRoleReceiverExpression extends Expression {
this.constant = this.expression.constant;
return this.resolvedType;
}
-
+
@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
return this.expression.printExpression(indent, output);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PrecedenceDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PrecedenceDeclaration.java
index a5ee865f0..e40d44617 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PrecedenceDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PrecedenceDeclaration.java
@@ -283,7 +283,7 @@ public class PrecedenceDeclaration extends ASTNode {
count--;
} else {
if (i < len)
- type.scope.problemReporter().incompatiblePrecedenceLists(findPrecedenceSource(precedences[i], precedences[j], type),
+ type.scope.problemReporter().incompatiblePrecedenceLists(findPrecedenceSource(precedences[i], precedences[j], type),
type, precedences[i], precedences[j]);
else
throw new InternalCompilerError("Incompatible inherited precedence lists"); //$NON-NLS-1$
@@ -301,7 +301,7 @@ public class PrecedenceDeclaration extends ASTNode {
}
return precedences;
}
-
+
private static ASTNode findPrecedenceSource(PrecedenceBinding prec1, PrecedenceBinding prec2, TypeDeclaration type) {
if (type.precedences != null)
for (int i = 0; i < type.precedences.length; i++)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PrivateRoleMethodCall.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PrivateRoleMethodCall.java
index bfb79c7d5..aceeac713 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PrivateRoleMethodCall.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PrivateRoleMethodCall.java
@@ -1,18 +1,18 @@
-/**
+/**
* This file is part of "Object Teams Development Tooling"-Software
- *
+ *
* Copyright 2014 GK Software AG
- *
+ *
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Please visit http://www.eclipse.org/objectteams for updates and contact.
- *
- * Contributors:
+ *
+ * Contributors:
* Stephan Herrmann - Initial API and implementation
**********************************************************************/
package org.eclipse.objectteams.otdt.internal.core.compiler.ast;
@@ -33,7 +33,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.AstGenerator;
/**
* A message send to a private role method requiring redirection via a pair of bridge methods.
* Directly hooks into generateCode to achieve the necessary modifications.
- *
+ *
* (Before 3.7 (OT 2.0) this was an anonymous class inside CalloutImplementor).
* @author stephan
* @since 3.7 OT 2.0
@@ -41,7 +41,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.AstGenerator;
public class PrivateRoleMethodCall extends MessageSend {
private boolean isCalloutToField;
private AstGenerator gen;
-
+
public PrivateRoleMethodCall(Expression receiver, char[] selector, Expression[] arguments, boolean isCalloutToField,
Scope scope, ReferenceBinding targetClass, MethodBinding targetMethod, AstGenerator gen)
{
@@ -67,7 +67,7 @@ public class PrivateRoleMethodCall extends MessageSend {
ITeamAnchor teamAnchor = ((RoleTypeBinding)this.actualReceiverType)._teamAnchor;
TypeAnchorReference syntheticReceiver = this.gen.typeAnchorReference(teamAnchor);
syntheticReceiver.isExpression = true;
- receiverReference = syntheticReceiver;
+ receiverReference = syntheticReceiver;
} else {
isCallinAccess = true;
// call from inside a otre-dyn callin wrapper: receiver is the current team:
@@ -82,12 +82,12 @@ public class PrivateRoleMethodCall extends MessageSend {
// for method callout or callin to private *add* the team instance to the front of pushes
// original role instance receiver will become the first implicit argument
receiverReference.generateCode(currentScope, codeStream, true/*valueRequired*/);
-
+
if (isCallinAccess) {
// might need more synthetic args:
if (this.binding.isStatic()) {
codeStream.aconst_null(); // first arg in role bridge: (null) role
- codeStream.iconst_0(); // enclosingTeamInstance: dummy value
+ codeStream.iconst_0(); // enclosingTeamInstance: dummy value
codeStream.aload_0(); // enclosingTeamInstance: team instance
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/QualifiedBaseReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/QualifiedBaseReference.java
index 92d4c5178..5b770f7a2 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/QualifiedBaseReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/QualifiedBaseReference.java
@@ -31,17 +31,17 @@ import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
import org.eclipse.objectteams.otdt.core.compiler.IOTConstants;
-/**
+/**
* This class represents a reference of the form <code>Type.base</code>
* for use as a type anchor in a {@link TypeAnchorReference}.
- *
+ *
* @author stephan
* @since 1.4.0
*/
public class QualifiedBaseReference extends QualifiedThisReference {
FieldBinding baseField;
-
+
public QualifiedBaseReference(TypeReference name, int sourceStart, int sourceEnd) {
super(name, sourceStart, sourceEnd);
}
@@ -63,9 +63,9 @@ public class QualifiedBaseReference extends QualifiedThisReference {
if (this.baseField == null)
this.baseField = new ProblemFieldBinding((ReferenceBinding)this.resolvedType, IOTConstants.BASE, ProblemReasons.NotFound);
scope.problemReporter().unboundQualifiedBase((ReferenceBinding)this.qualification.resolvedType, this);
- return null;
+ return null;
}
-
+
@Override
public TypeBinding resolveType(ClassScope scope) {
// for baseclass reference we indeed need to resolve from a class scope,
@@ -81,7 +81,7 @@ public class QualifiedBaseReference extends QualifiedThisReference {
codeStream.fieldAccess(Opcodes.OPC_getfield, this.baseField, this.baseField.declaringClass);
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
-
+
@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
return this.qualification.print(0, output).append(".base"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/RoleClassLiteralAccess.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/RoleClassLiteralAccess.java
index 8add6d987..8e080092a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/RoleClassLiteralAccess.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/RoleClassLiteralAccess.java
@@ -87,13 +87,13 @@ public class RoleClassLiteralAccess extends ClassLiteralAccess {
generateMessageSend(expressionType);
}
- /**
+ /**
* Constructor for use by the Parser.
*/
public RoleClassLiteralAccess(SingleTypeReference typeRef) {
super(typeRef.sourceEnd, typeRef);
}
-
+
private void generateMessageSend(TypeBinding expressionType) {
AstGenerator gen = new AstGenerator(this.type.sourceStart, this.sourceEnd);
ReferenceBinding roleBinding = (ReferenceBinding)this.type.resolvedType;
@@ -151,7 +151,7 @@ public class RoleClassLiteralAccess extends ClassLiteralAccess {
if (this.type instanceof ParameterizedSingleTypeReference) {
// directly created from parsing R<@t>.class
this.constant = Constant.NotAConstant;
-
+
ParameterizedSingleTypeReference typeRef = (ParameterizedSingleTypeReference)this.type;
if (typeRef.token == null) {
// syntax error, however, we can still check the type anchor:
@@ -161,7 +161,7 @@ public class RoleClassLiteralAccess extends ClassLiteralAccess {
return null;
}
TypeBinding roleType = this.type.resolveType(scope);
- if (roleType != null && roleType.isValidBinding())
+ if (roleType != null && roleType.isValidBinding())
generateMessageSend(roleType);
}
// clients might still use this (obsolete) field?
@@ -200,7 +200,7 @@ public class RoleClassLiteralAccess extends ClassLiteralAccess {
}
private static TypeBinding ensureGetClassMethodPart(TypeDeclaration teamDecl, ReferenceBinding teamBinding,
- TypeDeclaration roleDecl, ReferenceBinding roleBinding, char[] selector)
+ TypeDeclaration roleDecl, ReferenceBinding roleBinding, char[] selector)
{
MethodBinding[] existingMethods = teamBinding.getMethods(selector);
if (existingMethods != NO_METHODS)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TSuperMessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TSuperMessageSend.java
index a7b0045b3..495e5bbf3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TSuperMessageSend.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TSuperMessageSend.java
@@ -103,21 +103,21 @@ public class TSuperMessageSend extends MessageSend {
@Override
protected TypeBinding findMethodBinding(BlockScope scope) {
-
+
// check: is a tsuper call legal in the current context?
-
+
AbstractMethodDeclaration context = scope.methodScope().referenceMethod();
- if (context == null
+ if (context == null
|| !CharOperation.equals(this.selector, context.selector)
- || context.binding.parameters.length != this.argumentTypes.length)
+ || context.binding.parameters.length != this.argumentTypes.length)
{
scope.problemReporter().tsuperCallsWrongMethod(this);
return null;
}
ReferenceBinding receiverRole;
- if (!(this.actualReceiverType instanceof ReferenceBinding)
- || !(receiverRole = (ReferenceBinding)this.actualReceiverType).isSourceRole())
+ if (!(this.actualReceiverType instanceof ReferenceBinding)
+ || !(receiverRole = (ReferenceBinding)this.actualReceiverType).isSourceRole())
{
scope.problemReporter().tsuperOutsideRole(context, this, this.actualReceiverType);
return null;
@@ -157,7 +157,7 @@ public class TSuperMessageSend extends MessageSend {
resolvePolyExpressionArguments(this, this.binding, this.argumentTypes, scope);
return this.binding.returnType;
}
- if (bestMatch == null ||
+ if (bestMatch == null ||
(bestMatch.problemId() == ProblemReasons.NotFound && candidate.problemId() != ProblemReasons.NotFound))
bestMatch = candidate;
}
@@ -168,20 +168,20 @@ public class TSuperMessageSend extends MessageSend {
this.binding = bestMatch;
return this.binding.returnType;
}
-
+
@Override
- public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired)
+ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired)
{
- // for code gen we need to add the marker arg...
+ // for code gen we need to add the marker arg...
int len = this.binding.parameters.length;
TypeBinding[] extendedParameters = new TypeBinding[len+1];
System.arraycopy(this.binding.parameters, 0, extendedParameters, 0, len);
char[] tSuperMarkName = TSuperHelper.getTSuperMarkName(this.tsuperReference.resolvedType.enclosingType());
extendedParameters[len] = currentScope.getType(tSuperMarkName);
-
+
// ... and find the copied method binding
MethodBinding codegenBinding = currentScope.getMethod(this.actualReceiverType, this.selector, extendedParameters, this);
-
+
if (codegenBinding.problemId() == ProblemReasons.NotFound) {
// tsuper.m() may in fact refer to tsuper.super.m().
// try to find the method as super.tsuper() instead:
@@ -197,7 +197,7 @@ public class TSuperMessageSend extends MessageSend {
this.receiver.constant = Constant.NotAConstant;
this.actualReceiverType = superRole;
}
-
+
MethodBinding tsuperMethod = this.binding;
this.binding = codegenBinding;
try {
@@ -205,7 +205,7 @@ public class TSuperMessageSend extends MessageSend {
} finally {
this.binding = tsuperMethod;
}
-
+
if (valueRequired && this.binding.isCallin()) {
if (this.resolvedType != null && this.resolvedType.isValidBinding()) {
if (this.resolvedType.isBaseType()) {
@@ -223,7 +223,7 @@ public class TSuperMessageSend extends MessageSend {
@SuppressWarnings("hiding")
@Override
- public void generateArguments(MethodBinding binding, Expression[] arguments, BlockScope currentScope, CodeStream codeStream)
+ public void generateArguments(MethodBinding binding, Expression[] arguments, BlockScope currentScope, CodeStream codeStream)
{
super.generateArguments(binding, arguments, currentScope, codeStream);
// check if we need to pass the marker arg, too:
@@ -267,7 +267,7 @@ public class TSuperMessageSend extends MessageSend {
if (this.binding != null && this.binding.isCallin())
// restore return type which has been generalized to 'Object':
return this.resolvedType= MethodModel.getReturnType(this.binding);
-
+
return answer;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TypeAnchorReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TypeAnchorReference.java
index 1066618e4..aaef33a23 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TypeAnchorReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TypeAnchorReference.java
@@ -137,13 +137,13 @@ public class TypeAnchorReference extends TypeReference implements InvocationSite
} else if (reference instanceof QualifiedBaseReference) {
QualifiedBaseReference baseRef = (QualifiedBaseReference) reference;
char[][] tokens = baseRef.qualification.getTypeName();
- int len = tokens.length;
+ int len = tokens.length;
System.arraycopy(tokens, 0, result=new char[len+1][], 0, len);
result[len] = IOTConstants.BASE;
} else if (reference instanceof QualifiedThisReference) {
QualifiedThisReference thisRef = (QualifiedThisReference) reference;
char[][] tokens = thisRef.qualification.getTypeName();
- int len = tokens.length;
+ int len = tokens.length;
System.arraycopy(tokens, 0, result=new char[len+1][], 0, len);
result[len] = "this".toCharArray(); //$NON-NLS-1$
} else {
@@ -221,12 +221,12 @@ public class TypeAnchorReference extends TypeReference implements InvocationSite
this.resolvedType = result.getResolvedType();
return result;
}
-
+
ITeamAnchor resolveAnchor(Scope scope, Reference reference) {
ITeamAnchor prefix = null;
ITeamAnchor currentAnchor = null;
char[] currentToken = null; // for lookup and creation of problem binding
-
+
// be careful not to trigger fields() which may be where we are called from!
if (reference instanceof SingleNameReference) {
SingleNameReference singleAnchor = (SingleNameReference)reference;
@@ -243,20 +243,20 @@ public class TypeAnchorReference extends TypeReference implements InvocationSite
prefix = resolveAnchor(scope, (Reference)prefixExpr);
currentToken = fieldRef.token;
// fieldRef holds on to problem binding:
- fieldRef.binding = TypeAnalyzer.findField(((ReferenceBinding)prefix.getResolvedType()).getRealClass(), currentToken, false/*static*/, true/*outer*/);
+ fieldRef.binding = TypeAnalyzer.findField(((ReferenceBinding)prefix.getResolvedType()).getRealClass(), currentToken, false/*static*/, true/*outer*/);
currentAnchor = checkAnchor(scope, reference, currentToken, reference.sourceStart, reference.sourceEnd, fieldRef.binding);
} else if (reference instanceof QualifiedBaseReference) {
QualifiedBaseReference baseRef = (QualifiedBaseReference) reference;
if (scope instanceof BlockScope)
baseRef.resolveType((BlockScope)scope);
- else
+ else
baseRef.resolveType((ClassScope)scope);
currentAnchor = baseRef.baseField;
} else if (reference instanceof QualifiedThisReference) {
QualifiedThisReference thisRef = (QualifiedThisReference) reference;
if (scope instanceof BlockScope)
thisRef.resolveType((BlockScope)scope);
- else
+ else
thisRef.resolveType((ClassScope)scope);
if (thisRef.resolvedType.isTeam())
currentAnchor = ((ReferenceBinding)thisRef.resolvedType).getTeamModel().getTThis();
@@ -310,7 +310,7 @@ public class TypeAnchorReference extends TypeReference implements InvocationSite
if (fieldType instanceof SourceTypeBinding) {
SourceTypeBinding stb = (SourceTypeBinding)fieldType;
if ((stb.scope != null)
- && (stb.scope.compilationUnitScope() != scope.compilationUnitScope())
+ && (stb.scope.compilationUnitScope() != scope.compilationUnitScope())
&& (stb.tagBits & (TagBits.BeginHierarchyCheck|TagBits.EndHierarchyCheck)) == (TagBits.BeginHierarchyCheck|TagBits.EndHierarchyCheck)
&& StateHelper.isReadyToProcess(stb, ITranslationStates.STATE_LENV_DONE_FIELDS_AND_METHODS))
Dependencies.ensureBindingState(stb, ITranslationStates.STATE_LENV_DONE_FIELDS_AND_METHODS);
@@ -344,7 +344,7 @@ public class TypeAnchorReference extends TypeReference implements InvocationSite
} else if (currentAnchor.isValidBinding()) {
if (prefix != null && !(prefix instanceof TThisBinding))
currentAnchor = currentAnchor.setPathPrefix(prefix);
-
+
// fill anchor with resolved data:
reference.resolvedType = currentAnchor.getResolvedType();
reference.bits &= ~RestrictiveFlagMASK; // clear bits
@@ -458,7 +458,7 @@ public class TypeAnchorReference extends TypeReference implements InvocationSite
else if (reference instanceof FieldReference)
scope.problemReporter().invalidField((FieldReference)reference, ((FieldReference)reference).actualReceiverType);
return null;
- }
+ }
if (!anchorBinding.hasValidReferenceType()) {
scope.problemReporter().typeAnchorReferenceNotAnObjectRef(start, end);
return null;
@@ -487,7 +487,7 @@ public class TypeAnchorReference extends TypeReference implements InvocationSite
{
TypeBinding type = typeReference.resolvedType;
ITeamAnchor anchorBinding = null;
- if (this.anchor instanceof NameReference)
+ if (this.anchor instanceof NameReference)
anchorBinding = (ITeamAnchor)((NameReference)this.anchor).binding;
else if (this.anchor instanceof FieldReference)
anchorBinding = ((FieldReference)this.anchor).binding;
@@ -552,7 +552,7 @@ public class TypeAnchorReference extends TypeReference implements InvocationSite
return this.anchor.printExpression(indent, output);
}
- /**
+ /**
* Fetch a bitset marking all those arguments that are referenced as a type anchor from an argument or type parameter.
*/
public static boolean[] fetchAnchorFlags(Argument[] arguments, TypeParameter[] typeParameters) {
@@ -566,7 +566,7 @@ public class TypeAnchorReference extends TypeReference implements InvocationSite
}
if (typeParameters != null)
for (int i = 0; i < typeParameters.length; i++)
- if (typeParameters[i].type instanceof TypeAnchorReference)
+ if (typeParameters[i].type instanceof TypeAnchorReference)
checkTypeAnchorXRef((TypeAnchorReference)typeParameters[i].type, arguments, -1, flags);
return flags;
}
@@ -580,7 +580,7 @@ public class TypeAnchorReference extends TypeReference implements InvocationSite
break;
}
}
- }
+ }
}
// === implement InvocationSite: ===
@@ -617,7 +617,7 @@ public class TypeAnchorReference extends TypeReference implements InvocationSite
public void setFieldIndex(int depth) {
// ignored
}
-
+
@Override
public InferenceContext18 freshInferenceContext(Scope scope) {
throw new InternalCompilerError("Method not applicable"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/WithinStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/WithinStatement.java
index d2f1dd674..ac4fef2a1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/WithinStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/WithinStatement.java
@@ -58,13 +58,13 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.AstGenerator;
*/
public class WithinStatement extends Block implements IOTConstants
{
- /**
+ /**
* This class marks the single name reference refering to the synthetic local variable.
* As such it is actually a substitute for the team expression.
- * Used for error reporting (null checks).
+ * Used for error reporting (null checks).
*/
- public class SubstitutedReference extends SingleNameReference
- {
+ public class SubstitutedReference extends SingleNameReference
+ {
public SubstitutedReference(char[] teamVarName, long pos) {
super(teamVarName, pos);
}
@@ -217,7 +217,7 @@ public class WithinStatement extends Block implements IOTConstants
}
@Override
- public void traverse(ASTVisitor visitor, BlockScope blockScope)
+ public void traverse(ASTVisitor visitor, BlockScope blockScope)
{
if (visitor.visit(this, blockScope)) {
this.getTeamExpression().traverse(visitor, blockScope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/AnchorUsageRanksAttribute.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/AnchorUsageRanksAttribute.java
index 818decc59..3772334f5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/AnchorUsageRanksAttribute.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/AnchorUsageRanksAttribute.java
@@ -33,15 +33,15 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.model.FieldModel;
* This attribute stores interdependencies between value and type parameters.
* Consider, e.g., a generic class
* <pre>class MyClass&lt;MyTeam t, U, R1&lt;@t&gt;, R2&lt;@t&gt;&gt;</pre>
- *
+ *
* From this a final field <code>t</code> is generated to which this attribute
* is attached. The attribute value is a list of ranks (zero-based), here <code>1,2</code>
* referring to the second and third type parameter (not counting the value
* parameter <code>t</code>), saying that those parameters <code>R1</code>
* and <code>R2</code> are anchored to the field <code>t</code>.
- *
+ *
* Format of this attribute: list of unsigned short
- *
+ *
* @author stephan
* @since 1.3.2
*/
@@ -49,13 +49,13 @@ public class AnchorUsageRanksAttribute extends ListValueAttribute {
FieldBinding field;
List<Integer> ranks;
-
+
/** Create a new instance during compiling the generic type. */
public AnchorUsageRanksAttribute(FieldBinding field) {
super(IOTConstants.ANCHOR_USAGE_RANKS, 0/*still unknown*/, 2);
this.field = field;
}
-
+
/** Create a new attribute from bytecode. */
public AnchorUsageRanksAttribute(FieldInfo info, int readOffset, int structOffset, int[] constantPoolOffsets) {
super(ANCHOR_USAGE_RANKS, 0, 2);
@@ -80,7 +80,7 @@ public class AnchorUsageRanksAttribute extends ListValueAttribute {
void writeElementValue(int i) {
writeUnsignedShort(this.ranks.get(i));
}
-
+
@Override
void read(int i) {
if (i == 0)
@@ -92,7 +92,7 @@ public class AnchorUsageRanksAttribute extends ListValueAttribute {
public void evaluate(Binding binding, LookupEnvironment environment, char[][][] missingTypeNames) {
// nop / not used
}
-
+
@Override
public boolean evaluate(FieldBinding binding) {
binding.modifiers |= ExtraCompilerModifiers.AccValueParam;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/BytecodeTransformer.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/BytecodeTransformer.java
index 1e41ba7a0..4ea8214ed 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/BytecodeTransformer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/BytecodeTransformer.java
@@ -110,7 +110,7 @@ public class BytecodeTransformer
if (dstType.isTeam()) {
ReferenceBinding orgObjectteamsTeam = scope.getOrgObjectteamsTeam();
if ( !TypeAnalyzer.isOrgObjectteamsTeam(dstType)
- && !dstType.superclass.isTeam())
+ && !dstType.superclass.isTeam())
{
TeamMethodGenerator tmg = scope.environment().getTeamMethodGenerator();
if (tmg.requestBytes()) { // if o.o.Team is converted we don't have the bytecode - and shouldn't need it
@@ -164,7 +164,7 @@ public class BytecodeTransformer
dstMethod.binding.bytecodeMissing= true;
return;
}
-
+
if (CharOperation.equals(CalloutImplementorDyn.OT_ACCESS, dstMethod.selector)
||CharOperation.equals(CalloutImplementorDyn.OT_ACCESS_STATIC, dstMethod.selector))
return;
@@ -232,7 +232,7 @@ public class BytecodeTransformer
// keep this offset for updating the stored value after adjustTail():
int copyInhSrcLineOffsetOffset;
// first phase of adjustment (method prefix and attributes except code):
- ConstantPoolSimpleConverter conv = constantPoolOffsets == null
+ ConstantPoolSimpleConverter conv = constantPoolOffsets == null
? ConstantPoolSimpleConverter.create(srcRole, srcMethodBinding, methodCode, classFile)
: new ConstantPoolSimpleConverter(srcConstantPool, constantPoolOffsets, offset, methodCode, classFile);
@@ -305,7 +305,7 @@ public class BytecodeTransformer
dstMethod.maybeRecordByteCode(classFile, newMethodOffset);
}
-
+
/**
* @param srcConstantPool
* @param offset start of this method (within srcConstantPool)
@@ -440,7 +440,7 @@ public class BytecodeTransformer
{
if (isAddingMarkerArg) {
OTByteCodes.setInt(dest, offset+destOff-4, attrLen+2); // grow attr by 2
-
+
int paramCount = OTByteCodes.getUnsignedByte(src, srcOffset+offset);
dest[offset+destOff] = (byte)(paramCount+1); // grow paramCount by 1
offset++;
@@ -471,7 +471,7 @@ public class BytecodeTransformer
conv.updateName(offset); // annotation name
offset += 2;
int numMembers = OTByteCodes.getWord(src, srcOffset+offset);
- offset += 2;
+ offset += 2;
if (numMembers > 0)
for (int k=0; k<numMembers; k++) {
conv.updateName(offset);
@@ -485,8 +485,8 @@ public class BytecodeTransformer
* SH: inspired by AnnotationInfo.scanElementValue(int);
* @return the next offset to read.
*/
- private int adjustAnnotationElementValue(ConstantPoolSimpleConverter conv, byte[] src, int srcOffset, int offset)
- throws IllegalArgumentException
+ private int adjustAnnotationElementValue(ConstantPoolSimpleConverter conv, byte[] src, int srcOffset, int offset)
+ throws IllegalArgumentException
{
int currentOffset = offset;
int tag = OTByteCodes.getUnsignedByte(src, srcOffset+currentOffset);
@@ -554,7 +554,7 @@ public class BytecodeTransformer
* @param dstClassFile This is the destination Classfile wich contains the later flushed ConstantPool
* @param mModel the destination method
* @param codeToAdjust this is the duplicated code-part of the code_attribute (see getCodeByteCode)
- * @param codeAttributeOffset attribute offset within codeToAdjust
+ * @param codeAttributeOffset attribute offset within codeToAdjust
* @param codeLength length of codeToAdjust
* @param isCtorAddingMarkArg are we copying into a tsuper ctor with additional marger arg?
*/
@@ -702,9 +702,9 @@ public class BytecodeTransformer
ConstantPoolObject src_cpo = it.next();
ConstantPoolObject dst_cpo = src_cpo.isClass()
? new ConstantPoolObject(
- ClassFileConstants.ClassTag,
+ ClassFileConstants.ClassTag,
ConstantPoolObjectMapper.mapClass(srcTeamBinding, src_cpo.getClassObject(), dstType))
- : src_cpo;
+ : src_cpo;
this._writer.writeConstantPoolObject(dst_cpo);
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/CallinMethodMappingsAttribute.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/CallinMethodMappingsAttribute.java
index a9cf5f1db..68ba7b9a6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/CallinMethodMappingsAttribute.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/CallinMethodMappingsAttribute.java
@@ -336,7 +336,7 @@ public class CallinMethodMappingsAttribute extends AbstractAttribute {
*
* @param reader this reader holds the bytes to read
* @param readOffset offset where to start reading
- * @param constantPoolOffsets constant pool offset to be used during reading
+ * @param constantPoolOffsets constant pool offset to be used during reading
*/
public CallinMethodMappingsAttribute(ClassFileStruct reader, int readOffset, int[] constantPoolOffsets) {
super(IOTConstants.CALLIN_METHOD_MAPPINGS);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/CalloutMappingsAttribute.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/CalloutMappingsAttribute.java
index 2bad97ef7..85cdfe395 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/CalloutMappingsAttribute.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/CalloutMappingsAttribute.java
@@ -258,13 +258,13 @@ public class CalloutMappingsAttribute extends ListValueAttribute {
private boolean methodMatchesSignature(MethodBinding methodBinding, char[] signature) {
if (CharOperation.equals(methodBinding.signature(), signature))
return true;
-
+
char[][] signatureTypes = scanSignature(signature);
-
+
TypeBinding type = methodBinding.returnType;
if (!typeMatchesSignature(type, signatureTypes[0]))
return false;
-
+
char[][] types = CharOperation.subarray(signatureTypes, 1, -1);
if (types.length != methodBinding.parameters.length)
return false;
@@ -285,7 +285,7 @@ public class CalloutMappingsAttribute extends ListValueAttribute {
}
return CharOperation.equals(bindingType, signatureType);
}
-
+
private char[] getSignatureSimpleName(char[] signatureType) {
if (signatureType[signatureType.length-1]!=';')
return signatureType;
@@ -311,7 +311,7 @@ public class CalloutMappingsAttribute extends ListValueAttribute {
// Ignore synthetic argument for member types or enum types.
int startIndex = 0;
// NOTE: no callout to ctor, thus no check 'isConstructor()'
-
+
int size = numOfParams - startIndex;
char[][] result= new char[size+1][]; // [0] is returnType
if (size > 0) {
@@ -331,7 +331,7 @@ public class CalloutMappingsAttribute extends ListValueAttribute {
result[0] = CharOperation.subarray(methodDescriptor, index + 1, -1);
return result;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.objectteams.otdt.internal.core.compiler.bytecode.ListValueAttribute#toString(int)
*/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolObjectReader.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolObjectReader.java
index 680f72805..f34856bb4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolObjectReader.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolObjectReader.java
@@ -413,9 +413,9 @@ public class ConstantPoolObjectReader extends ClassFileStruct implements ClassFi
throw new InternalCompilerError("synthetic method "+new String(name)+" has unexpected signature"); //$NON-NLS-1$ //$NON-NLS-2$
}
if ( isSynthMethodName(name)
- || SyntheticBaseCallSurrogate.isBaseCallSurrogateName(name))
+ || SyntheticBaseCallSurrogate.isBaseCallSurrogateName(name))
{
- // for normal access methods class_rb should not be a BinaryTypeBinding,
+ // for normal access methods class_rb should not be a BinaryTypeBinding,
// because in that case the above loop should have found the method
// (access$n are stored like normal methods).
if (class_rb.isBinaryBinding()) {
@@ -489,7 +489,7 @@ public class ConstantPoolObjectReader extends ClassFileStruct implements ClassFi
}
boolean isSynthMethodName(char[] name) {
- return
+ return
CharOperation.prefixEquals(TypeConstants.SYNTHETIC_ACCESS_METHOD_PREFIX, name)
|| CharOperation.prefixEquals(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, name)
|| CharOperation.equals(CalloutImplementorDyn.OT_ACCESS, name)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolSimpleConverter.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolSimpleConverter.java
index 23e8fbe06..ce90d2af1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolSimpleConverter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolSimpleConverter.java
@@ -74,7 +74,7 @@ public class ConstantPoolSimpleConverter extends ClassFileStruct {
this.dest = destBytes;
this.dstClassFile = dstClassFile;
}
-
+
public ConstantPoolSimpleConverter(byte[] bytes, int[] constantPoolOffsets, int methodOffset, byte[] destBytes, ClassFile dstClassFile) {
super(bytes, constantPoolOffsets, 0);
this.srcOffset = methodOffset;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ListValueAttribute.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ListValueAttribute.java
index 9ca5f4ae6..5f666f935 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ListValueAttribute.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ListValueAttribute.java
@@ -70,7 +70,7 @@ public abstract class ListValueAttribute
// this code is mainly stolen from ClassFile.addAttributes().
super.write(classFile);
- int attributeSize = getAttributeSize();
+ int attributeSize = getAttributeSize();
if (this._contentsOffset + 6 + attributeSize >= this._contents.length) {
this._contents = classFile.getResizedContents(6 + attributeSize);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTByteCodes.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTByteCodes.java
index f4581ab13..066431786 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTByteCodes.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTByteCodes.java
@@ -19,14 +19,14 @@
* Contributors:
* Fraunhofer FIRST - Initial API and implementation
* Technical University Berlin - Initial API and implementation
- *
+ *
* This file is a modified version of class org.apache.bcel.Constants
- * originating from the Apache BCEL project which was provided under the
+ * originating from the Apache BCEL project which was provided under the
* Apache 2.0 license. Original Copyright from BCEL:
- *
+ *
* Copyright 2000-2004 The Apache Software Foundation
*
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@@ -36,7 +36,7 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License.
**********************************************************************/
package org.eclipse.objectteams.otdt.internal.core.compiler.bytecode;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTDynCallinBindingsAttribute.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTDynCallinBindingsAttribute.java
index c968d4b8a..6e1c324ab 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTDynCallinBindingsAttribute.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTDynCallinBindingsAttribute.java
@@ -1,17 +1,17 @@
-/**
+/**
* This file is part of "Object Teams Development Tooling"-Software
- *
+ *
* Copyright 2009, 2019 Stephan Herrmann
- *
+ *
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Please visit http://www.eclipse.org/objectteams for updates and contact.
- *
+ *
* Contributors: Stephan Herrmann - Initial API and implementation
**********************************************************************/
package org.eclipse.objectteams.otdt.internal.core.compiler.bytecode;
@@ -45,7 +45,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.model.TeamModel;
/**
* Encodes all callin bindings of a team class.
* Structure:
- * <pre>
+ * <pre>
* CallinBindings_attribute {
* u2 attribute_name_index;
* u4 attribute_length;
@@ -60,7 +60,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.model.TeamModel;
* u2 base_class_index_table; // internal name: java/util/Map$Entry
* u2 file_name_index_table; // for SMAP
* u2 line_number; // for SMAP
- * u2 line_offset; // for SMAP
+ * u2 line_offset; // for SMAP
* u2 base_methods_count;
* {
* u2 base_method_name_index_table;
@@ -72,13 +72,13 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.model.TeamModel;
* } bindings[bindings_count];
* }
* </pre>
- *
+ *
* This attribute is inherited / copied / merged into all sub and tsub teams, as to advise
* the OTDRE to generate dispatch code into the team.
- *
+ *
* No team declares callinIds that would conflict with any of its supers/tsupers
* (see TeamModel.nextCallinID and the methods operating on it).
- *
+ *
* @author stephan
* @since 1.3.0M3
*/
@@ -92,14 +92,14 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
public static final short COVARIANT_BASE_RETURN = 8;
public static final short BASE_SUPER_CALL = 16;
-
+
private class Mapping {
char[] roleClassName, declaringRoleName, callinName, roleSelector, roleSignature, callinModifier, baseClassName, fileName;
int flags; // STATIC_ROLE_METHOD, INHERITED, COVARIANT_BASE_RETURN
int lineNumber, lineOffset;
BaseMethod[] baseMethods;
MethodBinding roleMethod;
- Mapping(char[] roleClassName, char[] declaringRoleName, char[] callinName, char[] roleSelector, char[] roleSignature, char[] callinModifer, int flags, char[] baseClassName, int baseMethodCount, MethodBinding roleMethod)
+ Mapping(char[] roleClassName, char[] declaringRoleName, char[] callinName, char[] roleSelector, char[] roleSignature, char[] callinModifer, int flags, char[] baseClassName, int baseMethodCount, MethodBinding roleMethod)
{
this.roleClassName = roleClassName;
this.declaringRoleName = declaringRoleName;
@@ -137,9 +137,9 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
(short)Util.getLineNumber(decl.declarationSourceEnd, lineEnds, 0, lineEnds.length-1);
this.lineOffset = (short)(lineEnd - this.lineNumber);
}
-
- /**
+
+ /**
* Compute the name of the file containing the given callin mapping.
* Do consider packages but no projects or source folders.
*/
@@ -189,7 +189,7 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
return buf.toString();
}
}
-
+
/* Encodes the binding to one individual base method. */
private class BaseMethod {
static final int CALLIN = 1;
@@ -208,23 +208,23 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
this.translationFlags = translationFlags;
}
}
-
+
private List<Mapping> mappings;
private TeamModel theTeam;
-
+
OTDynCallinBindingsAttribute(TeamModel theTeam) {
super(ATTRIBUTE_NAME, -1/*size pending*/, -1/*variable entry size*/);
this.theTeam = theTeam;
this.theTeam.addAttribute(this);
this.mappings = new ArrayList<Mapping>();
}
-
+
private OTDynCallinBindingsAttribute(TeamModel theTeam, List<Mapping> mappings) {
super(ATTRIBUTE_NAME, mappings.size(), -1/*variable entry size*/);
this.theTeam = theTeam;
this.mappings = mappings;
}
-
+
/**
* Read the attribute from byte code.
*
@@ -242,7 +242,7 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
for (int i=0; i<this._count; i++)
this.mappings.add(readMapping());
}
-
+
@Override
protected int getAttributeSize() {
int s = 2; // entry count
@@ -252,7 +252,7 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
}
void addMappings(char[] baseClassName, CallinMappingDeclaration callinDecl) {
MethodSpec roleSpec = callinDecl.roleMethodSpec;
- int flags = 0;
+ int flags = 0;
if (callinDecl.roleMethodSpec.resolvedMethod.isStatic())
flags |= STATIC_ROLE_METHOD;
if (callinDecl.hasCovariantReturn())
@@ -260,7 +260,7 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
MethodSpec[] baseMethodSpecs = callinDecl.getBaseMethodSpecs();
Mapping mapping = new Mapping(callinDecl.scope.enclosingSourceType().sourceName(), // indeed: simple name
callinDecl.declaringRoleName(), callinDecl.name, roleSpec.selector, roleSpec.signature(WeavingScheme.OTDRE),
- callinDecl.getCallinModifier(), flags,
+ callinDecl.getCallinModifier(), flags,
baseClassName, baseMethodSpecs.length,
roleSpec.resolvedMethod);
for (int i=0; i<baseMethodSpecs.length; i++) {
@@ -276,7 +276,7 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
baseFlags |= BaseMethod.PRIVATE;
if (baseSpec.isPublic())
baseFlags |= BaseMethod.PUBLIC;
- mapping.addBaseMethod(i, baseSpec.codegenSeletor(), baseSpec.signature(WeavingScheme.OTDRE),
+ mapping.addBaseMethod(i, baseSpec.codegenSeletor(), baseSpec.signature(WeavingScheme.OTDRE),
baseSpec.resolvedMethod.declaringClass.constantPoolName(),
baseSpec.getCallinId(this.theTeam, callinDecl.explicitName()),
baseFlags, baseSpec.getTranslationFlags());
@@ -285,11 +285,11 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
this.mappings.add(mapping);
this._count = this.mappings.size();
}
-
+
public static void createOrMerge(TeamModel theTeam, char[] baseClassName, CallinMappingDeclaration[] mappingDecls) {
AbstractAttribute existingAttr = theTeam.getAttribute(ATTRIBUTE_NAME);
- OTDynCallinBindingsAttribute theAttr = existingAttr != null
- ? (OTDynCallinBindingsAttribute)existingAttr
+ OTDynCallinBindingsAttribute theAttr = existingAttr != null
+ ? (OTDynCallinBindingsAttribute)existingAttr
: new OTDynCallinBindingsAttribute(theTeam);
for (CallinMappingDeclaration callinDecl : mappingDecls)
theAttr.addMappings(baseClassName, callinDecl);
@@ -324,7 +324,7 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
buf.append('\n');
return buf.toString();
}
-
+
@Override
void writeElementValue(int i) {
Mapping mapping = this.mappings.get(i);
@@ -353,7 +353,7 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
writeUnsignedShort(baseMethods[j].translationFlags);
}
}
-
+
Mapping readMapping() {
char[] roleClassName = consumeName();
char[] callinName = consumeName();
@@ -370,7 +370,7 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
char[] declaringRoleName = CharOperation.subarray(callinName, 0, pos);
callinName = CharOperation.subarray(callinName, pos+1, -1);
- Mapping result = new Mapping(roleClassName, declaringRoleName, callinName, roleSelector, roleSignature, callinModifer, flags, baseClassName, baseMethodCount, null);
+ Mapping result = new Mapping(roleClassName, declaringRoleName, callinName, roleSelector, roleSignature, callinModifer, flags, baseClassName, baseMethodCount, null);
result.setSMAPInfo(fileName, lineNumber, lineOffset);
for (int i=0; i<baseMethodCount; i++) {
char[] baseMethodName = consumeName();
@@ -383,7 +383,7 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
}
return result;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.objectteams.otdt.internal.core.compiler.bytecode.AbstractAttribute#evaluate(org.eclipse.jdt.internal.compiler.lookup.Binding, org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment)
*/
@@ -393,7 +393,7 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
if (((ReferenceBinding)binding).isTeam())
((ReferenceBinding)binding).getTeamModel().addAttribute(this);
}
-
+
// Evaluate CallinMethodMappingAttribute late, because we need our methods to be in place.
@Override
public void evaluateLateAttribute(ReferenceBinding teamBinding, int state)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTSpecialAccessAttribute.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTSpecialAccessAttribute.java
index 61222161c..8c10e3dbf 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTSpecialAccessAttribute.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTSpecialAccessAttribute.java
@@ -68,7 +68,7 @@ public class OTSpecialAccessAttribute extends AbstractAttribute {
* This form of ids is then stored in the attribute.
* Stored ids are consumed and translated by OTREDyn to obtain those global IDs that uniquely identify the
* base feature within a generated _OT$access or _OT$accessStatic method.
- *
+ *
* AccessIds are generated during resolve and stored in these AST nodes:
* - MethodSpec / FieldAccessSpec
* - From here it is directly picked up by CallinImplementorDyn to insert
@@ -322,7 +322,7 @@ public class OTSpecialAccessAttribute extends AbstractAttribute {
int M_SIZE = this._weavingScheme == WeavingScheme.OTDRE ? 8 : 6;
int F_SIZE = this._weavingScheme == WeavingScheme.OTDRE ? 9 : 7;
attributeSize += this._decapsulatedMethods.size() * (1+M_SIZE); // 1 byte kind, 3 names (+1 short for otredyn)
- attributeSize += this._calloutToFields.size() * (1+F_SIZE); // 1 byte kind, 1 byte flags, 3 names (+1 byte for otredyn)
+ attributeSize += this._calloutToFields.size() * (1+F_SIZE); // 1 byte kind, 1 byte flags, 3 names (+1 byte for otredyn)
attributeSize += this._superMethods.size() * 9; // 1 byte kind, 4 names
attributeSize += this._adaptedBaseclasses.size() * 3; // 1 name + 1 byte flag
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/StaticReplaceBindingsAttribute.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/StaticReplaceBindingsAttribute.java
index 029f99c99..014e16ff6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/StaticReplaceBindingsAttribute.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/StaticReplaceBindingsAttribute.java
@@ -237,7 +237,7 @@ public class StaticReplaceBindingsAttribute extends AbstractAttribute {
*
* @param reader this reader holds the bytes to read
* @param readOffset offset where to start reading
- * @param constantPoolOffsets constant pool offset to be used during reading
+ * @param constantPoolOffsets constant pool offset to be used during reading
*/
public StaticReplaceBindingsAttribute(ClassFileStruct reader, int readOffset, int[] constantPoolOffsets) {
super(IOTConstants.STATIC_REPLACE_BINDINGS);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/WordValueAttribute.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/WordValueAttribute.java
index 2a535d814..d4c5c9f83 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/WordValueAttribute.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/WordValueAttribute.java
@@ -94,7 +94,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.TypeAnalyzer;
* Only used by the compiler:
* - CALLIN_FLAG_DEFINITELY_MISSING_BASECALL: For base call flow analysis including super calls
* - CALLIN_FLAG_POTENTIALLY_MISSING_BASECALL: For base call flow analysis including super calls
- * - CALLIN_FLAG_BASE_SUPER_CALL: Is the base call targeting the base's super?
+ * - CALLIN_FLAG_BASE_SUPER_CALL: Is the base call targeting the base's super?
* OTRE part is handled via OTSpecialAccess attribute (kind SUPER_METHOD_ACCESS).
* - bits 9-12 (CALLIN_RETURN_MASK): Encoding of original non-reference return type.
*
@@ -239,7 +239,7 @@ public class WordValueAttribute
switch (weavingScheme) {
case OTRE:
break; // is the default
- case OTDRE:
+ case OTDRE:
this._value |= OTDRE_FLAG;
break;
}
@@ -359,11 +359,11 @@ public class WordValueAttribute
&& !environment.globalOptions.isPureJava)
{
switch (environment.globalOptions.weavingScheme) {
- case OTRE:
+ case OTRE:
if ((this._value & OTDRE_FLAG) != 0)
environment.problemReporter.incompatibleWeavingScheme(type, WeavingScheme.OTDRE);
break;
- case OTDRE:
+ case OTDRE:
if ((this._value & OTDRE_FLAG) == 0)
environment.problemReporter.incompatibleWeavingScheme(type, WeavingScheme.OTRE);
break;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/Config.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/Config.java
index 96f853121..a5beedb1b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/Config.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/Config.java
@@ -55,7 +55,7 @@ import org.eclipse.objectteams.otdt.core.exceptions.InternalCompilerError;
* We don't use ThreadLocal, since we do cleanup manually using release().
*/
public class Config implements ConfigHelper.IConfig, Comparable<Config> {
-
+
@SuppressWarnings("serial")
public static class NotConfiguredException extends RuntimeException {
public NotConfiguredException(String string) {
@@ -63,7 +63,7 @@ public class Config implements ConfigHelper.IConfig, Comparable<Config> {
}
public void logWarning(String msg) {
try {
- JavaCore.getJavaCore().getLog().log(new Status(IStatus.WARNING, JavaCore.PLUGIN_ID, msg, this));
+ JavaCore.getJavaCore().getLog().log(new Status(IStatus.WARNING, JavaCore.PLUGIN_ID, msg, this));
} catch (NoClassDefFoundError ncdfe) {
System.err.println("Warning: "+msg); //$NON-NLS-1$
this.printStackTrace(System.err);
@@ -293,7 +293,7 @@ public class Config implements ConfigHelper.IConfig, Comparable<Config> {
return false;
return config.client.get() == client;
}
-
+
static Config getOrCreateMatchingConfig(Object client, Parser parser, LookupEnvironment environment) {
Config config = safeGetConfig();
if (configMatchesRequest(config, client, parser, environment)) {
@@ -302,7 +302,7 @@ public class Config implements ConfigHelper.IConfig, Comparable<Config> {
return config;
}
boolean shouldCleanUp = false;
- criticalSection: synchronized (configsByClient) {
+ criticalSection: synchronized (configsByClient) {
if (parser == null || environment == null) {
config = configsByClient.get(client);
if (configMatchesRequest(config, client, parser, environment)) {
@@ -338,7 +338,7 @@ public class Config implements ConfigHelper.IConfig, Comparable<Config> {
System.out.println("Client "+key.getClass()); //$NON-NLS-1$
}
}
- synchronized (configsByClient) {
+ synchronized (configsByClient) {
Object[] keys = Collections.synchronizedMap(configsByClient).values().toArray();
Arrays.sort(keys);
int threshold = keys.length-LOWER_THRESHOLD;
@@ -398,7 +398,7 @@ public class Config implements ConfigHelper.IConfig, Comparable<Config> {
}
}
}
-
+
static boolean getVerifyMethods() {
return getConfig().verifyMethods;
}
@@ -439,10 +439,10 @@ public class Config implements ConfigHelper.IConfig, Comparable<Config> {
}
public static void setLoweringPossible(boolean val) {
- getConfig().loweringPossible = val;
+ getConfig().loweringPossible = val;
}
- /**
+ /**
* Has type checking detected that lowering is possible but not required due to expected type java.lang.Object?
* (see OTJLD 2.2(f))
*/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/Dependencies.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/Dependencies.java
index b8f9a2deb..773c5b20f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/Dependencies.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/Dependencies.java
@@ -282,7 +282,7 @@ public class Dependencies implements ITranslationStates {
boolean done = true;
if (StateHelper.unitHasState(unit, state))
return new Pair<Boolean,Success>(done, Success.OK);
-
+
if (environment == null) {
if (unit.scope != null && unit.scope.environment != null)
environment = unit.scope.environment;
@@ -384,7 +384,7 @@ public class Dependencies implements ITranslationStates {
e.logWarning("Processing CU "+String.valueOf(unit.getFileName())+" failed"); //$NON-NLS-1$ //$NON-NLS-2$
success = Success.Fail;
}
-
+
return new Pair<Boolean,Success>(done, success);
}
@@ -1537,7 +1537,7 @@ public class Dependencies implements ITranslationStates {
faultInRoleImports(roleType);
}
}
-
+
// if (teamDecl.isRole()) {
// ensureRoleState(teamDecl.getRoleModel(), STATE_TYPES_ADJUSTED);
// }
@@ -1560,7 +1560,7 @@ public class Dependencies implements ITranslationStates {
* For team:
* 1. copy synthetic access methods
* For role:
- * 0. Binary roles: bindings for methods to be created by the OTRE
+ * 0. Binary roles: bindings for methods to be created by the OTRE
* 1. creation methods
* 2. getTeam methods
* 3. add method from non-role superclasses to the interface part.
@@ -1663,13 +1663,13 @@ public class Dependencies implements ITranslationStates {
// 5. special case roles which need an abstract _OT$getBase() method:
StandardElementGenerator.createGetBaseForUnboundLowerable(clazz);
-
+
// 6. resolve method mappings and create callout methods:
MethodMappingResolver resolver = resolveCalloutMappings(clazz);
CalloutImplementor.transformCallouts(clazz);
if (resolver != null)
resolver.resolve(false/*doCallout*/); // callins last so all methods incl. callout are already in place
-
+
if (subRoleDecl != null)
checkMissingMethods(subRole, subRoleDecl);
@@ -1678,7 +1678,7 @@ public class Dependencies implements ITranslationStates {
}
// detail of STATE_METHODS_CREATED (binary case):
- private static void createCreators(RoleModel clazz, TypeDeclaration teamType, ReferenceBinding subRole, SourceTypeBinding subTeam)
+ private static void createCreators(RoleModel clazz, TypeDeclaration teamType, ReferenceBinding subRole, SourceTypeBinding subTeam)
{
boolean needMethodBodies = needMethodBodies(teamType);
MethodBinding[] methodBindings = subRole.methods();
@@ -1706,7 +1706,7 @@ public class Dependencies implements ITranslationStates {
}
// detail of STATE_METHODS_CREATED (AST case):
- private static void createCtorsAndCreators(RoleModel clazz, TypeDeclaration teamType, TypeDeclaration subRoleDecl, SourceTypeBinding subTeam)
+ private static void createCtorsAndCreators(RoleModel clazz, TypeDeclaration teamType, TypeDeclaration subRoleDecl, SourceTypeBinding subTeam)
{
// ensure we have all constructors from tsuper (incl. default ctor)
for (ReferenceBinding tsuperRole : clazz.getTSuperRoleBindings())
@@ -1720,8 +1720,8 @@ public class Dependencies implements ITranslationStates {
if (methodDeclarations != null)
for (int i=0; i<methodDeclarations.length; i++)
if (methodDeclarations[i].isConstructor() && !TSuperHelper.isTSuper(methodDeclarations[i].binding)) {
- hasConstructor = true;
- break;
+ hasConstructor = true;
+ break;
}
if (!hasConstructor) {
ConstructorDeclaration defCtor = subRoleDecl.createDefaultConstructor(needMethodBodies, false);
@@ -1756,7 +1756,7 @@ public class Dependencies implements ITranslationStates {
}
// detail of STATE_METHODS_CREATED:
- private static MethodMappingResolver resolveCalloutMappings(RoleModel role)
+ private static MethodMappingResolver resolveCalloutMappings(RoleModel role)
{
ReferenceBinding roleBinding = role.getBinding();
@@ -1765,7 +1765,7 @@ public class Dependencies implements ITranslationStates {
&& Config.getConfig().verifyMethods)
{
boolean hasBaseclassProblem = role.hasBaseclassProblem();
-
+
if (!hasBaseclassProblem) {
ReferenceBinding baseclass = role.getBaseTypeBinding();
if (baseclass != null && !role._playedByEnclosing)
@@ -1784,7 +1784,7 @@ public class Dependencies implements ITranslationStates {
// make sure tsuper wrappers are copied to current role:
CopyInheritance.copyGeneratedFeatures(role);
-
+
// actually need to proceed even with no base class, because
// method mappings without baseclass are reported within resolve() below:
MethodMappingResolver resolver = new MethodMappingResolver(role, !hasBaseclassProblem && needMethodBodies(roleDecl));
@@ -1802,12 +1802,12 @@ public class Dependencies implements ITranslationStates {
return;
ClassScope scope = roleDecl.scope;
boolean missing = false;
- MethodBinding equals = roleBinding.getExactMethod(TypeConstants.EQUALS,
+ MethodBinding equals = roleBinding.getExactMethod(TypeConstants.EQUALS,
new TypeBinding[] {scope.getJavaLangObject()}, scope.compilationUnitScope());
if (equals == null || !equals.isValidBinding() || TypeBinding.notEquals(equals.declaringClass, roleBinding)) {
missing = true;
} else {
- MethodBinding hashCode = roleBinding.getExactMethod(TypeConstants.HASHCODE,
+ MethodBinding hashCode = roleBinding.getExactMethod(TypeConstants.HASHCODE,
Binding.NO_PARAMETERS, scope.compilationUnitScope());
if (hashCode == null || !hashCode.isValidBinding() || TypeBinding.notEquals(hashCode.declaringClass, roleBinding))
missing = true;
@@ -1816,7 +1816,7 @@ public class Dependencies implements ITranslationStates {
scope.problemReporter().missingEqualsHashCodeWithInstantation(scope.referenceContext, instantiationPolicy);
}
}
- // copied abstract methods are not yet checked for callout inference (which is normally triggered from checkMethods())
+ // copied abstract methods are not yet checked for callout inference (which is normally triggered from checkMethods())
if (roleBinding.isClass() && roleDecl.methods != null) {
for (AbstractMethodDeclaration method : roleDecl.methods) {
if (((method.modifiers & ClassFileConstants.AccAbstract) != 0) && method.isCopied) {
@@ -1865,7 +1865,7 @@ public class Dependencies implements ITranslationStates {
}
CopyInheritance.weakenTeamMethodSignatures(teamDecl);
-
+
}
teamModel.setState(STATE_TYPES_ADJUSTED);
return true;
@@ -2001,7 +2001,7 @@ public class Dependencies implements ITranslationStates {
TypeDeclaration roleDecl = role.getAst();
WeavingScheme weavingScheme = role.getWeavingScheme(); // always trigger initialization
if (Config.getConfig().verifyMethods)
- {
+ {
if (roleDecl == null) {
TeamModel teamModel = role.getTeamModel();
if (teamModel != null && teamModel.getAst() != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/ITranslationStates.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/ITranslationStates.java
index 687761ce8..880e4aea1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/ITranslationStates.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/ITranslationStates.java
@@ -46,7 +46,7 @@ public interface ITranslationStates {
public static final int STATE_LENV_DONE_FIELDS_AND_METHODS= 7;//LookupEnvironment & Deps.
public static final int STATE_ROLES_LINKED = 8;//LookupEnvironment & RoleSplitter
public static final int STATE_METHODS_PARSED = 9;//Compiler
-// removed state:
+// removed state:
// public static final int STATE_ROLE_INIT_METHODS = 10;//RoleInitializationMethod
//
public static final int STATE_ROLE_HIERARCHY_ANALYZED = 10;//Lifting
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/StateHelper.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/StateHelper.java
index ab3cdd0e5..4133c155e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/StateHelper.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/control/StateHelper.java
@@ -236,20 +236,20 @@ public class StateHelper
return false;
return isReadyToProcess(type.model, state);
}
-
+
public static boolean isDefinitelyReadyToProcess(ReferenceBinding type, ReferenceBinding requestingSite, int state) {
-
+
if (!(type instanceof SourceTypeBinding))
return false; // most treatment not needed for binary types
SourceTypeBinding sourceType = (SourceTypeBinding) type;
-
- if (TypeBinding.equalsEquals(sourceType.outermostEnclosingType().erasure(), requestingSite.outermostEnclosingType().erasure())
+
+ if (TypeBinding.equalsEquals(sourceType.outermostEnclosingType().erasure(), requestingSite.outermostEnclosingType().erasure())
|| CharOperation.equals(type.getFileName(), requestingSite.getFileName()))
return false; // could infinitely recurse to the same inclosing of kind
-
+
if (!StateHelper.isReadyToProcess(sourceType, state))
return false;
-
+
try {
StateMemento unitState = sourceType.scope.compilationUnitScope().referenceContext.state;
if (unitState.isReadyToProcess(state))
@@ -257,7 +257,7 @@ public class StateHelper
} catch (NullPointerException npe) {
// be shy, if any enclosing thing was missing don't risk infinite recursion.
}
-
+
return false;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/ArrayLifting.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/ArrayLifting.java
index f4f7d2d4a..897819cd5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/ArrayLifting.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/ArrayLifting.java
@@ -39,7 +39,7 @@ public class ArrayLifting extends ArrayTranslations {
BlockScope scope,
Expression teamExpr,
Expression expression,
- TypeBinding providedType,
+ TypeBinding providedType,
TypeBinding requiredType)
{
this._teamExpr = teamExpr;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/ArrayLowering.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/ArrayLowering.java
index dd5b12f05..200844f00 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/ArrayLowering.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/ArrayLowering.java
@@ -41,7 +41,7 @@ public class ArrayLowering extends ArrayTranslations {
public ArrayLowering(Expression teamExpression) {
this._teamExpr = teamExpression;
}
-
+
/** API for Lowering. */
Expression lowerArray(
BlockScope scope,
@@ -59,7 +59,7 @@ public class ArrayLowering extends ArrayTranslations {
this._teamExpr.resolveType(scope);
return translateArray(scope, expression, providedType, requiredType, /*isLifting*/false, deferredResolve);
}
-
+
@Override
public MethodBinding ensureTransformMethod(BlockScope scope, Expression teamExpr, TypeBinding providedType, TypeBinding requiredType, boolean isLifting) {
TypeBinding providedLeaf = providedType.leafComponentType();
@@ -67,7 +67,7 @@ public class ArrayLowering extends ArrayTranslations {
TypeBinding requiredLeaf = requiredType.leafComponentType();
if (TypeBinding.notEquals(matchingBase, requiredLeaf) && matchingBase.isCompatibleWith(requiredLeaf, scope)) {
requiredType = scope.environment().createArrayType(matchingBase, requiredType.dimensions());
- }
+ }
return super.ensureTransformMethod(scope, teamExpr, providedType, requiredType, isLifting);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/DeclaredLifting.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/DeclaredLifting.java
index 901fd3cc3..f80df77df 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/DeclaredLifting.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/DeclaredLifting.java
@@ -232,7 +232,7 @@ public class DeclaredLifting implements IOTConstants {
// spare the details during completion - see comment regarding local.declaration.initialization inside
// InternalExtendedCompletionContext.searchVisibleVariablesAndMethods(Scope, ObjectVector, ObjectVector, ObjectVector, boolean)
- if (!Config.isUsingAssistParser()) {
+ if (!Config.isUsingAssistParser()) {
if ( roleRef.isValidBinding()
&& roleRef.isRole()
&& (roleRef.tagBits & TagBits.HierarchyHasProblems) == 0
@@ -252,7 +252,7 @@ public class DeclaredLifting implements IOTConstants {
baseType = (ReferenceBinding) baseScope.getType(ltr.baseTokens, ltr.baseTokens.length);
baseScope.originalScope = null;
}
- }
+ }
if (baseType == null || !baseType.isValidBinding())
// fall back to normal scope:
baseType = (ReferenceBinding)scope.getType(ltr.baseTokens, ltr.baseTokens.length);
@@ -413,19 +413,19 @@ public class DeclaredLifting implements IOTConstants {
return TypeBinding.equalsEquals(((MemberTypeBinding)type).enclosingType(), enclosingTeam.erasure());
return false;
}
-
+
/**
* A team constructor copied for declared lifting requests access to targetMethod.
* This can happen in two ways:
* - create a new copy of the target constructor
* - create a turning constructor that delegates to the target constructor using a real super call.
- * The strategy is chosen by searching the argument types for role types.
+ * The strategy is chosen by searching the argument types for role types.
*/
- public static MethodBinding createCopyOrTurningCtor(Scope scope,
+ public static MethodBinding createCopyOrTurningCtor(Scope scope,
MethodBinding targetConstructor,
TypeBinding[] argumentTypes,
boolean needsLifting,
- AstGenerator gen)
+ AstGenerator gen)
{
if (RoleTypeBinding.hasNonExternalizedRoleParameter(targetConstructor))
return copyTeamConstructorForDeclaredLifting(
@@ -491,7 +491,7 @@ public class DeclaredLifting implements IOTConstants {
ConstructorDeclaration srcCtor = (ConstructorDeclaration)src;
if (src.isCopied) {
if (src.model != null)
- selfcall = src.model.adjustedSelfcall;
+ selfcall = src.model.adjustedSelfcall;
} else if (srcCtor.constructorCall != null) {
Dependencies.ensureTeamState(superTeamCtor.declaringClass.getTeamModel(),
ITranslationStates.STATE_RESOLVED);
@@ -542,7 +542,7 @@ public class DeclaredLifting implements IOTConstants {
ClassFileConstants.AccPublic,
teamDecl.name,
AstConverter.createArgumentsFromParameters(providedWithMarker, gen));
-
+
// adjust argument-anchored types in this signature:
for (int i=0; i<superTeamCtor.parameters.length; i++)
if (RoleTypeBinding.isRoleWithExplicitAnchor(superTeamCtor.parameters[i])) {
@@ -573,7 +573,7 @@ public class DeclaredLifting implements IOTConstants {
* A constructor being copied contains a self call which might require
* transitive copying of more team constructors.
* @param scope scope of the location triggering this copy operation
- * @param selfcall
+ * @param selfcall
* @param providedArgs arguments provided to the selfcall
* @param needsLifting has the context required lifting of any args? pass this info down.
* @param gen
@@ -724,12 +724,12 @@ public class DeclaredLifting implements IOTConstants {
char[] dynamicLiftingSelector = dynamicLiftSelector(roleType);
if (teamDecl.binding.getMethods(dynamicLiftingSelector) != Binding.NO_METHODS)
return; // already present
-
+
if (roleType.isArrayType()) {
teamDecl.scope.problemReporter().missingImplementation(ref, "Generic lifting of array not yet implemented.");
} else if (roleType.isBaseType()) {
teamDecl.scope.problemReporter().primitiveTypeNotAllowedForLifting(teamDecl, ref, roleType);
- } else {
+ } else {
// reference type
AstGenerator gen = new AstGenerator(ref);
MethodDeclaration dynLiftMeth = gen.method(teamDecl.compilationResult(),
@@ -739,7 +739,7 @@ public class DeclaredLifting implements IOTConstants {
new Argument[] {
gen.argument(IOTConstants.BASE, gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT))
});
-
+
dynLiftMeth.statements = new Statement[] { gen.emptyStatement() }; // to be replaced below
int problemId = teamDecl.getTeamModel().canLiftingFail((ReferenceBinding) roleType.erasure());
if (problemId == 0) {
@@ -756,10 +756,10 @@ public class DeclaredLifting implements IOTConstants {
}
if (problemId != 0)
- AstEdit.addException(dynLiftMeth,
- gen.qualifiedTypeReference(IOTConstants.O_O_LIFTING_FAILED_EXCEPTION),
+ AstEdit.addException(dynLiftMeth,
+ gen.qualifiedTypeReference(IOTConstants.O_O_LIFTING_FAILED_EXCEPTION),
false/*resolve*/);
-
+
dynLiftMeth.hasParsedStatements = true;
AstEdit.addMethod(teamDecl, dynLiftMeth);
dynLiftMeth.binding.returnType = ((ReferenceBinding)roleType).getRealType().erasure(); // force erased type after signature resolve
@@ -805,19 +805,19 @@ public class DeclaredLifting implements IOTConstants {
return ifStat;
}
- private static IfStatement genNewIf(BlockScope scope, AstGenerator gen, ReferenceBinding boundDescendant,
- LookupEnvironment environment)
+ private static IfStatement genNewIf(BlockScope scope, AstGenerator gen, ReferenceBinding boundDescendant,
+ LookupEnvironment environment)
{
TypeBinding boundBase = boundDescendant.baseclass();
if (RoleTypeBinding.isRoleWithExplicitAnchor(boundBase)) {
if (boundBase.isParameterizedType()) {
// tricky case: need to discard type parameters, but retain/recreate the role type wrapping:
RoleTypeBinding baseRole = (RoleTypeBinding)boundBase;
- boundBase = environment.createParameterizedType(baseRole._declaredRoleType,
+ boundBase = environment.createParameterizedType(baseRole._declaredRoleType,
null, // erase type parameters
baseRole._teamAnchor, // but retain anchor
-1, // valueParamPosition
- baseRole.enclosingType(),
+ baseRole.enclosingType(),
Binding.NO_ANNOTATIONS);
}
// only RTB but not parameterized: leave unchanged.
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lifting.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lifting.java
index a348d4d42..bf181ca39 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lifting.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lifting.java
@@ -118,12 +118,12 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.TypeAnalyzer;
public class Lifting extends SwitchOnBaseTypeGenerator
implements TypeIds, ClassFileConstants, ExtraCompilerModifiers
{
-
+
public static enum InstantiationPolicy { NEVER, ONDEMAND, SINGLETON, ALWAYS, ERROR;
public boolean isAlways() { return this == ALWAYS; }
public boolean isOndemand() { return this == ONDEMAND; }
}
-
+
private RoleModel _boundRootRoleModel = null;
private AstGenerator _gen = null;
private long _sourceLevel;
@@ -278,7 +278,7 @@ public class Lifting extends SwitchOnBaseTypeGenerator
}
);
gen.addNonNullAnnotation(arg, scope.environment());
-
+
RoleModel implicitSuperRole = roleModel.getImplicitSuperRole();
// default arg name is base.
@@ -493,13 +493,13 @@ public class Lifting extends SwitchOnBaseTypeGenerator
} else {
// here an (unnecessary) cast to j.l.Object prevents a warning re OTJLD 2.2(f):
roleExpression = gen.castExpression(
- roleExpression,
- gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT),
+ roleExpression,
+ gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT),
CastExpression.RAW);
}
statements[1] =
// OTDYN: Slightly different methods depending on the weaving strategy:
- boundRootRoleModel.getWeavingScheme() == WeavingScheme.OTDRE
+ boundRootRoleModel.getWeavingScheme() == WeavingScheme.OTDRE
? gen.messageSend(
gen.castExpression(
gen.singleNameReference(_OT_BASE),
@@ -792,9 +792,9 @@ public class Lifting extends SwitchOnBaseTypeGenerator
ReferenceBinding roleClassBinding = roleModel.getBinding();
if (this._boundRootRoleModel.isRoleFile()) {
- this._gen = MethodModel.setupSourcePositionMapping(liftToMethodDeclaration,
+ this._gen = MethodModel.setupSourcePositionMapping(liftToMethodDeclaration,
teamBinding._teamModel.getAst(),
- roleModel,
+ roleModel,
this._gen);
}
@@ -815,7 +815,7 @@ public class Lifting extends SwitchOnBaseTypeGenerator
// conditional generation (see below)
maybeCreateTeamMemberCheck(baseClassBinding),
- (RoleModel.getInstantiationPolicy(roleClassBinding).isOndemand())
+ (RoleModel.getInstantiationPolicy(roleClassBinding).isOndemand())
// if(!_OT$team_param._OT$cache_OT$RootRole.containsKey(base))
? createRoleExistentCheck(
roleClassBinding,
@@ -924,7 +924,7 @@ public class Lifting extends SwitchOnBaseTypeGenerator
return this._gen.block(
// (create a role of the best matching type:)
new Statement[] {
- caseObjects.length > 0
+ caseObjects.length > 0
? createSwitchStatement(teamType, roleType, caseObjects, problemId, this._gen)
: genLiftingFailedException(BASE, roleType, problemId, this._gen)});
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/LiftingEnvironment.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/LiftingEnvironment.java
index 1a4b64878..8da6d8aef 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/LiftingEnvironment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/LiftingEnvironment.java
@@ -160,7 +160,7 @@ public class LiftingEnvironment
ReflectionGenerator.createRoleQueryMethods(this._teamType, weavingScheme);
return;
}
-
+
if (lateRole == null)
TeamMethodGenerator.addFakedTeamRegistrationMethods(this._teamType.binding);
@@ -198,7 +198,7 @@ public class LiftingEnvironment
}
}
}
-
+
/**
* @param lifting
* @param node representing the role to generate for
@@ -329,14 +329,14 @@ public class LiftingEnvironment
// Somehow, this doesn't happen automagically.
// But by declaring the caches public the issue is completely avoided,
// hoping, that no-one maliciously accesses the cache.
-
+
// if base is generic, we refer to it via the raw type, suppress that warning:
// if (usingRawType) {
// field.annotations = new Annotation[] {
-// gen.singleStringsMemberAnnotation(TypeConstants.JAVA_LANG_SUPPRESSWARNINGS, new char[][]{"rawtypes".toCharArray()}) //$NON-NLS-1$
+// gen.singleStringsMemberAnnotation(TypeConstants.JAVA_LANG_SUPPRESSWARNINGS, new char[][]{"rawtypes".toCharArray()}) //$NON-NLS-1$
// };
// }
-
+
AstEdit.addField(teamDecl, field, true, false/*typeProblem*/, false);
teamDecl.getTeamModel().addCache(field);
}
@@ -358,7 +358,7 @@ public class LiftingEnvironment
{
AstGenerator gen = new AstGenerator(teamType.sourceStart, teamType.sourceEnd);
gen.shiftPosition(); // don't let @SuppressWarnings interfere with non-generated code.
-
+
initMethod = gen.method(
teamType.compilationResult,
ClassFileConstants.AccPrivate, // no overriding!!
@@ -367,7 +367,7 @@ public class LiftingEnvironment
null);
initMethod.statements = new Statement[0]; // to be filled by fillInitCaches()
initMethod.annotations = new Annotation[] { // in case base type is a raw type
- gen.singleStringsMemberAnnotation(TypeConstants.JAVA_LANG_SUPPRESSWARNINGS, new char[][]{"all".toCharArray()}) //$NON-NLS-1$
+ gen.singleStringsMemberAnnotation(TypeConstants.JAVA_LANG_SUPPRESSWARNINGS, new char[][]{"all".toCharArray()}) //$NON-NLS-1$
};
AstEdit.addMethod(teamType, initMethod);
initMethod.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; // prevent 'unused' warning
@@ -386,7 +386,7 @@ public class LiftingEnvironment
}
// Serialization: generate restore methods to initialize caches/register roles:
- SerializationGenerator.generateRestoreMethods(teamType, gen);
+ SerializationGenerator.generateRestoreMethods(teamType, gen);
}
return initMethod;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lowering.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lowering.java
index 2a40af45c..e6a56bf3c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lowering.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lowering.java
@@ -153,7 +153,7 @@ public class Lowering implements IOTConstants {
if (unloweredExpression.constant == null)
unloweredExpression.resolveType(scope);
callLower.resolvedType = roleType.baseclass();
-
+
callLower.binding =
StandardElementGenerator.getGetBaseMethod(
scope,
@@ -210,7 +210,7 @@ public class Lowering implements IOTConstants {
}
return loweringExpr;
}
-
+
@NonNull LocalVariableBinding makeNewLocal(BlockScope scope, TypeBinding variableType, int sourceStart, int sourceEnd, boolean deferredResolve) {
char[] name = ("_OT$unlowered$"+sourceStart).toCharArray(); //$NON-NLS-1$
LocalVariableBinding varBinding = new LocalVariableBinding(name, variableType, 0, false);
@@ -221,10 +221,10 @@ public class Lowering implements IOTConstants {
varBinding.useFlag = LocalVariableBinding.USED;
return varBinding;
}
-
+
/** A conditional expression that checks for null before performing the actual lowering. */
static class CheckedLoweringExpression extends ConditionalExpression {
-
+
private final LocalVariableBinding localVar;
Expression origExpression;
private Expression teamExpression;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AbstractOTReferenceBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AbstractOTReferenceBinding.java
index dd3dd34fb..c6fd64b64 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AbstractOTReferenceBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AbstractOTReferenceBinding.java
@@ -74,11 +74,11 @@ public abstract class AbstractOTReferenceBinding extends TypeBinding
// allow to see this as a ReferenceBinding:
protected abstract ReferenceBinding _this();
-
+
public AbstractOTReferenceBinding(ReferenceBinding prototype) {
super(prototype);
}
-
+
protected AbstractOTReferenceBinding() {
super();
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AnchorMapping.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AnchorMapping.java
index 5e7176f1c..6003a0021 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AnchorMapping.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AnchorMapping.java
@@ -122,7 +122,7 @@ public class AnchorMapping {
* a list of parameters. This means to propagate type anchors into all role types.
* @param scope For resolving names.
* @param parameters formal parameters of 'currentMethod' - to be instantiated from this anchor mapping
- * @param currentMethod a candidate for the current method call - can be null when checking method mappings
+ * @param currentMethod a candidate for the current method call - can be null when checking method mappings
* @return new array or 'parameters'
*/
public static TypeBinding[] instantiateParameters(Scope scope, TypeBinding[] parameters, MethodBinding currentMethod)
@@ -137,7 +137,7 @@ public class AnchorMapping {
{
if (this._arguments != null && this._arguments.length != parameters.length)
return parameters; // don't bother to instantiate if lenghts disagree (=> varargs and param-anchored types don't work together)
-
+
if (scope == null)
scope = this._scope; // scope would be more specific but _scope is OK, too.
TypeBinding[] newParams = null;
@@ -158,10 +158,10 @@ public class AnchorMapping {
return newParams;
return parameters;
}
- // PRE: this._arguments != null => this._arguments.length == parameters.length
+ // PRE: this._arguments != null => this._arguments.length == parameters.length
private TypeBinding instantiateParameter(final Scope scope, final TypeBinding parameter, final int i, final MethodBinding currentMethod, final boolean isMethodEnhanced)
{
- return RoleTypeCreator.deepSubstitute(parameter, scope.environment(),
+ return RoleTypeCreator.deepSubstitute(parameter, scope.environment(),
new IDependentTypeSubstitution() {
@Override
@SuppressWarnings("synthetic-access")
@@ -170,11 +170,11 @@ public class AnchorMapping {
ITeamAnchor anchor = null;
if (AnchorMapping.this._arguments != null)
anchor = translateAnchor(scope, AnchorMapping.this._arguments[srcIdx], paramDependentType, currentMethod);
-
+
// missing a required anchor?
if (anchor == null && paramDependentType.hasAnchorWithinThisMethodsSignature(currentMethod))
return new ProblemReferenceBinding(paramDependentType.sourceName(), ProblemReasons.AnchorNotFound, paramDependentType);
-
+
if (anchor == null && AnchorMapping.this._receiver != null)
{
if (DependentTypeBinding.isDependentTypeOf(
@@ -196,7 +196,7 @@ public class AnchorMapping {
}
}
if (DependentTypeBinding.isDependentTypeVariable(currentMethod.parameters[i])) {
- TypeVariableBinding typeVariable = (TypeVariableBinding) ((DependentTypeBinding)currentMethod.parameters[i]).type;
+ TypeVariableBinding typeVariable = (TypeVariableBinding) ((DependentTypeBinding)currentMethod.parameters[i]).type;
ITeamAnchor[] anchors = typeVariable.anchors;
if (anchors != null && anchors[0] instanceof LocalVariableBinding) { // FIXME(SH): more positions?
int pos = ((LocalVariableBinding)anchors[0]).resolvedPosition;
@@ -213,8 +213,8 @@ public class AnchorMapping {
}
});
}
-
- private ITeamAnchor translateAnchor(Scope scope, ASTNode typedNode, DependentTypeBinding paramDependentType, MethodBinding currentMethod)
+
+ private ITeamAnchor translateAnchor(Scope scope, ASTNode typedNode, DependentTypeBinding paramDependentType, MethodBinding currentMethod)
{
ProblemReporter problemReporter = scope != null ? scope.problemReporter() : null;
ITeamAnchor anchor = null;
@@ -230,7 +230,7 @@ public class AnchorMapping {
roleType, // roleType
problemReporter, //
typedNode); // typedNode
- else // when resolving a method spec, we interpret an Argument as an anchor expression
+ else // when resolving a method spec, we interpret an Argument as an anchor expression
anchor = ((Argument)anchorExpr).binding;
} else if (paramDependentType._teamAnchor instanceof TThisBinding)
@@ -267,7 +267,7 @@ public class AnchorMapping {
return anchor;
}
- // if anchor is valid return it otherwise null
+ // if anchor is valid return it otherwise null
private ITeamAnchor validAnchor(ITeamAnchor anchor) {
if ( (anchor != null)
&& (anchor != RoleTypeBinding.NoAnchor)
@@ -307,13 +307,13 @@ public class AnchorMapping {
}
return false;
}
-
+
/** Is 'instantiation' a legal instantiation for 'typeVariable' in terms of team anchors? */
public static boolean isLegalInstantiation(TypeVariableBinding typeVariable, DependentTypeBinding instantiation) {
AnchorMapping currentMapping = currentMappings.get();
if (currentMapping != null)
return currentMapping.internalIsLegalInstantiation(typeVariable, instantiation);
- return false;
+ return false;
}
private boolean internalIsLegalInstantiation(TypeVariableBinding typeVariable, DependentTypeBinding instantiation) {
ITeamAnchor[] anchors = typeVariable.anchors;
@@ -327,10 +327,10 @@ public class AnchorMapping {
return false;
}
- private boolean areTypeEqual(RoleTypeBinding role1, RoleTypeBinding role2, MethodBinding currentMethod)
+ private boolean areTypeEqual(RoleTypeBinding role1, RoleTypeBinding role2, MethodBinding currentMethod)
{
ITeamAnchor anchor = translateAnchor(null/*scope*/, null/*node*/, role1, currentMethod);
-
+
if (anchor != null)
return role2.isSameType(role1, anchor);
@@ -385,7 +385,7 @@ public class AnchorMapping {
}
} else if ( loweringPossible // if we detected lowering possible before, recheck here
&& arguments[i].resolvedType != null
- && arguments[i].resolvedType.isRoleType())
+ && arguments[i].resolvedType.isRoleType())
{
((DependentTypeBinding)arguments[i].resolvedType).recheckAmbiguousLowering(parameters[i], arguments[i], scope, messageSend.binding);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/CallinCalloutBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/CallinCalloutBinding.java
index 42baab57b..3d7d939eb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/CallinCalloutBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/CallinCalloutBinding.java
@@ -313,7 +313,7 @@ public class CallinCalloutBinding extends Binding
return CharOperation.concat(theName, currentType.readableName(), '$');
}
/**
- * Answer the name of the role that introduced this callin mapping
+ * Answer the name of the role that introduced this callin mapping
* (support for overriding in otredyn).
*/
public ReferenceBinding introducingRoleClass() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/CallinCalloutScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/CallinCalloutScope.java
index 5fc2c17d7..97d331360 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/CallinCalloutScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/CallinCalloutScope.java
@@ -127,7 +127,7 @@ public class CallinCalloutScope extends MethodScope {
if (!(binding instanceof LocalVariableBinding)) // local
return binding;
LocalVariableBinding localBinding = (LocalVariableBinding)binding;
- if ( localBinding.declaringScope != null
+ if ( localBinding.declaringScope != null
&& localBinding.declaringScope.isMethodMappingWrapper()) // defined in a method mapping wrapper
{
// hide internal local var but re-resolve:
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/DependentTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/DependentTypeBinding.java
index d67a885f3..39eab7146 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/DependentTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/DependentTypeBinding.java
@@ -60,7 +60,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.transfor
*
* Current limitations:
* - Only one value parameter is supported, yet.
- *
+ *
* Design note: since 1.3.0 this class is a subclass of ParameterizedTypeBinding in order to
* support combinations of value parameters and type parameters, specifically, generic role types.
*
@@ -92,11 +92,11 @@ public class DependentTypeBinding extends ParameterizedTypeBinding {
private ArrayBinding[] _arrayBindings = null;
/** Public constructor for clients (FIXME: let only environment create us) */
- public DependentTypeBinding(ReferenceBinding type, TypeBinding[] typeArguments, ITeamAnchor teamAnchor, int paramPosition, ReferenceBinding enclosingType, LookupEnvironment lookupEnvironment)
+ public DependentTypeBinding(ReferenceBinding type, TypeBinding[] typeArguments, ITeamAnchor teamAnchor, int paramPosition, ReferenceBinding enclosingType, LookupEnvironment lookupEnvironment)
{
super(type, typeArguments, teamAnchor, enclosingType, lookupEnvironment);
initializeFromType(type);
- initializeDependentType(teamAnchor, paramPosition);
+ initializeDependentType(teamAnchor, paramPosition);
}
/** For subclasses. Still need to call initializeDependentType afterwards. */
@@ -110,7 +110,7 @@ public class DependentTypeBinding extends ParameterizedTypeBinding {
this.modifiers = givenType.modifiers;
this.tagBits = givenType.tagBits;
this.tagBits &= ~(TagBits.AreMethodsSorted|TagBits.AreMethodsComplete); // in case the generic type was already processed
-
+
this.compoundName = givenType.compoundName;
this.sourceName = givenType.sourceName;
this.constantPoolName = givenType.constantPoolName;
@@ -136,7 +136,7 @@ public class DependentTypeBinding extends ParameterizedTypeBinding {
// registerAnchor();
}
- void initializeDependentType(ITeamAnchor anchor, int valueParamPosition)
+ void initializeDependentType(ITeamAnchor anchor, int valueParamPosition)
{
// don't store baseclass, will be initialized by baseclass()
@@ -152,7 +152,7 @@ public class DependentTypeBinding extends ParameterizedTypeBinding {
else if (anchor instanceof FieldBinding)
((FieldBinding)anchor).modifiers |= ExtraCompilerModifiers.AccLocallyUsed; // avoid unused-warning
}
-
+
public void updateAnchor(Argument[] methodArguments) {
if (this._argumentPosition > -1) {
this._teamAnchor = methodArguments[this._argumentPosition].binding;
@@ -249,7 +249,7 @@ public class DependentTypeBinding extends ParameterizedTypeBinding {
public void collectSubstitutes(Scope scope, TypeBinding actualType, InferenceContext inferenceContext, int constraint) {
this.transferTypeArguments(this.type).collectSubstitutes(scope, actualType, inferenceContext, constraint);
}
-
+
// implement new method from Substitution:
@Override
@@ -273,7 +273,7 @@ public class DependentTypeBinding extends ParameterizedTypeBinding {
return true; // could be anchored type variable
return binding.valueParamSynthArgs() != NO_SYNTH_ARGUMENTS;
}
-
+
@Override
public boolean isParameterizedType() {
return this.arguments != null; // by inheritance we'd be parameterized, but if we don't have arguments, it's only value parameters.
@@ -283,7 +283,7 @@ public class DependentTypeBinding extends ParameterizedTypeBinding {
public DependentTypeBinding asPlainDependentType() {
return this;
}
-
+
@Override
public boolean isPlainDependentType() {
return true;
@@ -332,16 +332,16 @@ public class DependentTypeBinding extends ParameterizedTypeBinding {
// for internal casting purposes type anchors can be ignored:
return getRealType().isProvablyDistinct(otherType);
}
-
+
@Override
public int kind() {
return (this.arguments != null) ? Binding.PARAMETERIZED_TYPE : this.type.kind();
}
/**
- * Re-check lowering ambiguity (OTJLD 2.2(f)) after type checking had detected this situation before.
+ * Re-check lowering ambiguity (OTJLD 2.2(f)) after type checking had detected this situation before.
* (see {@link Config#getLoweringPossible()}).
- *
+ *
* @param otherType declared type to which a value of this type is being attached.
* @param location AST node for problem reporting
* @param scope scope for problem reporting
@@ -360,7 +360,7 @@ public class DependentTypeBinding extends ParameterizedTypeBinding {
if ( CharOperation.equals(resolvedMethod.selector, ReflectionGenerator.UNREGISTER_ROLE)
&& ( resolvedMethod.parameters.length == 1
|| resolvedMethod.parameters.length == 2))
- return;
+ return;
}
}
scope.problemReporter().ambiguousUpcastOrLowering(location, otherType, this);
@@ -410,7 +410,7 @@ public class DependentTypeBinding extends ParameterizedTypeBinding {
public ReferenceBinding rawBaseclass() {
return this.type.rawBaseclass();
}
-
+
@Override
public TypeBinding original() {
return this.type.original();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/PrecedenceBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/PrecedenceBinding.java
index be63651f4..f4f3ff60d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/PrecedenceBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/PrecedenceBinding.java
@@ -393,7 +393,7 @@ public class PrecedenceBinding extends Binding {
names[i] = "<unresolved>".toCharArray(); //$NON-NLS-1$
else if (this.elements[i].kind() == Binding.BINDING)
names[i] = ((CallinCalloutBinding)this.elements[i]).name;
- else
+ else
names[i] = ((ReferenceBinding)this.elements[i]).sourceName();
}
return CharOperation.concatWith(names, ',');
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/ProblemAnchorBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/ProblemAnchorBinding.java
index 2953f8d9a..6c7f5fd49 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/ProblemAnchorBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/ProblemAnchorBinding.java
@@ -24,9 +24,9 @@ import org.eclipse.jdt.internal.compiler.lookup.Scope;
/**
- * Represents a team anchor for which a problem has been detected but not
+ * Represents a team anchor for which a problem has been detected but not
* immediately been reported.
- *
+ *
* @author stephan
* @since 1.4.0
*/
@@ -34,7 +34,7 @@ public class ProblemAnchorBinding extends TeamAnchor {
TeamAnchor closestMatch;
int problemId;
-
+
public ProblemAnchorBinding(TeamAnchor closestMatch, int problemId) {
super();
this.closestMatch = closestMatch;
@@ -70,19 +70,19 @@ public class ProblemAnchorBinding extends TeamAnchor {
public boolean isFinal() {
return this.closestMatch.isFinal();
}
-
+
@Override
public int problemId() {
return this.problemId;
}
- /**
+ /**
* Check if given anchor is a ProblemAnchorBinding and report error if suitable.
* @param scope for reporting
* @param location for reporting
* @param anchor given anchor to check
* @param typeName for reporting
- * @return true if anchor is valid, false if it is null or a ProblemAnchorBinding.
+ * @return true if anchor is valid, false if it is null or a ProblemAnchorBinding.
*/
public static boolean checkAnchor(Scope scope, ASTNode location, ITeamAnchor anchor, char[] typeName) {
if (anchor == null)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/RoleTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/RoleTypeBinding.java
index 7c8a2bfba..997e521ef 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/RoleTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/RoleTypeBinding.java
@@ -155,13 +155,13 @@ public class RoleTypeBinding extends DependentTypeBinding
// ============= CREATION AND INSTANCE REGISTRY: ===================
- public RoleTypeBinding(ReferenceBinding genericType, TypeBinding[] typeArguments, ITeamAnchor teamAnchor, ReferenceBinding enclosingType, LookupEnvironment lookupEnvironment)
+ public RoleTypeBinding(ReferenceBinding genericType, TypeBinding[] typeArguments, ITeamAnchor teamAnchor, ReferenceBinding enclosingType, LookupEnvironment lookupEnvironment)
{
super(genericType.getRealType(), typeArguments, teamAnchor, enclosingType, lookupEnvironment);
initialize(genericType, teamAnchor);
}
- private void initialize(ReferenceBinding roleType, ITeamAnchor teamAnchor)
+ private void initialize(ReferenceBinding roleType, ITeamAnchor teamAnchor)
{
// FIXME(SH): is it OK to strip ParameterizedFields?
if (teamAnchor instanceof ParameterizedFieldBinding)
@@ -216,7 +216,7 @@ public class RoleTypeBinding extends DependentTypeBinding
this._staticallyKnownRoleClass = transferTypeArguments(this._staticallyKnownRoleClass);
}
this._staticallyKnownRoleType = transferTypeArguments(this._staticallyKnownRoleType);
-
+
this._declaredRoleType = this._staticallyKnownRoleType;
// keep these consistent with _declaredRoleType:
this.roleModel = this._declaredRoleType.roleModel;
@@ -239,7 +239,7 @@ public class RoleTypeBinding extends DependentTypeBinding
// record as known role type at teamAnchor and in our own cache
registerAnchor();
}
-
+
@Override
public TypeBinding clone(TypeBinding outerType) {
RoleTypeBinding clone = new RoleTypeBinding(this.type, typeArguments(), this._teamAnchor, (ReferenceBinding) outerType, this.environment);
@@ -257,10 +257,10 @@ public class RoleTypeBinding extends DependentTypeBinding
@Override
public ReferenceBinding weakenFrom(ReferenceBinding other) {
if (other instanceof RoleTypeBinding) {
- if (this.weakenedTypes == null)
+ if (this.weakenedTypes == null)
this.weakenedTypes = new HashMap<ReferenceBinding, DependentTypeBinding>();
ReferenceBinding knownWeakened = this.weakenedTypes.get(other);
- if (knownWeakened != null)
+ if (knownWeakened != null)
return knownWeakened;
RoleTypeBinding otherRTB = (RoleTypeBinding)other;
DependentTypeBinding newWeakened = new WeakenedTypeBinding(this, otherRTB._declaredRoleType, this.environment);
@@ -338,7 +338,7 @@ public class RoleTypeBinding extends DependentTypeBinding
public boolean isRoleType() {
return true;
}
-
+
@Override
public boolean isPlainDependentType() {
return false;
@@ -386,7 +386,7 @@ public class RoleTypeBinding extends DependentTypeBinding
return false;
return !((DependentTypeBinding)type).hasExplicitAnchor();
}
-
+
@Override
public DependentTypeBinding asPlainDependentType() {
return null;
@@ -444,7 +444,7 @@ public class RoleTypeBinding extends DependentTypeBinding
public TypeBinding erasure() {
return this.type.erasure();
}
-
+
@Override
public ReferenceBinding genericType() {
// check if any regular genericity is involved:
@@ -518,7 +518,7 @@ public class RoleTypeBinding extends DependentTypeBinding
return this.type.getMethods(selector);
return super.getMethods(selector);
}
-
+
@Override
public MethodBinding[] availableMethods() {
return this._staticallyKnownRoleType.availableMethods();
@@ -694,7 +694,7 @@ public class RoleTypeBinding extends DependentTypeBinding
return null;
}
-
+
@Override
public boolean isHierarchyConnected() {
return this.type.isHierarchyConnected();
@@ -851,7 +851,7 @@ public class RoleTypeBinding extends DependentTypeBinding
rightTeam))
{
rightRole = (RoleTypeBinding)this._teamAnchor.getMemberTypeOfType(rightRole.internalName());
-
+
} else {
return false;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticBaseCallSurrogate.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticBaseCallSurrogate.java
index 36b20525c..e306bdd11 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticBaseCallSurrogate.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticBaseCallSurrogate.java
@@ -45,7 +45,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.TSuperHelper;
/**
* This class represents placeholder base-call surrogates which only throw
* an OTREInternalError -> no need to have these generated by the OTRE.
- *
+ *
* @author stephan
* @since 1.3.0
*/
@@ -56,11 +56,11 @@ public class SyntheticBaseCallSurrogate extends SyntheticOTMethodBinding
private TypeBinding errorType;
private ReferenceBinding stringType;
-
+
/**
* Create a binding for a synthetic base-call surrogate.
- *
- * @param callinMethod the callin method potentially holding base-calls
+ *
+ * @param callinMethod the callin method potentially holding base-calls
* @param declaringClass the class that will hold the surrogate implementation: normally the role, for static callin methods: the team.
*/
public SyntheticBaseCallSurrogate(MethodBinding callinMethod, SourceTypeBinding declaringClass) {
@@ -78,7 +78,7 @@ public class SyntheticBaseCallSurrogate extends SyntheticOTMethodBinding
Scope scope = declaringClass.scope;
this.errorType = scope.getType(IOTConstants.OTRE_INTERNAL_ERROR, 3);
this.stringType = scope.getJavaLangString();
- // the synthetic methods of a class will be sorted according to a per-class index, find the index now:
+ // the synthetic methods of a class will be sorted according to a per-class index, find the index now:
SyntheticMethodBinding[] knownAccessMethods = declaringClass.syntheticMethods();
this.index = knownAccessMethods == null ? 0 : knownAccessMethods.length;
this.sourceStart = declaringClass.scope.referenceContext.sourceStart;
@@ -126,7 +126,7 @@ public class SyntheticBaseCallSurrogate extends SyntheticOTMethodBinding
/**
* Add any required base-call surrogates to the given type.
- * @param type must be a role class.
+ * @param type must be a role class.
*/
public static void addFakedBaseCallSurrogates(SourceTypeBinding type, LookupEnvironment environment) {
if (type.methods() == null)
@@ -151,7 +151,7 @@ public class SyntheticBaseCallSurrogate extends SyntheticOTMethodBinding
*/
public static MethodBinding getBaseCallSurrogate(MethodBinding callinMethod, RoleModel clazz, LookupEnvironment environment)
{
-
+
try {
if (TSuperHelper.isTSuper(callinMethod))
return null;
@@ -161,7 +161,7 @@ public class SyntheticBaseCallSurrogate extends SyntheticOTMethodBinding
ReferenceBinding roleType = callinMethod.declaringClass;
ReferenceBinding teamType = roleType.enclosingType();
ReferenceBinding declaringClass = callinMethod.isStatic() ? teamType : roleType;
-
+
char[] roleName = roleType.sourceName();
char[] selector =
genSurrogateName(callinMethod.selector, roleName, callinMethod.isStatic());
@@ -169,7 +169,7 @@ public class SyntheticBaseCallSurrogate extends SyntheticOTMethodBinding
TypeBinding[] baseCallParameters = callinMethod.parameters;
if (!callinMethod.isStatic())
baseCallParameters = addIsSuperAccessArg(baseCallParameters, environment.globalOptions.weavingScheme);
-
+
// search existing surrogate:
candidates:
for (MethodBinding candidate : declaringClass.getMethods(selector)) {
@@ -190,7 +190,7 @@ public class SyntheticBaseCallSurrogate extends SyntheticOTMethodBinding
baseCallParameters,
null /*exceptions*/,
declaringClass);
- else
+ else
result = ((SourceTypeBinding)declaringClass).addSyntheticBaseCallSurrogate(callinMethod);
MethodModel.getModel(result)._fakeKind = MethodModel.FakeKind.BASECALL_SURROGATE;
RoleTypeCreator.wrapTypesInMethodBindingSignature(result, environment);
@@ -230,8 +230,8 @@ public class SyntheticBaseCallSurrogate extends SyntheticOTMethodBinding
if (!areTypesEqual(enclosingOne, enclosingTwo)) return false;
return CharOperation.equals(one.sourceName(), two.sourceName());
}
-
- static TypeBinding[] addIsSuperAccessArg(TypeBinding[] baseCallParameters, WeavingScheme weavingScheme)
+
+ static TypeBinding[] addIsSuperAccessArg(TypeBinding[] baseCallParameters, WeavingScheme weavingScheme)
{
int len = baseCallParameters.length;
TypeBinding[] newParams = new TypeBinding[len+1];
@@ -271,5 +271,5 @@ public class SyntheticBaseCallSurrogate extends SyntheticOTMethodBinding
return selector;
}
-
+
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticOTMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticOTMethodBinding.java
index 367e15f52..d55fd2a53 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticOTMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticOTMethodBinding.java
@@ -1,8 +1,8 @@
/**********************************************************************
* This file is part of "Object Teams Development Tooling"-Software
- *
+ *
* Copyright 2010 GK Software AG
- *
+ *
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,9 +10,9 @@
*
* SPDX-License-Identifier: EPL-2.0
* $Id$
- *
+ *
* Please visit http://www.eclipse.org/objectteams for updates and contact.
- *
+ *
* Contributors:
* Stephan Herrmann - Initial API and implementation
**********************************************************************/
@@ -25,7 +25,7 @@ import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
public abstract class SyntheticOTMethodBinding extends SyntheticMethodBinding {
- public SyntheticOTMethodBinding(SourceTypeBinding declaringClass, int modifiers, char[] selector, TypeBinding[] parameters, TypeBinding returnType)
+ public SyntheticOTMethodBinding(SourceTypeBinding declaringClass, int modifiers, char[] selector, TypeBinding[] parameters, TypeBinding returnType)
{
super(declaringClass, modifiers, selector, parameters, returnType);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticOTTargetMethod.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticOTTargetMethod.java
index f9c3f0484..1ae047fcb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticOTTargetMethod.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticOTTargetMethod.java
@@ -1,17 +1,17 @@
/**********************************************************************
* This file is part of "Object Teams Development Tooling"-Software
- *
+ *
* Copyright 2014 GK Software AG
- *
+ *
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Please visit http://www.eclipse.org/objectteams for updates and contact.
- *
+ *
* Contributors:
* Stephan Herrmann - Initial API and implementation
**********************************************************************/
@@ -34,7 +34,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.model.TeamModel;
/**
* A synthetic method binding, which used as an invocation target needs to
* influence code generation.
- *
+ *
* @since 2.3.1
*/
public abstract class SyntheticOTTargetMethod extends SyntheticMethodBinding {
@@ -42,7 +42,7 @@ public abstract class SyntheticOTTargetMethod extends SyntheticMethodBinding {
protected SyntheticOTTargetMethod(MethodBinding targetMethod, int purpose) {
super(targetMethod, purpose);
}
-
+
protected SyntheticOTTargetMethod(FieldBinding targetField, boolean isReadAccess, boolean isSuperAccess, SourceTypeBinding declaringClass) {
super(targetField, isReadAccess, isSuperAccess, declaringClass);
}
@@ -59,7 +59,7 @@ public abstract class SyntheticOTTargetMethod extends SyntheticMethodBinding {
* invoke still needs to be generated.
*/
public abstract byte prepareOrGenerateInvocation(CodeStream codeStream, byte opcode);
-
+
/**
* Represents an inferred callout-to-field.
* May need to tweak invokestatic (for regular access$n methods) into invokevirtual (for the generated c-t-f method).
@@ -76,7 +76,7 @@ public abstract class SyntheticOTTargetMethod extends SyntheticMethodBinding {
return opcode;
}
}
-
+
/**
* Represents a decapsulating field access while targeting OTDRE.
* We need to generate a special sequence to call _OT$access(int,int,Object[],ITeam)
@@ -91,7 +91,7 @@ public abstract class SyntheticOTTargetMethod extends SyntheticMethodBinding {
private TypeBinding originalType;
private ASTNode site;
private BlockScope scope;
-
+
/**
* Create a binding for a field access using decapsulation.
* @param fakedMethod this method is member of the base class, representing the otdre-generated access method.
@@ -122,7 +122,7 @@ public abstract class SyntheticOTTargetMethod extends SyntheticMethodBinding {
else
codeStream.iconst_1();
// no args to pack for read access:
- codeStream.aconst_null();
+ codeStream.aconst_null();
// enclosing team instance:
Object[] emulationPath = this.scope.getEmulationPath(this.enclosingTeam, true /*only exact match*/, false/*consider enclosing arg*/);
codeStream.generateOuterAccess(emulationPath, this.site, this.enclosingTeam, this.scope);
@@ -156,7 +156,7 @@ public abstract class SyntheticOTTargetMethod extends SyntheticMethodBinding {
private TypeBinding originalReturnType;
private ASTNode site;
private BlockScope scope;
-
+
/**
* Create a binding for a method access using decapsulation.
* @param targetMethod this method is member of the base class, representing the otdre-generated access method.
@@ -214,7 +214,7 @@ public abstract class SyntheticOTTargetMethod extends SyntheticMethodBinding {
codeStream.bipush((byte) this.accessId);
codeStream.swap();
// accessId, array
-
+
// opKind (ignored):
codeStream.iconst_0();
codeStream.swap();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticRoleBridgeMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticRoleBridgeMethodBinding.java
index a1a750b64..948cfe7b9 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticRoleBridgeMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticRoleBridgeMethodBinding.java
@@ -1,8 +1,8 @@
/**********************************************************************
* This file is part of "Object Teams Development Tooling"-Software
- *
+ *
* Copyright 2010 GK Software AG
- *
+ *
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,9 +10,9 @@
*
* SPDX-License-Identifier: EPL-2.0
* $Id$
- *
+ *
* Please visit http://www.eclipse.org/objectteams for updates and contact.
- *
+ *
* Contributors:
* Stephan Herrmann - Initial API and implementation
**********************************************************************/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticRoleFieldAccess.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticRoleFieldAccess.java
index be1b681b2..2eaa4dd87 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticRoleFieldAccess.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/SyntheticRoleFieldAccess.java
@@ -83,7 +83,7 @@ public class SyntheticRoleFieldAccess extends SyntheticOTTargetMethod {
public SyntheticRoleFieldAccess(FieldBinding targetField, boolean isReadAccess, SourceTypeBinding declaringClass) {
super(targetField, isReadAccess, false, declaringClass);
-
+
if (targetField.declaringClass instanceof SourceTypeBinding && ((SourceTypeBinding)targetField.declaringClass).scope != null) {
FieldDeclaration sourceField = targetField.sourceField();
if (sourceField != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/TeamAnchor.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/TeamAnchor.java
index 8f7147d15..a7745c8a6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/TeamAnchor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/TeamAnchor.java
@@ -298,7 +298,7 @@ public abstract class TeamAnchor extends Binding implements ITeamAnchor {
}
} else if (expression instanceof TypeAnchorReference) {
bind = (Binding) ((TypeAnchorReference)expression).getResolvedAnchor();
- }
+ }
if (bind != null && (bind instanceof TeamAnchor))
return (TeamAnchor)bind;
TypeBinding type = expression.resolvedType;
@@ -790,16 +790,16 @@ public abstract class TeamAnchor extends Binding implements ITeamAnchor {
int paramPosition = -1;
if (roleBinding instanceof DependentTypeBinding)
paramPosition = ((DependentTypeBinding)roleBinding)._valueParamPosition;
-
- if (roleBinding instanceof RoleTypeBinding)
+
+ if (roleBinding instanceof RoleTypeBinding)
if (!this.isTeamContainingRole(roleBinding)) // need to switch to outer anchor?
return this.asAnchorFor(roleBinding).getDependentTypeBinding(roleBinding, paramPosition, arguments, dimensions, ((RoleTypeBinding)roleBinding).environment);
-
+
if (roleBinding instanceof WeakenedTypeBinding) {
if (((WeakenedTypeBinding)roleBinding)._teamAnchor == this)
return roleBinding;
}
-
+
if (roleBinding instanceof ParameterizedTypeBinding)
return getDependentTypeBinding(roleBinding, paramPosition, arguments, dimensions, ((ParameterizedTypeBinding)roleBinding).environment);
return getDependentTypeBinding(roleBinding, paramPosition, arguments, dimensions);
@@ -834,7 +834,7 @@ public abstract class TeamAnchor extends Binding implements ITeamAnchor {
int paramPosition,
TypeBinding[] arguments,
int dimensions,
- LookupEnvironment env)
+ LookupEnvironment env)
{
DependentTypeBinding dependentTypeBinding =
(DependentTypeBinding)env.createParameterizedType(typeBinding, arguments, this, paramPosition, typeBinding.enclosingType(), typeBinding.getTypeAnnotations());
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/WeakenedTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/WeakenedTypeBinding.java
index 3c82dec46..faf2df73d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/WeakenedTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/WeakenedTypeBinding.java
@@ -84,7 +84,7 @@ public class WeakenedTypeBinding extends DependentTypeBinding {
return this.type.isCompatibleWith(otherStrong)
&& otherWeak.isCompatibleWith(this.weakenedType);
}
-
+
// ----- BYTE CODE VIEW -----
@Override
public char[] constantPoolName() {
@@ -139,17 +139,17 @@ public class WeakenedTypeBinding extends DependentTypeBinding {
public boolean isSignificantlyWeakened() {
return TypeBinding.notEquals(this.weakenedType, this.type.getRealType());
}
-
+
@Override
public boolean isRoleType() {
return this.type.isRoleType();
}
-
+
@Override
public boolean isPlainDependentType() {
return this.type.isPlainDependentType();
}
-
+
/**
* Weakening implies that the interfaces are used to ensure compatibility,
* so never use the signature of a class part.
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementor.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementor.java
index ad1b10925..1f601a6cf 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementor.java
@@ -386,7 +386,7 @@ public class CallinImplementor extends MethodMappingImplementor
newMethod.isMappingWrapper = WrapperKind.CALLIN;
newMethod.returnType.setBaseclassDecapsulation(DecapsulationState.REPORTED);
newMethod.typeParameters= typeParams;
-
+
gen.maybeAddTypeParametersToMethod(baseTypeBinding, newMethod);
int iProblem = teamDecl.getTeamModel().canLiftingFail(this._role.getBinding());
@@ -435,7 +435,7 @@ public class CallinImplementor extends MethodMappingImplementor
/** Declare to throw LiftingFailedException and report problem for each role in callinBindingDeclaration#rolesWithBindingAmbiguity */
protected void declareLiftingFailedException(CallinMappingDeclaration callinBindingDeclaration,
MethodDeclaration wrapperMethod,
- AstGenerator gen)
+ AstGenerator gen)
{
TypeReference liftingFailed = gen.qualifiedTypeReference(IOTConstants.O_O_LIFTING_FAILED_EXCEPTION);
AstEdit.addException(wrapperMethod, liftingFailed, false/*resolve*/);
@@ -462,7 +462,7 @@ public class CallinImplementor extends MethodMappingImplementor
if (this._role.isRoleFile()) {
this.synthGen = MethodModel.setupSourcePositionMapping(callinWrapperDecl,
- this._role.getTeamModel().getAst(),
+ this._role.getTeamModel().getAst(),
this._role,
null);
if (this.synthGen != null)
@@ -507,7 +507,7 @@ public class CallinImplementor extends MethodMappingImplementor
// from here on all statements go into the try block - with "finally { resetFlag(); }"
ArrayList<Statement> tryStatements = new ArrayList<Statement>();
-
+
// -------------- call receiver & arguments --------------
//_OT$role.myRoleMethod(_OT$param0, ...);
// or:
@@ -549,7 +549,7 @@ public class CallinImplementor extends MethodMappingImplementor
} else {
receiver = gen.singleNameReference(ROLE_VAR_NAME);
needRoleVar = true;
-
+
// receiver for private method (doesn't exist in ifc-part) needs to be casted to the class.
// Scope.findMethod() takes care of visibility if isMethodMappingWrapper() is detected.
if (roleMethodBinding.isPrivate())
@@ -563,7 +563,7 @@ public class CallinImplementor extends MethodMappingImplementor
// with CastExpression.RAW a RawTypeBinding might occur that is not recognized by Scope.findMethod()
// see testA12_genericRoleFeature16f() which reports bogus visibility problem is RAW is used.
}
-
+
//MyRole _OT$role = _OT$liftToMyRole(_OT$base_arg);
if (needRoleVar)
tryStatements.add(createLiftedRoleVar(callinBindingDeclaration, roleModel, baseTypeBinding, otBaseArg, gen));
@@ -633,11 +633,11 @@ public class CallinImplementor extends MethodMappingImplementor
// $endif
Expression roleMessageSendExpression = roleMessageSend;
-
+
if (roleMethodBinding.returnType.isArrayType()) {
// if return from role method requires array-lowering, we must determine how to access the team (receiver of lowering-method):
TypeBinding returnLeaf = roleMethodBinding.returnType.leafComponentType();
- findEnclosingTeam:
+ findEnclosingTeam:
if (returnLeaf.isRole()) {
ReferenceBinding returnEnclosing = returnLeaf.enclosingType(); // the team type containing the returned role
ReferenceBinding currentType = roleModel.getBinding();
@@ -655,7 +655,7 @@ public class CallinImplementor extends MethodMappingImplementor
tryStatements.add(gen.assignment(
gen.singleNameReference(IOTConstants.OT_RESULT),
roleMessageSendExpression));
-
+
// ResultNotProvidedException?
if (isReturnBoxed && !callinBindingDeclaration.isResultMapped)
{
@@ -677,7 +677,7 @@ public class CallinImplementor extends MethodMappingImplementor
tryStatements.add(
stepOverGen.returnStatement(stepOverGen.singleNameReference(IOTConstants.OT_RESULT)));
}
-
+
TryStatement tryFinally = gen.tryFinally(
tryStatements.toArray(new Statement[tryStatements.size()]),
new Statement[] {resetFlag});
@@ -755,11 +755,11 @@ public class CallinImplementor extends MethodMappingImplementor
IOTConstants.SET_EXECUTING_CALLIN,
new Expression[] { stepOverGen.singleNameReference(OLD_IS_EXECUTING)} );
}
- private Statement createLiftedRoleVar(CallinMappingDeclaration callinBindingDeclaration,
+ private Statement createLiftedRoleVar(CallinMappingDeclaration callinBindingDeclaration,
RoleModel roleModel,
- ReferenceBinding baseTypeBinding,
- char[] otBaseArg,
- AstGenerator gen)
+ ReferenceBinding baseTypeBinding,
+ char[] otBaseArg,
+ AstGenerator gen)
{
MessageSend liftCall = Lifting.liftCall(
callinBindingDeclaration.scope,
@@ -1099,7 +1099,7 @@ public class CallinImplementor extends MethodMappingImplementor
public void run() {
if (srcPos != -1)
sourceMethodSpec.argNeedsTranslation[srcPos] = true;
- implementationMethodSpec.argNeedsTranslation[srcIdx] = true;
+ implementationMethodSpec.argNeedsTranslation[srcIdx] = true;
}});
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java
index 6a9e2cdb9..65d6b4750 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java
@@ -1,17 +1,17 @@
-/**
+/**
* This file is part of "Object Teams Development Tooling"-Software
- *
+ *
* Copyright 2009, 2019 Stephan Herrmann
- *
+ *
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Please visit http://www.eclipse.org/objectteams for updates and contact.
- *
+ *
* Contributors: Stephan Herrmann - Initial API and implementation
**********************************************************************/
package org.eclipse.objectteams.otdt.internal.core.compiler.mappings;
@@ -85,8 +85,8 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.RoleTypeCreator;
/**
* This class translates callin binding to the dynamic weaving strategy.
- * This strategy is enabled by defining the property <code>ot.weaving=dynamic</code>
- *
+ * This strategy is enabled by defining the property <code>ot.weaving=dynamic</code>
+ *
* @author stephan
* @since 1.3.0M3
*/
@@ -105,7 +105,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
public static final char[] OT_CALL_ORIG_STATIC = "_OT$callOrigStatic".toCharArray(); //$NON-NLS-1$
private static final char[] OT_TERMINAL_CALL_NEXT = "_OT$terminalCallNext".toCharArray(); //$NON-NLS-1$
-
+
// variable names (arguments ...)
static final char[] TEAMS = "teams".toCharArray(); //$NON-NLS-1$
static final char[] INDEX = "index".toCharArray(); //$NON-NLS-1$
@@ -116,7 +116,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
static final char[] RESULT = "result".toCharArray(); //$NON-NLS-1$
static final String LOCAL_ROLE = "local$role$"; //$NON-NLS-1$
static final char[] _BASE$ = "_base$".toCharArray(); //$NON-NLS-1$
-
+
// for call next:
private static final char[] BASE_CALL_ARGS = "baseCallArguments".toCharArray(); //$NON-NLS-1$
private static final char[] BASE_CALL_FLAGS = "baseCallFlags".toCharArray(); //$NON-NLS-1$
@@ -130,12 +130,12 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
static final char[] CATCH_ARG = "_OT$caughtException".toCharArray(); //$NON-NLS-1$
-
+
private ClassScope _roleScope;
/**
* Main entry from Dependencies - roles.
- *
+ *
* Generates the byte code attributes.
*/
public void transformRole(RoleModel role)
@@ -143,7 +143,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
this._role = role;
this._roleScope = role.getAst().scope; // we definitely have an AST here
this.bindingDirection = TerminalTokens.TokenNameBINDIN;
-
+
AbstractMethodMappingDeclaration[] methodMappings = this._role.getAst().callinCallouts;
if(methodMappings == null || methodMappings.length == 0)
{
@@ -264,7 +264,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
((PotentialLiftExpression)liftExpr).onLiftingRequired(new Runnable() {@Override
public void run() {
sourceMethodSpec.argNeedsTranslation[srcPos] = true;
- implementationMethodSpec.argNeedsTranslation[srcIdx] = true;
+ implementationMethodSpec.argNeedsTranslation[srcIdx] = true;
}});
}
@@ -281,16 +281,16 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
if (cu == null) return expression; // FIXME: do we need a fallback when cu is built from model?
final Parser parser = new Parser(scope.problemReporter(), false);
char[] source = cu.getContents();
- return parser.parseExpression(source, expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1,
+ return parser.parseExpression(source, expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1,
scope.referenceCompilationUnit(), false /* record line separators */);
}
/**
* Main entry from Dependencies - teams.
- *
+ *
* Creates the dispatch methods.
*/
- public void transformTeam(TeamModel aTeam)
+ public void transformTeam(TeamModel aTeam)
{
List<CallinMappingDeclaration> beforeMappings = new ArrayList<CallinMappingDeclaration>();
List<CallinMappingDeclaration> replaceMappings = new ArrayList<CallinMappingDeclaration>();
@@ -327,7 +327,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
generateCallOrigStatic(mappingsWithStaticBase, aTeam);
}
- private void generateDispatchMethod(char[] methodName, final boolean isReplace, final boolean isAfter, final List<CallinMappingDeclaration> callinDecls, final TeamModel aTeam)
+ private void generateDispatchMethod(char[] methodName, final boolean isReplace, final boolean isAfter, final List<CallinMappingDeclaration> callinDecls, final TeamModel aTeam)
{
// FIXME(SH): once we know that Team has empty implementations (and checked cases involving team inheritance)
// we probably want to avoid generating empty methods here.
@@ -337,7 +337,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
final AstGenerator gen = new AstGenerator(teamDecl);
gen.replaceableEnclosingClass = teamDecl.binding;
-
+
// public void _OT$callBefore (IBoundBase2 base, int boundMethodId, int callinId, Object[] args)
// public void _OT$callAfter (IBoundBase2 base, int boundMethodId, int callinId, Object[] args, Object result)
// public void _OT$callReplace (IBoundBase2 base, Team[] teams, int index, int boundMethodId, int[] callinIds, Object[] args)
@@ -346,7 +346,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
length = 6;
else if (isAfter)
length = 5;
- Argument[] arguments = new Argument[length];
+ Argument[] arguments = new Argument[length];
int a = 0;
arguments[a++] = gen.argument(_BASE$, gen.qualifiedTypeReference(IOTConstants.ORG_OBJECTTEAMS_IBOUNDBASE2));
if (isReplace)
@@ -360,17 +360,17 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
arguments[a++] = gen.argument(ARGUMENTS, gen.qualifiedArrayTypeReference(TypeConstants.JAVA_LANG_OBJECT, 1));
if (isAfter)
arguments[a++] = gen.argument(_OT_RESULT, gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT));
-
+
TypeReference returnTypeRef = isReplace ? gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT) : gen.typeReference(TypeBinding.VOID);
-
+
final MethodDeclaration callMethod = gen.method(teamDecl.compilationResult, AccPublic, returnTypeRef, methodName, arguments);
callMethod.isMappingWrapper = AbstractMethodDeclaration.WrapperKind.CALLIN;
-
+
AstEdit.addMethod(teamDecl, callMethod);
MethodModel.addCallinFlag(callMethod, IOTConstants.CALLIN_FLAG_WRAPPER);
callMethod.model._declaringMappings = callinDecls;
-
+
MethodModel.getModel(callMethod).setStatementsGenerator(new AbstractStatementsGenerator() {
@Override
@@ -387,15 +387,15 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
SwitchStatement switchStat = new SwitchStatement();
switchStat.expression =
- isReplace
+ isReplace
? gen.arrayReference(gen.singleNameReference(CALLIN_ID), gen.singleNameReference(INDEX)) // switch(callinId[index]) { ...
: gen.singleNameReference(CALLIN_ID); // switch(callinId) { ...
-
+
// statements for the body of the switchStatement:
List<Statement> statements = new ArrayList<Statement>();
// count callins:
- for (CallinMappingDeclaration callinDecl : callinDecls)
+ for (CallinMappingDeclaration callinDecl : callinDecls)
for (MethodSpec baseSpec : callinDecl.baseMethodSpecs)
baseSpec.getCallinId(aTeam, callinDecl.explicitName());
int callinIdCount = teamDecl.getTeamModel().getCallinIdCount();
@@ -404,7 +404,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
// do we need to catch LiftingFailedException?
boolean canLiftingFail = false;
// one case block per callin mapping:
- for (CallinMappingDeclaration callinDecl : callinDecls)
+ for (CallinMappingDeclaration callinDecl : callinDecls)
{
if (callinDecl.ignoreFurtherInvestigation)
continue;
@@ -420,40 +420,40 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
// one case label per bound base method:
for (MethodSpec baseSpec : callinDecl.baseMethodSpecs) {
int callinID = baseSpec.getCallinId(aTeam, callinDecl.name);
- statements.add(callinGen.caseStatement(callinGen.intLiteral(callinID))); // case <baseMethod.callinId>:
+ statements.add(callinGen.caseStatement(callinGen.intLiteral(callinID))); // case <baseMethod.callinId>:
handledCallinIds[callinID] = true;
PredicateGenerator predGen = new PredicateGenerator(
callinDecl.binding._declaringRoleClass,
callinDecl.isReplaceCallin());
-
+
TypeBinding baseReturn = baseSpec.resolvedType();
boolean isStaticRoleMethod = callinDecl.getRoleMethod().isStatic();
ReferenceBinding roleType = callinDecl.scope.enclosingSourceType();
if (roleType.isGenericType()) // cannot handle generic role in this generated code
roleType = (ReferenceBinding) callinDecl.scope.environment().convertToRawType(roleType, false);
MethodBinding roleMethodBinding = callinDecl.getRoleMethod();
-
+
boolean needLiftedRoleVar = !isStaticRoleMethod
&& roleType.isCompatibleWith(roleMethodBinding.declaringClass);
-
+
List<Statement> blockStatements = new ArrayList<Statement>();
// do we need to expose _OT$result as result?
char[] resultName = null;
if (callinDecl.callinModifier == TerminalTokens.TokenNameafter
- && (callinDecl.mappings != null || callinDecl.predicate != null)
+ && (callinDecl.mappings != null || callinDecl.predicate != null)
&& baseReturn != TypeBinding.VOID) {
resultName = RESULT;
- callinDecl.resultVar = callinGen.localBaseVariable(RESULT, baseReturn, // BaseReturnType result = (BaseReturnType)_OT$result;
+ callinDecl.resultVar = callinGen.localBaseVariable(RESULT, baseReturn, // BaseReturnType result = (BaseReturnType)_OT$result;
callinGen.createCastOrUnboxing(callinGen.singleNameReference(_OT_RESULT), baseReturn, true/*baseAccess*/));
blockStatements.add(callinDecl.resultVar);
}
// expose casted _base$ as "base":
blockStatements.add(callinGen.localVariable(IOTConstants.BASE,
callinGen.alienScopeTypeReference(callinGen.baseTypeReference(roleType.baseclass()),callinDecl.scope),
- callinGen.castExpression(callinGen.baseNameReference(_BASE$),
- callinGen.alienScopeTypeReference(callinGen.baseTypeReference(roleType.baseclass()),callinDecl.scope),
+ callinGen.castExpression(callinGen.baseNameReference(_BASE$),
+ callinGen.alienScopeTypeReference(callinGen.baseTypeReference(roleType.baseclass()),callinDecl.scope),
CastExpression.RAW)));
// -------------- base predicate check -------
@@ -485,9 +485,9 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
char[] roleVar = null;
if (!isStaticRoleMethod) {
if (needLiftedRoleVar) {
-
+
canLiftingFail |= checkLiftingProblem(teamDecl, callinDecl, roleType);
-
+
roleVar = (LOCAL_ROLE+statements.size()).toCharArray();
TypeReference roleTypeReference = callinGen.roleTypeReference(teamDecl.getTeamModel().getTThis(), roleType, 0);
blockStatements.add(callinGen.localVariable(roleVar, // RoleType local$n = this._OT$liftToRoleType((BaseType)base);
@@ -509,7 +509,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
} else {
receiver = callinGen.singleNameReference(callinDecl.getRoleMethod().declaringClass.sourceName());
}
-
+
int baseArgOffset = 0;
if (baseSpec.isCallin()) baseArgOffset+=MethodSignatureEnhancer.getEnhancingArgLen(WeavingScheme.OTDRE);
if (baseSpec.isStatic() && baseSpec.getDeclaringClass().isRole()) baseArgOffset+=2;
@@ -540,7 +540,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
}
}
}
-
+
// -- assemble arguments:
TypeBinding[] roleParams = callinDecl.roleMethodSpec.resolvedParameters();
Expression[] callArgs = new Expression [roleParams.length + (isReplace ? MethodSignatureEnhancer.getEnhancingArgLen(WeavingScheme.OTDRE) : 0)];
@@ -548,10 +548,10 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
if (isReplace)
for (char[] argName : REPLACE_ARG_NAMES)
callArgs[idx++] = callinGen.singleNameReference(argName); // prepare: base, teams, boundMethodId, callinIds, index, arguments ...
-
+
// prepare parameter mappings:
callinDecl.traverse(new ReplaceResultReferenceVisitor(callinDecl), callinDecl.scope.classScope());
-
+
boolean hasArgError = false;
for (int i=0; i<roleParams.length; i++) {
Expression arg;
@@ -606,10 +606,10 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
localTypeRef = callinGen.typeReference(roleParam.erasure()); // cannot explicitly mention this TVB
else
localTypeRef = callinGen.typeReference(roleParam);
-
+
arg = getArgument(callinDecl, // prepare: <mappedArg<n>>
(MethodDeclaration) methodDecl,
- callinDecl.getRoleMethod().parameters,
+ callinDecl.getRoleMethod().parameters,
i+idx,
baseSpec,
roleVar);
@@ -619,7 +619,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
}
if (Lifting.isLiftToMethodCall(arg))
canLiftingFail |= checkLiftingProblem(teamDecl, callinDecl, roleType);
- boolean isBaseReference = arg instanceof SingleNameReference
+ boolean isBaseReference = arg instanceof SingleNameReference
&& CharOperation.equals(((SingleNameReference)arg).token, IOTConstants.BASE);
if (needLiftedRoleVar)
arg = new PotentialRoleReceiverExpression(arg, roleVar, callinGen.typeReference(roleType.getRealClass()));
@@ -630,13 +630,13 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
char[] localName = (OT_LOCAL+i).toCharArray(); // RoleParamType _OT$local$n = preparedArg<n>;
blockStatements.add(callinGen.localVariable(localName, callinGen.alienScopeTypeReference(localTypeRef, callinDecl.scope), arg));
callArgs[i+idx] = callinGen.singleNameReference(localName); // prepare: ... _OT$local$ ...
-
+
}
if (hasArgError)
continue;
// -- role side predicate:
- Expression[] predicateArgs = isReplace
+ Expression[] predicateArgs = isReplace
? MethodSignatureEnhancer.retrenchBasecallArguments(callArgs, true, WeavingScheme.OTDRE)
: callArgs;
predicateArgs = maybeAddResultReference(callinDecl, predicateArgs, resultName, callinGen);
@@ -650,17 +650,17 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
if (rolePredicateCheck != null)
// predicateCheck(_OT$role)
blockStatements.add(rolePredicateCheck);
-
+
// -- assemble the method call: // local$n.roleMethod((ArgType0)args[0], .. (ArgTypeN)args[n]);
boolean lhsResolvesToTeamMethod = TypeBinding.equalsEquals(callinDecl.getRoleMethod().declaringClass, roleType.enclosingType()); // TODO(SH): more levels
// (callin positions for error reporting:)
MessageSend roleMethodCall = (callinDecl.getRoleMethod().isPrivate() && !lhsResolvesToTeamMethod)
- ? new PrivateRoleMethodCall(receiver, callinDecl.roleMethodSpec.selector, callArgs, false/*c-t-f*/,
+ ? new PrivateRoleMethodCall(receiver, callinDecl.roleMethodSpec.selector, callArgs, false/*c-t-f*/,
callinDecl.scope, roleType, callinDecl.getRoleMethod(), callinGen)
: callinGen.messageSend(receiver, callinDecl.roleMethodSpec.selector, callArgs);
roleMethodCall.isGenerated = true; // for PrivateRoleMethodCall
roleMethodCall.isPushedOutRoleMethodCall = true;
-
+
// -- post processing:
Statement[] messageSendStatements;
if (isReplace) {
@@ -684,7 +684,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
if (isResultBoxed)
result = callinGen.createUnboxing(result, (BaseTypeBinding) baseReturn);
Expression mappedResult = callinDecl.getResultExpression(baseSpec, isResultBoxed, callinGen/*stepOverGen*/);
- if (!isStaticRoleMethod)
+ if (!isStaticRoleMethod)
mappedResult = new PotentialRoleReceiverExpression(
mappedResult,
roleVar,
@@ -700,14 +700,14 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
if (isResultBoxed) { // $if_need_result_unboxing$
messageSendStatements = new Statement[] {
callinGen.localVariable(IOTConstants.OT_RESULT, // Object _OT$result = role.roleMethod(args);
- callinGen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT),
+ callinGen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT),
result),
CallinImplementor.genResultNotProvidedCheck( // if (_OT$result == null)
teamDecl.binding.readableName(), // throw new ResultNotProvidedException(..)
roleType.readableName(),
- roleMethodBinding,
- roleType.baseclass(),
- baseSpec,
+ roleMethodBinding,
+ roleType.baseclass(),
+ baseSpec,
callinGen),
callinGen.returnStatement(callinGen.singleNameReference(IOTConstants.OT_RESULT)) // return _OT$result;
};
@@ -724,7 +724,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
// assemble:
// try { roleMessageSend(); }
// catch(Exception _OT$caughtException) { throw new SneakyException(_OT$caughtException); }
- // finally { _OT$setExecutingCallin(_OT$oldIsExecutingCallin); }
+ // finally { _OT$setExecutingCallin(_OT$oldIsExecutingCallin); }
blockStatements.add(protectRoleMethodCall(messageSendStatements, roleMethodBinding, stepIntoGen));
statements.add(callinGen.block(blockStatements.toArray(new Statement[blockStatements.size()])));
// collectively report the problem(s)
@@ -732,7 +732,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
for (Map.Entry<ReferenceBinding, Integer> entry : callinDecl.rolesWithLiftingProblem.entrySet())
callinDecl.scope.problemReporter().callinDespiteLiftingProblem(entry.getKey(), entry.getValue(), callinDecl);
}
- } // END for (CallinMappingDeclaration callinDecl : callinDecls)
+ } // END for (CallinMappingDeclaration callinDecl : callinDecls)
boolean needSuperCall = false;
// do we have a relevant super team, which possibly defines more callins?
@@ -779,32 +779,32 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
Statement catchStatement1 = gen.emptyStatement();
Statement catchStatement2 = gen.emptyStatement();
- if (isReplace) {
+ if (isReplace) {
// default: callNext:
Expression[] callArgs = new Expression[REPLACE_ARG_NAMES.length+2];
for (int idx=0; idx < REPLACE_ARG_NAMES.length; idx++)
callArgs[idx] = gen.singleNameReference(REPLACE_ARG_NAMES[idx]);
callArgs[callArgs.length-2] = gen.nullLiteral(); // no explicit baseCallArguments
- callArgs[callArgs.length-1] = gen.intLiteral(0); // not a base call
+ callArgs[callArgs.length-1] = gen.intLiteral(0); // not a base call
statements.add(gen.caseStatement(null)); // default:
statements.add(gen.returnStatement( // return _OT$callNext(..);
stepIntoGen.messageSend(
- stepIntoGen.qualifiedThisReference(aTeam.getBinding()),
- OT_CALL_NEXT,
+ stepIntoGen.qualifiedThisReference(aTeam.getBinding()),
+ OT_CALL_NEXT,
callArgs)));
catchStatement1 = gen.returnStatement(
stepIntoGen.messageSend(
- stepIntoGen.qualifiedThisReference(aTeam.getBinding()),
- OT_CALL_NEXT,
+ stepIntoGen.qualifiedThisReference(aTeam.getBinding()),
+ OT_CALL_NEXT,
callArgs));
catchStatement2 = gen.returnStatement(
stepIntoGen.messageSend(
- stepIntoGen.qualifiedThisReference(aTeam.getBinding()),
- OT_CALL_NEXT,
+ stepIntoGen.qualifiedThisReference(aTeam.getBinding()),
+ OT_CALL_NEXT,
callArgs));
}
-
+
// ==== overall assembly: ====
switchStat.statements = statements.toArray(new Statement[statements.size()]);
Argument[] exceptionArguments;
@@ -822,7 +822,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
gen.argument("ex".toCharArray(), //$NON-NLS-1$
gen.qualifiedTypeReference(IOTConstants.ORG_OBJECTTEAMS_LIFTING_VETO))
};
- exceptionStatementss = new Statement[][]{{catchStatement1}};
+ exceptionStatementss = new Statement[][]{{catchStatement1}};
}
tryStats.add(switchStat);
@@ -871,9 +871,9 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
}
return predicateArgs;
}
-
+
private void generateCallNext(final List<CallinMappingDeclaration> callinDecls, final TeamModel aTeam) {
- // public Object _OT$callNext(IBoundBase2 baze, Team[] teams, int idx, int[] callinIds, int boundMethodId, Object[] args, Object[] baseCallArgs)
+ // public Object _OT$callNext(IBoundBase2 baze, Team[] teams, int idx, int[] callinIds, int boundMethodId, Object[] args, Object[] baseCallArgs)
final TypeDeclaration teamDecl = aTeam.getAst();
if (teamDecl == null) return;
final AstGenerator gen = new AstGenerator(teamDecl);
@@ -891,17 +891,17 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
Expression[] superArgs = new Expression[args.length];
for (int i=0; i<args.length;i++)
superArgs[i] = gen.singleNameReference(args[i].name);
-
+
MethodDeclaration decl = gen.method(teamDecl.compilationResult,
AccPublic,
gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT),
OT_CALL_NEXT,
args);
-
+
// the payload: reverse parameter mappings:
SwitchStatement swStat = new SwitchStatement();
swStat.expression = gen.arrayReference(gen.singleNameReference(CALLIN_ID), gen.singleNameReference(INDEX)); // switch(callinId[index]) { ...
- List<Statement> swStatements = new ArrayList<Statement>();
+ List<Statement> swStatements = new ArrayList<Statement>();
char[] resultVar = RESULT;
for (CallinMappingDeclaration mapping : callinDecls) {
int nLabels = 0;
@@ -914,9 +914,9 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
for (int i=0; i<roleParams.length; i++)
if (roleParams[i].isRole() && TeamModel.isTeamContainingRole(teamDecl.binding, (ReferenceBinding) roleParams[i]))
roleParams[i] = TeamModel.strengthenRoleType(teamDecl.binding, roleParams[i]);
-
+
List<Statement> repackingStats = new ArrayList<Statement>();
-
+
if (mapping.positions != null) {
int[] poss = mapping.positions;
nLabels = caseBlockStats.size();
@@ -928,7 +928,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
for (int i=0; i<poss.length; i++)
// arguments[basepos] = baseCallArguments[i]
if (poss[i] > 0) {
- // FIXME(SH): this is cheating: should obtain translation info from actual
+ // FIXME(SH): this is cheating: should obtain translation info from actual
// parameter mapping (see cast in test432_expressionInReplaceParameterMapping11)
TypeBinding roleSideParameter = roleParams[i];
TypeBinding baseSideParameter = baseSpec.resolvedParameters()[poss[i]-1];
@@ -959,10 +959,10 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
basecallArg));
}
}
- caseBlockStats.add(gen.ifStatement(gen.nullCheck(gen.singleNameReference(BASE_CALL_ARGS)), // if (baseCallArgs == null) {} { arguments[i] = ...; ... }
+ caseBlockStats.add(gen.ifStatement(gen.nullCheck(gen.singleNameReference(BASE_CALL_ARGS)), // if (baseCallArgs == null) {} { arguments[i] = ...; ... }
gen.emptyStatement(),
gen.block(repackingStats.toArray(new Statement[repackingStats.size()]))));
-
+
Expression result = genSuperCallNext(gen, teamDecl.binding, superArgs); // return cast+lift?(super._OT$callNext(..));
if (baseSpec.returnNeedsTranslation) {
// lifting:
@@ -978,8 +978,8 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
: genTeamThis(gen, returnTypes[0]);
resultVar = CharOperation.append(resultVar, '$');
caseBlockStats.add(gen.localVariable(resultVar, gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT), result));
- caseBlockStats.add(gen.ifStatement(gen.equalExpression(gen.singleNameReference(BASE_CALL_FLAGS), gen.intLiteral(0), OperatorIds.NOT_EQUAL),
- gen.assignment(gen.singleNameReference(resultVar),
+ caseBlockStats.add(gen.ifStatement(gen.equalExpression(gen.singleNameReference(BASE_CALL_FLAGS), gen.intLiteral(0), OperatorIds.NOT_EQUAL),
+ gen.assignment(gen.singleNameReference(resultVar),
Lifting.liftCall(mapping.scope,
liftReceiver,
gen.castExpression(gen.singleNameReference(resultVar),
@@ -993,7 +993,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
result = gen.singleNameReference(resultVar);
}
caseBlockStats.add(gen.returnStatement(result));
-
+
if (caseBlockStats.size() > nLabels) { // any action added ?
swStatements.addAll(caseBlockStats);
}
@@ -1001,7 +1001,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
}
if (swStatements.size() == 0)
return; // don't add useless method
-
+
swStat.statements = swStatements.toArray(new Statement[swStatements.size()]);
decl.statements = new Statement[] {
swStat,
@@ -1053,7 +1053,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
};
return gen.tryCatch(
statements,
- new Argument[] {catch1Arg, catch2Arg},
+ new Argument[] {catch1Arg, catch2Arg},
new Statement[][] {catch1Stat, catch2Stat});
}
@@ -1088,10 +1088,10 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT),
OT_CALL_ORIG_STATIC,
args);
-
+
SwitchStatement swStat = new SwitchStatement();
swStat.expression = gen.singleNameReference(CALLIN_ID); // switch(callinId) { ...
- List<Statement> swStatements = new ArrayList<Statement>();
+ List<Statement> swStatements = new ArrayList<Statement>();
for (CallinMappingDeclaration mapping : callinDecls) {
for (MethodSpec baseSpec : mapping.baseMethodSpecs) {
MethodBinding baseMethod = baseSpec.resolvedMethod;
@@ -1100,7 +1100,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
int callinId = baseSpec.getCallinId(aTeam, mapping.explicitName());
swStatements.add(gen.caseStatement(gen.intLiteral( callinId))); // case baseSpecCallinId:
Expression result = gen.fakeMessageSend(gen.baseTypeReference(baseClass), // return BaseClass._OT$callOrigStatic(boundMethodId, args);
- OT_CALL_ORIG_STATIC,
+ OT_CALL_ORIG_STATIC,
passThroughArgs,
baseMethod.declaringClass,
mapping.scope.getJavaLangObject());
@@ -1110,7 +1110,7 @@ public class CallinImplementorDyn extends MethodMappingImplementor {
} // } // end-switch
if (swStatements.size() == 0)
return; // don't add useless method
-
+
swStat.statements = swStatements.toArray(new Statement[swStatements.size()]);
decl.statements = new Statement[] {
swStat,
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CalloutImplementor.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CalloutImplementor.java
index 389af4bed..a7d8cd3a4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CalloutImplementor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CalloutImplementor.java
@@ -112,7 +112,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.TypeAnalyzer;
* set of locals.
* Where: createCallout links roleMethodSpec and wrapper
* getArgument links baseMethodSpec and wrapper (if not parameter mappings are given).
- *
+ *
* What: Callout to private members of a role-as-base require access via two bridges
* Why: private methods are not exposed in the ifc-part, implicit inheritance needs
* redirection via the team instance, fields need accessors anyway
@@ -323,7 +323,7 @@ public class CalloutImplementor extends MethodMappingImplementor
MethodBinding templateBinding,
CalloutMappingDeclaration calloutBindingDeclaration)
{
- IProtectable baseFeature = null;
+ IProtectable baseFeature = null;
MethodSpec baseMethodSpec = calloutBindingDeclaration.baseMethodSpec;
if (baseMethodSpec != null) // else syntax error?
baseFeature = calloutBindingDeclaration.isCalloutToField()
@@ -377,7 +377,7 @@ public class CalloutImplementor extends MethodMappingImplementor
}
if (calloutBindingDeclaration.binding.inferred == InferenceKind.NONE) { // don't advertise inferred callout via the interface.
- if (templateBinding.isStatic()) // no real ifc part for static method, fake it!
+ if (templateBinding.isStatic()) // no real ifc part for static method, fake it!
createInterfaceFakeStatic(templateBinding, calloutBindingDeclaration);
else if (((modifiers & AccPrivate) == 0) && !overridesExplicitNonRole) // also no ifc part for privates and methods from explicit non-role super
createAbstractRoleMethodDeclarationPart(templateBinding,
@@ -616,8 +616,8 @@ public class CalloutImplementor extends MethodMappingImplementor
case DYN_ACCESS:
baseAccess = CalloutImplementorDyn.baseAccessExpression(calloutDecl.scope, this._role, baseType, receiver, calloutDecl.baseMethodSpec, arguments, gen);
break;
- }
- }
+ }
+ }
boolean success = true;
ArrayList<Statement> statements = new ArrayList<Statement>(3);
@@ -926,7 +926,7 @@ public class CalloutImplementor extends MethodMappingImplementor
if (idx >= implParameters.length) // CLOVER: never true in jacks suite
return mappedArgExpr; // arg is invisible to receiver, don't lower
TypeBinding expectedType = implParameters[idx];
-
+
// if type is anchored to another arg of the same binding, we have to translate:
// 1.) is it a param-anchored type?
if (expectedType.leafComponentType() instanceof DependentTypeBinding) {
@@ -1323,9 +1323,9 @@ public class CalloutImplementor extends MethodMappingImplementor
callout.scope= new CallinCalloutScope(roleClass.scope, callout);
CallinCalloutBinding calloutBinding= callout.scope.createBinding(callout);
callout.resolveMethodSpecs(roleClass.getRoleModel(), baseclass, true);
-
+
calloutBinding.inferred= isSetter ? InferenceKind.FIELDSET : InferenceKind.FIELDGET;
- if (callout.baseMethodSpec.resolvedMethod != null) {
+ if (callout.baseMethodSpec.resolvedMethod != null) {
calloutBinding._baseMethods = new MethodBinding[] {callout.baseMethodSpec.resolvedMethod};
} else {
calloutBinding._baseField = ((FieldAccessSpec)callout.baseMethodSpec).resolvedField;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CalloutImplementorDyn.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CalloutImplementorDyn.java
index b9faf1451..6933f1825 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CalloutImplementorDyn.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CalloutImplementorDyn.java
@@ -1,17 +1,17 @@
/**********************************************************************
* This file is part of "Object Teams Development Tooling"-Software
- *
+ *
* Copyright 2011, 2015 GK Software AG and others.
- *
+ *
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Please visit http://www.eclipse.org/objectteams for updates and contact.
- *
+ *
* Contributors:
* Stephan Herrmann - Initial API and implementation
**********************************************************************/
@@ -38,7 +38,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.AstGenerator;
/**
* This class only contains those parts of callout generation that for
* dynamic weaving deviated from the normal strategy.
- *
+ *
* @author stephan
*/
public class CalloutImplementorDyn {
@@ -46,11 +46,11 @@ public class CalloutImplementorDyn {
// wrapper methods for decapsulating callout
public static final char[] OT_ACCESS = "_OT$access".toCharArray(); //$NON-NLS-1$
public static final char[] OT_ACCESS_STATIC = "_OT$accessStatic".toCharArray(); //$NON-NLS-1$
-
- public static Expression baseAccessExpression(Scope scope, RoleModel roleModel, ReferenceBinding baseType,
+
+ public static Expression baseAccessExpression(Scope scope, RoleModel roleModel, ReferenceBinding baseType,
Expression receiver, MethodSpec baseSpec, Expression[] arguments,
- AstGenerator gen)
+ AstGenerator gen)
{
char[] selector = ensureAccessor(scope, baseType, baseSpec.isStatic()).selector;
TeamModel teamModel = roleModel.getTeamModel();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/MethodMappingImplementor.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/MethodMappingImplementor.java
index eb27dae13..9d9520598 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/MethodMappingImplementor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/MethodMappingImplementor.java
@@ -84,13 +84,13 @@ public abstract class MethodMappingImplementor {
protected MethodMappingImplementor() {
// empty
}
-
+
MethodSignatureEnhancer getMethodSignatureEnhancer() {
if (this.methodSignatureEnhancer == null)
this.methodSignatureEnhancer = MethodSignatureEnhancer.variants[this._role.getWeavingScheme().ordinal()];
return this.methodSignatureEnhancer;
}
-
+
/**
* Make arguments for message send which implements a callout or a callin wrapper.
* For a callout mapping this method is used only if signatures are given
@@ -121,7 +121,7 @@ public abstract class MethodMappingImplementor {
if (methodMapping.isReplaceCallin())
((CallinMappingDeclaration)methodMapping).checkResultMapping();
}
-
+
Argument[] wrapperMethodArguments = wrapperMethodDeclaration.arguments;
Expression[] arguments = null;
@@ -143,7 +143,7 @@ public abstract class MethodMappingImplementor {
// in decapsulation scenarios OTREDyn uses non-static accessor for non-static fields
if (!baseFieldSpec.isSetter())
implementationArgLen = 0; // if resolved to a 4-arg _OT$access, don't consider these args during AST gen.
- } else if (this._role.getWeavingScheme() == WeavingScheme.OTRE
+ } else if (this._role.getWeavingScheme() == WeavingScheme.OTRE
&& !((FieldAccessSpec)methodMapping.getBaseMethodSpecs()[0]).isStatic()) {
// for OTRE, non-static field access is mapped to static method with additional first parameter _OT$base:
expressionsOffset = 1;
@@ -160,7 +160,7 @@ public abstract class MethodMappingImplementor {
gen.baseclassReference(baseType),
baseType.isRole() ? CastExpression.NEED_CLASS : CastExpression.RAW); // FIXME (see also CalloutImplementor.makeArguments)
}
- }
+ }
if (arguments == null) {
arguments = new Expression[implementationArgLen];
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/MethodMappingResolver.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/MethodMappingResolver.java
index 584d0569a..0eb7edd8c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/MethodMappingResolver.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/MethodMappingResolver.java
@@ -101,7 +101,7 @@ public class MethodMappingResolver
} else if (methodMapping.isCallin() && this._role.getBinding().baseclass().isInterface()) {
this._roleScope.problemReporter().callinBindingToInterface(methodMapping, this._role.getBinding().baseclass());
methodMapping.tagAsHavingErrors();
- this.resolveBaseMethods = false;
+ this.resolveBaseMethods = false;
}
}
@@ -131,7 +131,7 @@ public class MethodMappingResolver
result &= checkForDuplicateMethodMappings(roleMethodKey);
}
}
-
+
return result;
}
@@ -187,11 +187,11 @@ public class MethodMappingResolver
calloutMappingDeclaration.binding._roleMethodBinding = roleMethodBinding;
if (this.resolveBaseMethods) {
MethodSpec baseMethodSpec = calloutMappingDeclaration.baseMethodSpec;
- if ( baseMethodSpec != null) {
+ if ( baseMethodSpec != null) {
if (baseMethodSpec.resolvedMethod != null) {
calloutMappingDeclaration.binding._baseMethods = new MethodBinding[]{baseMethodSpec.resolvedMethod};
} else if ( baseMethodSpec instanceof FieldAccessSpec
- && ((FieldAccessSpec)baseMethodSpec).resolvedField != null)
+ && ((FieldAccessSpec)baseMethodSpec).resolvedField != null)
{
calloutMappingDeclaration.binding._baseField = ((FieldAccessSpec)baseMethodSpec).resolvedField;
} else {
@@ -200,11 +200,11 @@ public class MethodMappingResolver
}
}
}
- if ( roleMethodBinding != null
+ if ( roleMethodBinding != null
&& (roleMethodBinding.isValidBinding()
|| (roleMethodBinding.problemId() == ProblemReasons.NotFound && calloutMappingDeclaration.hasSignature))) // short-hand, method will be generated
{
- // store the methodMapping in a map indexed by the role method's name&signature
+ // store the methodMapping in a map indexed by the role method's name&signature
// for later duplication check.
String methodKey = String.valueOf(CharOperation.concat(roleMethodBinding.selector, roleMethodBinding.signature()));
List<CalloutMappingDeclaration> mappings = this._foundRoleMethods.get(methodKey);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/FieldModel.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/FieldModel.java
index ee1844784..db9c17f3a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/FieldModel.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/FieldModel.java
@@ -153,8 +153,8 @@ public class FieldModel extends ModelElement {
AnchorUsageRanksAttribute attr = (AnchorUsageRanksAttribute) getAttribute(ANCHOR_USAGE_RANKS);
attr.addUsageRank(rank);
}
-
- /** Create a faked method binding for a getAccessor to a given base field.
+
+ /** Create a faked method binding for a getAccessor to a given base field.
* @param isGetter select getter or setter
*/
public static MethodBinding getDecapsulatingFieldAccessor(Scope scope,
@@ -167,11 +167,11 @@ public class FieldModel extends ModelElement {
MethodBinding accessor = isGetter ? model._decapsulatingGetter : model._decapsulatingSetter;
if (accessor != null)
return accessor;
-
+
if (strategy == ImplementationStrategy.DYN_ACCESS) {
accessor = CalloutImplementorDyn.ensureAccessor(scope, baseType, resolvedField.isStatic());
} else {
- TypeBinding[] argTypes = resolvedField.isStatic()
+ TypeBinding[] argTypes = resolvedField.isStatic()
? (isGetter
? new TypeBinding[0]
: new TypeBinding[]{resolvedField.type})
@@ -188,7 +188,7 @@ public class FieldModel extends ModelElement {
baseType.addMethod(accessor);
}
MethodModel.getModel(accessor)._fakeKind = FakeKind.BASE_FIELD_ACCESSOR;
- if (isGetter)
+ if (isGetter)
model._decapsulatingGetter = accessor;
else
model._decapsulatingSetter = accessor;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/MethodModel.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/MethodModel.java
index e5556e618..6812d725b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/MethodModel.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/MethodModel.java
@@ -70,8 +70,8 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.transfor
import org.eclipse.objectteams.otdt.internal.core.compiler.util.AstGenerator;
/**
- * A fragment of method {@link #toString()} has been copied from
- * {@link AbstractMethodDeclaration} of the Eclipse JDT.
+ * A fragment of method {@link #toString()} has been copied from
+ * {@link AbstractMethodDeclaration} of the Eclipse JDT.
*
* What: Flag abstract creation methods in non-abstract team
* Why: Must forbid their use.
@@ -119,13 +119,13 @@ public class MethodModel extends ModelElement {
private MethodBinding _binding = null;
private boolean _callsBaseCtor = false; // may be uninitialized before analyseCode
public int callinFlags = 0;
- // for method generated from one or more method mappings
+ // for method generated from one or more method mappings
// (otredyn implements multiple callins in common wrapper methods)
public List<CallinMappingDeclaration> _declaringMappings = null;
// for methods residing in a team but belonging to a role store the role type here:
public TypeDeclaration _sourceDeclaringType = null;
- // also what was originally a 'this' reference may now be passed as first argument:
+ // also what was originally a 'this' reference may now be passed as first argument:
public Argument _thisSubstitution;
// for creation methods store the original constructor here:
@@ -415,7 +415,7 @@ public class MethodModel extends ModelElement {
public boolean hasBytes() {
if (this._bytes == null)
setupByteCode(false);
- return this._bytes != null;
+ return this._bytes != null;
}
public int getStructOffset() {
return this._structOffset;
@@ -513,7 +513,7 @@ public class MethodModel extends ModelElement {
model.setCallsBaseCtor();
}
- /**
+ /**
* Does the method contain a call to a base constructor?
* Note: don't call before analyseCode because we may need our tsupers to be analysed, too.
*/
@@ -735,7 +735,7 @@ public class MethodModel extends ModelElement {
return handledRoles;
}
- /**
+ /**
* Try to create an AST generator that assigns remapped positions (SMAP).
* @param hostTypeDecl type declaration that will hold the generated byte code
* @param srcTypeBinding type holding the declaration from which this method is generated
@@ -743,7 +743,7 @@ public class MethodModel extends ModelElement {
* @param srcPos start position within the source type correspongind to this method.
* @return either a re-mapping AstGenerator or null (if line number information is not available).
*/
- public AstGenerator getSynthPosGen(TypeDeclaration hostTypeDecl, ReferenceBinding srcTypeBinding, CompilationResult srcCompilationResult, int srcPos)
+ public AstGenerator getSynthPosGen(TypeDeclaration hostTypeDecl, ReferenceBinding srcTypeBinding, CompilationResult srcCompilationResult, int srcPos)
{
int[] lineSeparatorPositions = srcCompilationResult.lineSeparatorPositions;
if (lineSeparatorPositions != null) {
@@ -751,8 +751,8 @@ public class MethodModel extends ModelElement {
int sourceLineNumber = Util.getLineNumber(srcPos, lineSeparatorPositions, 0, lineSeparatorPositions.length-1);
LineNumberProvider lineNumberProvider = TypeModel.getLineNumberProvider(hostTypeDecl);
LineInfo mappedLineInfo = lineNumberProvider.addLineInfo(srcTypeBinding, sourceLineNumber, 1);
-
- CompilationResult hostCompilationResult = hostTypeDecl.compilationResult;
+
+ CompilationResult hostCompilationResult = hostTypeDecl.compilationResult;
int mappedSourceStart = hostCompilationResult.requestSyntheticSourcePosition(mappedLineInfo.getOutputStartLine());
return new AstGenerator(mappedSourceStart, mappedSourceStart);
}
@@ -762,15 +762,15 @@ public class MethodModel extends ModelElement {
public static AstGenerator setupSourcePositionMapping(AbstractMethodDeclaration methodDecl,
TypeDeclaration hostTypeDecl,
RoleModel sourceRoleModel,
- AstGenerator defaultGen)
+ AstGenerator defaultGen)
{
TypeDeclaration sourceRoleDecl = sourceRoleModel.getAst();
if (sourceRoleDecl == null || sourceRoleDecl.isPurelyCopied)
return defaultGen; // don't have more detailed source positions
MethodModel model = methodDecl.getModel();
- AstGenerator gen = model.getSynthPosGen(hostTypeDecl,
+ AstGenerator gen = model.getSynthPosGen(hostTypeDecl,
sourceRoleModel.getBinding(),
- sourceRoleDecl.compilationResult,
+ sourceRoleDecl.compilationResult,
methodDecl.sourceStart);
if (gen != null) {
// re-position the method, these positions will be used by codeGen for generating line numbers:
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/RoleModel.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/RoleModel.java
index 9f1f346fd..a04322bd5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/RoleModel.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/RoleModel.java
@@ -106,10 +106,10 @@ public class RoleModel extends TypeModel
// Flag constants for tagBits:
// is parameterized type instantiated via tsuper-link?
public static final int IsViewedAsTSuper = ASTNode.Bit1;
-
+
// had the baseclass field/playedBy problems?
public static final int BaseclassHasProblems = ASTNode.Bit2;
-
+
// several issues making lifting impossible
public static final int HasLiftingProblem = ASTNode.Bit3;
@@ -178,7 +178,7 @@ public class RoleModel extends TypeModel
/** does this bound role have a binding ambiguity prohibiting lifting? */
public boolean _hasBindingAmbiguity = false;
-
+
/** is the baseclass an (indirect) enclosing class? */
public boolean _playedByEnclosing = false;
@@ -328,10 +328,10 @@ public class RoleModel extends TypeModel
return true;
return false;
}
-
+
public static void setTagBit(ReferenceBinding role, int tagBit) {
- role.roleModel.tagBits |= tagBit;
+ role.roleModel.tagBits |= tagBit;
}
public static boolean hasTagBit(ReferenceBinding typeBinding, int tagBit) {
@@ -1185,7 +1185,7 @@ public class RoleModel extends TypeModel
/**
* @param srcField a synthetic field from tsuper
- * @param newField the synthetic new field copy
+ * @param newField the synthetic new field copy
*/
public void addSyntheticFieldMapping(FieldBinding srcField, FieldBinding newField) {
this._syntheticMap.put(srcField, newField);
@@ -1412,7 +1412,7 @@ public class RoleModel extends TypeModel
CopyInheritance.copyGeneratedFeatures(this);
super.evaluateLateAttributes(state);
}
-
+
public synchronized void releaseClassFile() {
this._classFile= null;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java
index 8221cd121..26ee419be 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java
@@ -93,7 +93,7 @@ public class TeamModel extends TypeModel {
// can lifting fail due to role abstractness?
public static final int HasAbstractRelevantRole = ASTNode.Bit10;
-
+
// did a nested team require correction of team/role flags?
public static final int HasClassKindProblem = ASTNode.Bit11;
@@ -640,7 +640,7 @@ public class TeamModel extends TypeModel {
return anchor.getRoleTypeBinding(roleRefType, dimensions);
}
/**
- * Starting at site look for an enclosing type that is compatible to targetEnclosing.
+ * Starting at site look for an enclosing type that is compatible to targetEnclosing.
*/
public static ReferenceBinding strengthenEnclosing(ReferenceBinding site, ReferenceBinding targetEnclosing) {
ReferenceBinding currentEnclosing = site;
@@ -962,7 +962,7 @@ public class TeamModel extends TypeModel {
LookupEnvironment environment = this._ast.scope.environment();
for (Pair<MethodBinding, Integer> entry : existing) {
MethodBinding baseMethod = baseMethodSpec.resolvedMethod;
- if (baseMethod == entry.first
+ if (baseMethod == entry.first
|| MethodVerifier.doesMethodOverride(baseMethodSpec.resolvedMethod, entry.first, environment)) {
return entry.second;
}
@@ -1006,7 +1006,7 @@ public class TeamModel extends TypeModel {
recordCallinId(((OTDynCallinBindingsAttribute)attr).getCallinIdMax());
} else {
super.addOrMergeAttribute(attr);
- }
+ }
}
// SH}
public boolean isAmbiguousLifting(ReferenceBinding staticRole, ReferenceBinding baseBinding) {
@@ -1037,7 +1037,7 @@ public class TeamModel extends TypeModel {
public static interface UpdatableAccessId {
void update(int offset);
}
-
+
public static class UpdatableIntLiteral extends IntLiteral implements UpdatableAccessId {
int val;
public UpdatableIntLiteral(int val, int start, int end) {
@@ -1064,7 +1064,7 @@ public class TeamModel extends TypeModel {
/** Update all recorded accessIds to stay clear of id ranges used by super teams. */
public int updateDecapsAccessIds() {
if (this.accessIdOffset > -1 || getWeavingScheme() == WeavingScheme.OTRE) return this.accessIdOffset;
-
+
this.accessIdOffset = 0;
TeamModel superTeam = getSuperTeam();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TypeModel.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TypeModel.java
index 748bfaefe..9394e22f6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TypeModel.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TypeModel.java
@@ -124,7 +124,7 @@ public class TypeModel extends ModelElement {
* Version number of the compiler that created a (binary) type;
*/
public int _compilerVersion;
-
+
WeavingScheme weavingScheme;
public void setCompilerVersion(int version, WeavingScheme weavingScheme) {
@@ -166,7 +166,7 @@ public class TypeModel extends ModelElement {
|| this._binding.kind() == Binding.INTERSECTION_TYPE
|| this._binding.kind() == Binding.INTERSECTION_TYPE18)
return new TypeModel[0]; // has no members
-
+
if (this._binding.isUnresolvedType())
return new TypeModel[0]; // members unknown and cannot resolve here :(
@@ -547,7 +547,7 @@ public class TypeModel extends ModelElement {
this._lineNumberProvider = new LineNumberProvider(this._binding, this._maxLineNumber);
return this._lineNumberProvider;
}
-
+
public static LineNumberProvider getLineNumberProvider(TypeDeclaration type) {
if (type.isRole())
return type.getRoleModel().getLineNumberProvider();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/AbstractSmapGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/AbstractSmapGenerator.java
index 1ee3e8da3..fb26940e7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/AbstractSmapGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/AbstractSmapGenerator.java
@@ -40,7 +40,7 @@ public abstract class AbstractSmapGenerator
protected TypeDeclaration _type;
protected List <SmapStratum>_strata;
private String _defaultStratum;
-
+
private static String DEFAULT_PACKAGE=""; //$NON-NLS-1$
public AbstractSmapGenerator(TypeDeclaration type)
@@ -134,13 +134,13 @@ public abstract class AbstractSmapGenerator
pkgBinding = toplevelBinding.getPackage();
String pkgName = String.valueOf(pkgBinding.readableName());
pkgName = pkgName.replace('.',ISMAPConstants.OTJ_PATH_DELIMITER_CHAR);
-
+
if (pkgName != null && pkgName.length() > 0)
return pkgName + ISMAPConstants.OTJ_PATH_DELIMITER;
-
+
return DEFAULT_PACKAGE;
}
-
+
protected FileInfo getOrCreateFileInfoForType(SmapStratum stratum, ReferenceBinding typeBinding) {
String sourceName = String.valueOf(typeBinding.sourceName()) + ISMAPConstants.OTJ_JAVA_ENDING;
String absoluteSourceName = getPackagePathFromRefBinding(typeBinding) + sourceName;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/LineNumberProvider.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/LineNumberProvider.java
index 6bd413aa4..573db6fcb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/LineNumberProvider.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/LineNumberProvider.java
@@ -97,7 +97,7 @@ public class LineNumberProvider
{
if (!this._sourceToLineInfos.containsKey(copySrc))
this._sourceToLineInfos.put(copySrc, new Vector<LineInfo>());
-
+
List <LineInfo>lineInfos = this._sourceToLineInfos.get(copySrc);
int outputStartLine;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/RoleSmapGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/RoleSmapGenerator.java
index 0325019f7..d037e7dd5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/RoleSmapGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/smap/RoleSmapGenerator.java
@@ -143,7 +143,7 @@ public class RoleSmapGenerator extends AbstractSmapGenerator
{
LineNumberProvider provider = this._type.getRoleModel().getLineNumberProvider();
FileInfo fileInfo;
-
+
List<FileInfo> knownFileInfos = stratum.getFileInfos();
if (this._type.isPurelyCopied && !knownFileInfos.isEmpty()) {
fileInfo = knownFileInfos.get(0); // current type has no source, add special lines to existing fileInfo
@@ -151,7 +151,7 @@ public class RoleSmapGenerator extends AbstractSmapGenerator
fileInfo = getOrCreateFileInfoForType(stratum, getCUType(this._type.binding));
int[] lineSeparatorPositions = this._type.compilationResult.lineSeparatorPositions;
- int startLine = lineSeparatorPositions == null
+ int startLine = lineSeparatorPositions == null
? 1
: Util.getLineNumber(this._type.sourceStart, lineSeparatorPositions, 0, lineSeparatorPositions.length-1);
for (int idx = startLine; idx <= provider.getSourceEndLineNumber(); idx++)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/copyinheritance/CopyInheritance.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/copyinheritance/CopyInheritance.java
index b2c6707a7..12438f159 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/copyinheritance/CopyInheritance.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/copyinheritance/CopyInheritance.java
@@ -731,9 +731,9 @@ public class CopyInheritance implements IOTConstants, ClassFileConstants, ExtraC
&& !OTNameUtils.isTSuperMarkerInterface(name))
{
ReferenceBinding tsuperRole = superTeam.getMemberType(name);
- if ((tsuperRole == null ||
+ if ((tsuperRole == null ||
(!tsuperRole.isValidBinding() && tsuperRole.problemId() == ProblemReasons.NotFound))
- && superTeam instanceof SourceTypeBinding)
+ && superTeam instanceof SourceTypeBinding)
{
TypeDeclaration tsuperDecl = internalCheckCopyLateRoleFile(((SourceTypeBinding)superTeam), name);
if (tsuperDecl != null)
@@ -839,7 +839,7 @@ public class CopyInheritance implements IOTConstants, ClassFileConstants, ExtraC
subTeam.copyAttributeFrom(superTeam.getTeamModel(), OTDynCallinBindingsAttribute.ATTRIBUTE_NAME);
OTSpecialAccessAttribute attrib = (OTSpecialAccessAttribute)superTeam.getTeamModel().getAttribute(IOTConstants.OTSPECIAL_ACCESS);
if (attrib != null)
- attrib.addFieldAccessesTo(subTeam);
+ attrib.addFieldAccessesTo(subTeam);
}
/**
* If adjustSuperinterfaces updates a superinterface, we will check compatibility,
@@ -974,9 +974,9 @@ public class CopyInheritance implements IOTConstants, ClassFileConstants, ExtraC
// Synthetic methods are not read from byte code.
// FIXME(SH): this last note is not true any more.
- if ( targetRoleDecl.isTeam()
- &&
- ( ReflectionGenerator.isReflectionMethod(method)
+ if ( targetRoleDecl.isTeam()
+ &&
+ ( ReflectionGenerator.isReflectionMethod(method)
|| SerializationGenerator.isSerializationMethod(method)))
return;
if (MethodModel.isFakedMethod(method))
@@ -1105,14 +1105,14 @@ public class CopyInheritance implements IOTConstants, ClassFileConstants, ExtraC
if (methodFound != null)
TSuperHelper.addMarkerArg(newMethodDecl, srcTeam);
-
+
if(newMethodDecl.isConstructor()){
// comments (SH):
// other phases may depend on this field (constructorCall) being set,
// although it carries no real information.
ConstructorDeclaration cd = (ConstructorDeclaration)newMethodDecl;
cd.constructorCall = SuperReference.implicitSuperConstructorCall();
-
+
if ( Lifting.isLiftingCtor(method)
&& method.parameters[0].isRole())
{
@@ -1317,7 +1317,7 @@ public class CopyInheritance implements IOTConstants, ClassFileConstants, ExtraC
MethodBinding dstOrigMethod = ConstantPoolObjectMapper.mapMethod(srcMethod, srcMethod.targetMethod, null, targetTeamDecl.binding);
if (dstOrigMethod.isCallin())
dstMethod = tgtTypeDecl.binding.addSyntheticBaseCallSurrogate(dstOrigMethod);
- else
+ else
dstMethod = tgtTypeDecl.binding.addSyntheticMethod(dstOrigMethod, isSuperAccess);
break;
case SyntheticMethodBinding.BridgeMethod:
@@ -1413,7 +1413,7 @@ public class CopyInheritance implements IOTConstants, ClassFileConstants, ExtraC
AstConverter.createField(field, roleDeclaration, gen);
AstEdit.addField(roleDeclaration,fieldDeclaration, true, false/*typeProblem*/, false);
if (fieldDeclaration.binding != null) {
- fieldDeclaration.binding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
+ fieldDeclaration.binding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
fieldDeclaration.binding.modifiers |= (field.modifiers&ExtraCompilerModifiers.AccBlankFinal); // BlankFinal was omitted on the fieldDecl
}
@@ -1721,7 +1721,7 @@ public class CopyInheritance implements IOTConstants, ClassFileConstants, ExtraC
}
}
}
-
+
public static class RoleConstructorCall extends MessageSend {
public AllocationExpression allocationOrig;
@@ -2221,7 +2221,7 @@ public class CopyInheritance implements IOTConstants, ClassFileConstants, ExtraC
if (newType != argument.type)
{
changed = true;
-
+
newType.setBaseclassDecapsulation(argument.type.getBaseclassDecapsulation());
// local variable:
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/copyinheritance/TypeLevel.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/copyinheritance/TypeLevel.java
index cc394a5fd..18c5df401 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/copyinheritance/TypeLevel.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/copyinheritance/TypeLevel.java
@@ -76,17 +76,17 @@ public class TypeLevel {
// in earlier invocations as ClassScope.connectTeamMemberTypes(..) descends depth first
ReferenceBinding tsuperRole = tsuperRoles[tsuperRoles.length-1];
assert(tsuperRole.isDirectRole());
-
+
// don't bother with AST, we are called after hierarchies have been connected
// at the binding level.
mergeSuperinterfaces(superTeam, tsuperRole, destRole);
if (!roleDecl.isInterface())
copyAdjustSuperclass(tsuperRole, roleDecl, obligations);
copyBaseclass(tsuperRole, roleDecl);
-
+
} else {
// no tsupers to merge with, but still need to adjust the super class:
- copyAdjustSuperclass(null, roleDecl, obligations);
+ copyAdjustSuperclass(null, roleDecl, obligations);
}
adjustSuperinterfaces(superTeam, destRole, obligations);
@@ -317,7 +317,7 @@ public class TypeLevel {
*
* @param tsuperRole may be null
* @param destRoleDecl @pre: !isInterface()
- * @param obligations
+ * @param obligations
*/
static void copyAdjustSuperclass(ReferenceBinding tsuperRole, TypeDeclaration destRoleDecl, ArrayList<SupertypeObligation> obligations) {
if(tsuperRole != null) {
@@ -346,7 +346,7 @@ public class TypeLevel {
* @param destRoleDecl @pre: !isInterface()
* @param destTeam
* @param tsuperRole (may be null)
- * @param obligations record here any sub-type relations that need checking after all roles have been adjusted
+ * @param obligations record here any sub-type relations that need checking after all roles have been adjusted
*/
private static void checkAdjustSuperclass(
TypeDeclaration destRoleDecl,
@@ -373,7 +373,7 @@ public class TypeLevel {
&& !refineToTeam // an implicit extends to org.objectteams.Team is NOT dropped if the tsuper was not a team
&& ((newSuperclass.id == TypeIds.T_JavaLangObject) || destScope.isOrgObjectteamsTeam(newSuperclass))) // otherwise it was copied from a tsuper role
{
- newSuperclass = null; // drop default 'extends java.lang.Object' or o.o.Team
+ newSuperclass = null; // drop default 'extends java.lang.Object' or o.o.Team
}
// extends __OT_Confined overriding nothing or __OT__Confined is OK:
@@ -438,7 +438,7 @@ public class TypeLevel {
// and then only the old node has source positions..
}
}
-
+
// don't use TeamModel.strengthenRole because we don't want a RoleTypeBinding.
static ReferenceBinding strengthenSuper(ReferenceBinding destTeam, ReferenceBinding superRole) {
if (!superRole.isRole())
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/InsertTypeAdjustmentsVisitor.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/InsertTypeAdjustmentsVisitor.java
index 4c2938a4d..3d04d5ac4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/InsertTypeAdjustmentsVisitor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/InsertTypeAdjustmentsVisitor.java
@@ -155,8 +155,8 @@ public class InsertTypeAdjustmentsVisitor extends ASTVisitor {
if (syntheticAccessors != null) {
for (int i = 0; i < syntheticAccessors.length; i++) {
MethodBinding accessor = syntheticAccessors[i];
- if (accessor instanceof SyntheticMethodBinding
- && ((SyntheticMethodBinding)accessor).purpose == SyntheticMethodBinding.InferredCalloutToField)
+ if (accessor instanceof SyntheticMethodBinding
+ && ((SyntheticMethodBinding)accessor).purpose == SyntheticMethodBinding.InferredCalloutToField)
return; // already redirecting to base, prevent double-lowering
}
}
@@ -200,7 +200,7 @@ public class InsertTypeAdjustmentsVisitor extends ASTVisitor {
TypeBinding leafType = arrayInitializer.binding.elementsType();
for (int i = 0; i < expressions.length; i++)
expressions[i] = maybeWrap(scope, expressions[i], leafType);
- }
+ }
}
@Override
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/MethodSignatureEnhancer.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/MethodSignatureEnhancer.java
index 6af37ffc5..fa5dc3e2a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/MethodSignatureEnhancer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/MethodSignatureEnhancer.java
@@ -76,7 +76,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.AstGenerator;
@SuppressWarnings("nls")
public class MethodSignatureEnhancer implements IOTConstants, TypeConstants, ClassFileConstants
{
-
+
private final static char[] OBJECT_SIGNATURE = "Ljava/lang/Object;".toCharArray();
/**
@@ -88,9 +88,9 @@ public class MethodSignatureEnhancer implements IOTConstants, TypeConstants, Cla
/** Length of the sublist of enhancing arguments. */
public final int ENHANCING_ARG_LEN;
public final char[] UNUSED_ARGS;
-
+
public static MethodSignatureEnhancer[] variants = new MethodSignatureEnhancer[WeavingScheme.values().length];
-
+
private WeavingScheme weavingScheme;
// {OT/JamVM support:
@@ -105,8 +105,8 @@ public class MethodSignatureEnhancer implements IOTConstants, TypeConstants, Cla
this.weavingScheme = weavingScheme;
if (weavingScheme == WeavingScheme.OTDRE) {
this.ENHANCING_ARG_NAMES = new char[][] {
- "_OT$baseArg".toCharArray(),
- "_OT$teams".toCharArray(),
+ "_OT$baseArg".toCharArray(),
+ "_OT$teams".toCharArray(),
"_OT$index".toCharArray(),
"_OT$callinIds".toCharArray(),
"_OT$boundMethodId".toCharArray(),
@@ -132,7 +132,7 @@ public class MethodSignatureEnhancer implements IOTConstants, TypeConstants, Cla
this.UNUSED_ARGS = this.ENHANCING_ARG_NAMES[this.ENHANCING_ARG_LEN-1];
}
// SH}
-
+
/** Get Typebindings for all enhancing arguments. */
private static TypeBinding[] getEnhancingArgTypes (Scope scope) {
//{OTDyn: configurable:
@@ -142,8 +142,8 @@ public class MethodSignatureEnhancer implements IOTConstants, TypeConstants, Cla
scope.createArrayType(scope.getOrgObjectteamsITeam(), 1), // _OT$teams
TypeBinding.INT, // _OT$index
scope.createArrayType(TypeBinding.INT, 1), // _OT$callinIds
- TypeBinding.INT, // _OT$boundMethodId
- scope.createArrayType(scope.getJavaLangObject(), 1), // _OT$args
+ TypeBinding.INT, // _OT$boundMethodId
+ scope.createArrayType(scope.getJavaLangObject(), 1), // _OT$args
};
// SH}
// {OT/JamVM support:
@@ -187,7 +187,7 @@ public class MethodSignatureEnhancer implements IOTConstants, TypeConstants, Cla
int fullLen = this.ENHANCING_ARG_LEN;
if (arguments != null) fullLen += arguments.length; // source arguments?
Argument[] newArgs = new Argument[fullLen];
- TypeReference[] enhanceTypes =
+ TypeReference[] enhanceTypes =
//{OTDyn: configurable:
this.weavingScheme == WeavingScheme.OTDRE
? new TypeReference[] {
@@ -197,7 +197,7 @@ public class MethodSignatureEnhancer implements IOTConstants, TypeConstants, Cla
new ArrayTypeReference(TypeConstants.INT, 1, gen.pos), // _OT$callinIds
gen.singleTypeReference(TypeConstants.INT), // _OT$boundMethodId
gen.qualifiedArrayTypeReference(JAVA_LANG_OBJECT, 1), // _OT$args
- }
+ }
// SH}
// {OT/JamVM support:
: JAMVM_ASPECTBI
@@ -398,18 +398,18 @@ public class MethodSignatureEnhancer implements IOTConstants, TypeConstants, Cla
String typeString = types.toString();
String prefix =
//{OTDyn: configurable:
- weavingScheme == WeavingScheme.OTDRE
- ? (makeShort
+ weavingScheme == WeavingScheme.OTDRE
+ ? (makeShort
? "IBoundBase2, ITeam[], int, int[], int, Object[]"
: "org.objectteams.IBoundBase2, org.objectteams.ITeam[], int, int[], int, java.lang.Object[]")
// SH}
// {OT/JamVM support:
: JAMVM_ASPECTBI
- ? (makeShort
+ ? (makeShort
? "Object, int, int, Object[]"
: "java.lang.Object, int, int, java.lang.Object[]")
// CH}
- : (makeShort
+ : (makeShort
? "ITeam[], int[], int, int, int, Object[]"
: "org.objectteams.ITeam[], int[], int, int, int, java.lang.Object[]");
if (typeString.startsWith(prefix)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/PredicateGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/PredicateGenerator.java
index 3e5a4717b..dc38f07eb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/PredicateGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/PredicateGenerator.java
@@ -347,7 +347,7 @@ public class PredicateGenerator extends SwitchOnBaseTypeGenerator
|| weavingScheme == WeavingScheme.OTDRE) // under OTREDyn base is passed as IBoundBase => always need to cast.
{
result= gen.castExpression(result, gen.baseTypeReference(roleType.baseclass()), CastExpression.RAW);
- }
+ }
}
return result;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReflectionGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReflectionGenerator.java
index cd933ce67..f74014223 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReflectionGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReflectionGenerator.java
@@ -606,7 +606,7 @@ public class ReflectionGenerator implements IOTConstants, ClassFileConstants {
gen.qualifiedTypeReference(ORG_OBJECTTEAMS_IBOUNDBASE2),
CastExpression.RAW),
ADD_REMOVE_ROLE,
- new Expression[] {gen.singleNameReference(_OT_ROLE_ARG),
+ new Expression[] {gen.singleNameReference(_OT_ROLE_ARG),
gen.booleanLiteral(false)}) // isAdding=false
: gen.messageSend(
gen.castExpression(
@@ -877,7 +877,7 @@ public class ReflectionGenerator implements IOTConstants, ClassFileConstants {
gen.qualifiedTypeReference(ORG_OBJECTTEAMS_IBOUNDBASE2),
CastExpression.RAW),
ADD_REMOVE_ROLE,
- new Expression[] {gen.singleNameReference(_OT_ROLE_ARG),
+ new Expression[] {gen.singleNameReference(_OT_ROLE_ARG),
gen.booleanLiteral(false)}) // isAdding=false
: gen.messageSend(
gen.castExpression(
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReplaceResultReferenceVisitor.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReplaceResultReferenceVisitor.java
index 803673d0e..9d03b3a39 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReplaceResultReferenceVisitor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReplaceResultReferenceVisitor.java
@@ -32,7 +32,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.AstGenerator;
/**
* This visitor replaces SingleNameReference("result") in param mappings
- * with ResultReferences, provided they are on the correct side of the binding token.
+ * with ResultReferences, provided they are on the correct side of the binding token.
*
* @author stephan
*/
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleMigrationImplementor.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleMigrationImplementor.java
index 4cdd1143c..4e87498eb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleMigrationImplementor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleMigrationImplementor.java
@@ -321,7 +321,7 @@ public class RoleMigrationImplementor
codeStream.aload_0(); // this
codeStream.fieldAccess(Opcodes.OPC_getfield,
enclosingInstanceField(roleBinding), // this.this$n
- roleBinding);
+ roleBinding);
codeStream.fieldAccess(Opcodes.OPC_getfield,
roleBinding.enclosingType().getField(cacheName, true),// this.this$n._OT$cache$R
roleBinding.enclosingType());
@@ -355,7 +355,7 @@ public class RoleMigrationImplementor
codeStream.return_();
}
-
+
static MethodBinding getMethod(ReferenceBinding declaringClass, char[] selector, int numParams) {
MethodBinding[] methods = declaringClass.getMethods(selector);
MethodBinding found = null;
@@ -378,20 +378,20 @@ public class RoleMigrationImplementor
switch (scope.compilerOptions().weavingScheme) {
case OTDRE:
// _OT$addOrRemoveRole(role, isAdding)
- if (isAdding)
+ if (isAdding)
codeStream.iconst_1(); // isAdding=true
else
- codeStream.iconst_0(); // isAdding=false
+ codeStream.iconst_0(); // isAdding=false
codeStream.invoke(Opcodes.OPC_invokeinterface,
iboundBase.getMethod(scope, IOTConstants.ADD_REMOVE_ROLE),
iboundBase);
break;
case OTRE:
// _OT$addRole(role) or _OT$removeRole(role):
- codeStream.invoke(Opcodes.OPC_invokeinterface,
- isAdding
- ? iboundBase.getMethod(scope, IOTConstants.ADD_ROLE)
- : iboundBase.getMethod(scope, IOTConstants.REMOVE_ROLE),
+ codeStream.invoke(Opcodes.OPC_invokeinterface,
+ isAdding
+ ? iboundBase.getMethod(scope, IOTConstants.ADD_ROLE)
+ : iboundBase.getMethod(scope, IOTConstants.REMOVE_ROLE),
iboundBase);
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleSplitter.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleSplitter.java
index b4a80064a..8438a8d04 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleSplitter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleSplitter.java
@@ -177,11 +177,11 @@ public class RoleSplitter
if (((abstractMethod.modifiers) & AccPrivate) == 0) {
final MethodDeclaration newmethod = AstConverter.genRoleIfcMethod(teamDecl, method);
AstEdit.addMethod(roleIfcDecl, newmethod);
- roleIfcDecl.getRoleModel()._state.addJob(ITranslationStates.STATE_ROLE_HIERARCHY_ANALYZED, // calls methods();
+ roleIfcDecl.getRoleModel()._state.addJob(ITranslationStates.STATE_ROLE_HIERARCHY_ANALYZED, // calls methods();
new Runnable() { @Override
public void run() {
- if ( method.binding != null
- && (method.binding.modifiers & ClassFileConstants.AccDeprecated) != 0
+ if ( method.binding != null
+ && (method.binding.modifiers & ClassFileConstants.AccDeprecated) != 0
&& newmethod.binding != null)
{
newmethod.binding.modifiers |= ClassFileConstants.AccDeprecated;
@@ -402,7 +402,7 @@ public class RoleSplitter
}
- /**
+ /**
* API for LookupEnvironment:
* Establish necessary links between ifc- and class-part of each role in the given unit.
*/
@@ -420,7 +420,7 @@ public class RoleSplitter
}
if (type.memberTypes != null)
for (TypeDeclaration member : type.memberTypes)
- linkRoles(member);
+ linkRoles(member);
}
/**
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/SerializationGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/SerializationGenerator.java
index 7d4d1f840..d8e9b093b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/SerializationGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/SerializationGenerator.java
@@ -58,9 +58,9 @@ public class SerializationGenerator {
private static final char[] CLASS_ARG_NAME = "clazz".toCharArray(); //$NON-NLS-1$
private static final char[] CASTED_ROLE = "castedRole".toCharArray(); //$NON-NLS-1$
- /**
+ /**
* Generate a restore() and a restoreRole(Class,Object) method.
- * The latter remains empty at this point and must be filled later using
+ * The latter remains empty at this point and must be filled later using
* {@link #fillRestoreRole(TypeDeclaration,FieldDeclaration[])}.
* @param teamType the AST where to add the methods.
* @param gen AstGenerator with proper positions for generating.
@@ -80,12 +80,12 @@ public class SerializationGenerator {
gen.markerAnnotation(TypeConstants.JAVA_LANG_OVERRIDE)
};
AstEdit.addMethod(teamType, restore);
-
+
MethodDeclaration restoreRole = gen.method(
- teamType.compilationResult,
+ teamType.compilationResult,
ClassFileConstants.AccProtected,
- TypeBinding.VOID,
- RESTORE_ROLE,
+ TypeBinding.VOID,
+ RESTORE_ROLE,
new Argument[] {
gen.argument(CLASS_ARG_NAME, gen.parameterizedQualifiedTypeReference(TypeConstants.JAVA_LANG_CLASS, new TypeReference[]{gen.wildcard(Wildcard.UNBOUND)})),
gen.argument(ROLE_ARG_NAME, gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT))
@@ -94,7 +94,7 @@ public class SerializationGenerator {
restoreRole.annotations = new Annotation[] {
gen.markerAnnotation(TypeConstants.JAVA_LANG_OVERRIDE)
};
- AstEdit.addMethod(teamType, restoreRole);
+ AstEdit.addMethod(teamType, restoreRole);
}
/**
@@ -111,14 +111,14 @@ public class SerializationGenerator {
AstGenerator gen = new AstGenerator(restoreMethod); // re-use position
Statement[] statements = new Statement[caches.length+(superIsTeam?1:0)];
-
+
// find the matching cache for argument Class clazz:
for (int i = 0; i < caches.length; i++) {
// FIXME(SH): unclear if needed after allowing generated qualified role type referneces:
TypeReference cacheTypeRef = caches[i].type; // robustness, but with wrong source position
-
+
if (! cacheTypeRef.resolvedType.isParameterizedType()
- || ((ParameterizedTypeBinding)cacheTypeRef.resolvedType).arguments.length != 2)
+ || ((ParameterizedTypeBinding)cacheTypeRef.resolvedType).arguments.length != 2)
{
if (teamType.scope.environment().globalOptions.complianceLevel < ClassFileConstants.JDK1_5) {
restoreMethod.statements = new Statement[] { gen.emptyStatement() };
@@ -127,28 +127,28 @@ public class SerializationGenerator {
}
throw new InternalCompilerError("Unexpected resolved cache type "+cacheTypeRef.resolvedType); //$NON-NLS-1$
}
-
+
// reconstruct a type reference from the resolved cache type
ParameterizedTypeBinding oldBinding = (ParameterizedTypeBinding)cacheTypeRef.resolvedType;
ReferenceBinding roleBinding = (ReferenceBinding)oldBinding.arguments[1];
// respect different status for base/role types (scope, decapsulation).
cacheTypeRef = gen.getCacheTypeReference(teamType.scope, roleBinding.roleModel);
-
+
statements[i] = gen.ifStatement(
// if (Role.class.isAssignableFrom(clazz)) { ...
- gen.messageSend(gen.classLiteralAccess(gen.typeReference(roleBinding)),
- IS_ASSIGNABLE_FROM,
+ gen.messageSend(gen.classLiteralAccess(gen.typeReference(roleBinding)),
+ IS_ASSIGNABLE_FROM,
new Expression[] { gen.singleNameReference(CLASS_ARG_NAME)}),
gen.block(new Statement[] {
- // Role castedRole = (Role) role;
- gen.localVariable(CASTED_ROLE, roleBinding,
- gen.castExpression(gen.singleNameReference(ROLE_ARG_NAME),
+ // Role castedRole = (Role) role;
+ gen.localVariable(CASTED_ROLE, roleBinding,
+ gen.castExpression(gen.singleNameReference(ROLE_ARG_NAME),
gen.typeReference(roleBinding), CastExpression.RAW)),
// Base base = role._OT$getBase();
gen.localVariable(IOTConstants.BASE, gen.baseclassReference(roleBinding.baseclass(), true /*erase*/),
gen.messageSend(
- gen.singleNameReference(CASTED_ROLE),
- IOTConstants._OT_GETBASE,
+ gen.singleNameReference(CASTED_ROLE),
+ IOTConstants._OT_GETBASE,
null/*arguments*/)),
// <roleCache[i]>.put(base, castedRole);
gen.messageSend(
@@ -162,12 +162,12 @@ public class SerializationGenerator {
// OTDYN: Slightly different methods depending on the weaving strategy:
teamType.scope.compilerOptions().weavingScheme == WeavingScheme.OTDRE
? gen.messageSend(
- gen.castExpression(gen.singleNameReference(IOTConstants.BASE),
+ gen.castExpression(gen.singleNameReference(IOTConstants.BASE),
gen.qualifiedTypeReference(IOTConstants.ORG_OBJECTTEAMS_IBOUNDBASE2), CastExpression.RAW),
IOTConstants.ADD_REMOVE_ROLE,
new Expression[]{gen.singleNameReference(CASTED_ROLE), gen.booleanLiteral(true)})
: gen.messageSend(
- gen.castExpression(gen.singleNameReference(IOTConstants.BASE),
+ gen.castExpression(gen.singleNameReference(IOTConstants.BASE),
gen.qualifiedTypeReference(IOTConstants.ORG_OBJECTTEAMS_IBOUNDBASE), CastExpression.RAW),
IOTConstants.ADD_ROLE,
new Expression[]{gen.singleNameReference(CASTED_ROLE)}),
@@ -175,7 +175,7 @@ public class SerializationGenerator {
gen.returnStatement(null)
}));
}
-
+
if (superIsTeam) {
// if no suitable cache found so far:
// super.restoreRole(clazz, role);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/StandardElementGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/StandardElementGenerator.java
index 46d6e5e10..b309977fc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/StandardElementGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/StandardElementGenerator.java
@@ -210,7 +210,7 @@ public class StandardElementGenerator {
*/
boolean shouldWeaken = (teamModel.getState() >= ITranslationStates.STATE_TYPES_ADJUSTED); // weakening for other methods already done?
MethodBinding superMethod = null;
-
+
roleType = roleType.getRealType();
char[] methodName = CharOperation.concat(CAST_PREFIX, roleType.sourceName());
if (dimensions > 0)
@@ -346,7 +346,7 @@ public class StandardElementGenerator {
AstEdit.addGeneratedMethod(teamClass, castMethod);
if (clearPrivateModifier)
castMethod.binding.tagBits = TagBits.ClearPrivateModifier;
-
+
if (superMethod != null)
CopyInheritance.weakenSignature(castMethod, superMethod);
return castMethod.binding;
@@ -525,7 +525,7 @@ public class StandardElementGenerator {
createGetBaseMethod(roleType, baseclass, _OT_GETBASE, AccPublic|AccAbstract|AccSemicolonBody);
} else {
checkCreateBaseField(roleType, baseclass, true);
-
+
// all actual base fields are accessible by a corresponding method:
// for role classes create two versions (ifc/class)
createGetBaseMethod(role.getInterfaceAst(), baseclass, _OT_GETBASE, AccPublic|AccAbstract|AccSemicolonBody);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/SwitchOnBaseTypeGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/SwitchOnBaseTypeGenerator.java
index eeac5c190..bb14148c2 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/SwitchOnBaseTypeGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/SwitchOnBaseTypeGenerator.java
@@ -95,7 +95,7 @@ public abstract class SwitchOnBaseTypeGenerator implements IOTConstants {
RoleModel[] rolesToSort = new RoleModel[caseObjects.length];
System.arraycopy(caseObjects, 0, rolesToSort, 0, caseObjects.length);
caseObjects = Sorting.sortRoles(rolesToSort);
-
+
Statement[] stmts = new Statement[2];
Expression baseArg = gen.singleNameReference(baseVarName());
ReferenceBinding castType = null;
@@ -107,10 +107,10 @@ public abstract class SwitchOnBaseTypeGenerator implements IOTConstants {
baseArg = gen.castExpression(baseArg, gen.baseTypeReference(castType), CastExpression.RAW);
char[] LOCAL_BASE_NAME = "_OT$local$base".toCharArray(); //$NON-NLS-1$
stmts[0] = gen.localVariable(LOCAL_BASE_NAME, gen.baseclassReference(staticBaseType), baseArg);
-
+
IfStatement prevIf = null;
- /*
+ /*
* if (_OT$local$base instanceof MySubBaseA)
* <action for MySubRoleA playedBy MySubBaseA>
* else if (_OT$local$base instanceof MySubBaseB)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TeamMethodGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TeamMethodGenerator.java
index 05f651873..baacca10b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TeamMethodGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TeamMethodGenerator.java
@@ -77,18 +77,18 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.util.AstGenerator;
* This class adds methods and fields from org.objectteams.Team to those teams that
* extend a non-team class and thus cannot inherit these necessary members.
* Methods are copied via byte-code copy, fields are generated at AST-level (incl. initialization).
- *
+ *
* Technical note: the way this generator is constructed it assumes that org.objectteams.Team
* exists in binary form, i.e., a team leveraging this generator cannot be compiled together
* with org.objectteams.Team.
- *
+ *
* @since 1.4.0
*/
public class TeamMethodGenerator {
static final char[][] JAVA_LANG_WEAKHASHMAP = new char[][] {"java".toCharArray(), "util".toCharArray(), "WeakHashMap".toCharArray()}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
static final char[][] JAVA_LANG_THREAD = new char[][] {"java".toCharArray(), "lang".toCharArray(), "Thread".toCharArray()}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
static final char[][] JAVA_LANG_THREADLOCAL = new char[][] {"java".toCharArray(), "lang".toCharArray(), "ThreadLocal".toCharArray()}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
+
/** Simple structure to represent one method of o.o.Team. */
static class MethodDescriptor {
String selector;
@@ -96,12 +96,12 @@ public class TeamMethodGenerator {
Type args;
Type returnType;
int modifiers;
-
+
// store from binary method of o.o.Team:
int methodCodeOffset;
ReferenceBinding declaringClass;
MethodBinding binding;
-
+
MethodDescriptor(String selector, String signature, Type args, Type returnType, int modifiers) {
super();
this.selector = selector;
@@ -115,15 +115,15 @@ public class TeamMethodGenerator {
Argument[] makeArgs(AstGenerator gen) {
switch (this.args) {
case THREAD:
- return new Argument[] {
+ return new Argument[] {
gen.argument("thread".toCharArray(), gen.qualifiedTypeReference(JAVA_LANG_THREAD))
};
case BOOLEAN:
- return new Argument[] {
+ return new Argument[] {
gen.argument("flag".toCharArray(), gen.baseTypeReference(TypeConstants.BOOLEAN))
};
case INT:
- return new Argument[] {
+ return new Argument[] {
gen.argument("flags".toCharArray(), gen.baseTypeReference(TypeConstants.INT))
};
case OTDYNARGS1:
@@ -171,7 +171,7 @@ public class TeamMethodGenerator {
return null;
}
}
-
+
TypeReference makeReturnRef(AstGenerator gen) {
switch (this.returnType) {
case BOOLEAN:
@@ -187,11 +187,11 @@ public class TeamMethodGenerator {
}
}
}
- enum Type {
+ enum Type {
NONE {
@Override public int length() { return 0; }
- },
- THREAD, BOOLEAN, INT, OBJECT,
+ },
+ THREAD, BOOLEAN, INT, OBJECT,
OTDYNARGS1 { @Override int length() { return 6; } },
OTDYNARGS2 { @Override int length() { return 8; } },
OTDYNARGS3 { @Override int length() { return 4; } },
@@ -222,17 +222,17 @@ public class TeamMethodGenerator {
};
@SuppressWarnings("nls")
final MethodDescriptor[] methodDescriptorsDyn = new MethodDescriptor[] {
- new MethodDescriptor("_OT$callAllBindings", "(Lorg/objectteams/IBoundBase2;[Lorg/objectteams/ITeam;I[II[Ljava/lang/Object;)Ljava/lang/Object;",
+ new MethodDescriptor("_OT$callAllBindings", "(Lorg/objectteams/IBoundBase2;[Lorg/objectteams/ITeam;I[II[Ljava/lang/Object;)Ljava/lang/Object;",
Type.OTDYNARGS1, Type.OBJECT, AccPublic),
- new MethodDescriptor("_OT$callNext", "(Lorg/objectteams/IBoundBase2;[Lorg/objectteams/ITeam;I[II[Ljava/lang/Object;[Ljava/lang/Object;I)Ljava/lang/Object;",
+ new MethodDescriptor("_OT$callNext", "(Lorg/objectteams/IBoundBase2;[Lorg/objectteams/ITeam;I[II[Ljava/lang/Object;[Ljava/lang/Object;I)Ljava/lang/Object;",
Type.OTDYNARGS2, Type.OBJECT, AccPublic),
- new MethodDescriptor("_OT$callReplace", "(Lorg/objectteams/IBoundBase2;[Lorg/objectteams/ITeam;I[II[Ljava/lang/Object;)Ljava/lang/Object;",
+ new MethodDescriptor("_OT$callReplace", "(Lorg/objectteams/IBoundBase2;[Lorg/objectteams/ITeam;I[II[Ljava/lang/Object;)Ljava/lang/Object;",
Type.OTDYNARGS1, Type.OBJECT, AccPublic),
- new MethodDescriptor("_OT$callBefore", "(Lorg/objectteams/IBoundBase2;II[Ljava/lang/Object;)V",
+ new MethodDescriptor("_OT$callBefore", "(Lorg/objectteams/IBoundBase2;II[Ljava/lang/Object;)V",
Type.OTDYNARGS3, Type.NONE, AccPublic),
- new MethodDescriptor("_OT$callAfter", "(Lorg/objectteams/IBoundBase2;II[Ljava/lang/Object;Ljava/lang/Object;)V",
+ new MethodDescriptor("_OT$callAfter", "(Lorg/objectteams/IBoundBase2;II[Ljava/lang/Object;Ljava/lang/Object;)V",
Type.OTDYNARGS4, Type.NONE, AccPublic),
- new MethodDescriptor("_OT$callOrigStatic", "(II[Ljava/lang/Object;)Ljava/lang/Object;",
+ new MethodDescriptor("_OT$callOrigStatic", "(II[Ljava/lang/Object;)Ljava/lang/Object;",
Type.OTDYNARGS5, Type.OBJECT, AccPublic)
};
@@ -242,7 +242,7 @@ public class TeamMethodGenerator {
// --- variant if o.o.Team is a SourceTypeBinding:
public SourceTypeBinding ooTeamBinding;
// ==== ====
-
+
public TeamMethodGenerator(WeavingScheme weavingScheme) {
if (weavingScheme == WeavingScheme.OTDRE) {
int l1 = this.methodDescriptors.length;
@@ -259,7 +259,7 @@ public class TeamMethodGenerator {
try {
char[] selector = method.getSelector();
char[] descriptor = method.getMethodDescriptor();
- File file = new File(String.valueOf(binaryType.getFileName()));
+ File file = new File(String.valueOf(binaryType.getFileName()));
ClassFileReader reader = ClassFileReader.read(file, true);
for (IBinaryMethod binMethod : reader.getMethods()) {
if (CharOperation.equals(selector, binMethod.getSelector())
@@ -278,9 +278,9 @@ public class TeamMethodGenerator {
public void registerTeamMethod(IBinaryMethod method, MethodBinding methodBinding) {
String selector = String.valueOf(method.getSelector());
String descriptor = String.valueOf(method.getMethodDescriptor());
- registerTeamMethod(methodBinding.declaringClass, methodBinding, selector, descriptor, -1/*structOffset not yet known*/);
+ registerTeamMethod(methodBinding.declaringClass, methodBinding, selector, descriptor, -1/*structOffset not yet known*/);
}
-
+
/** When o.o.Team is read from .class file, record the byte code here. */
public synchronized void maybeRegisterTeamClassBytes(ClassFileReader teamClass, ReferenceBinding teamClassBinding) {
if (this.classBytes != null)
@@ -351,14 +351,14 @@ public class TeamMethodGenerator {
return registerTeamMethod(method.declaringClass, method, selector, signature, -1/*no structOffset before class is complete*/);
}
// ==============
- /**
+ /**
* Add the AST representing all relevant methods and fields from o.o.Team,
* and prepare methods for byte-code copy.
*/
public void addMethodsAndFields(TypeDeclaration teamDecl) {
// FIXME(SH): test subteams of teams already treated by this generator!
AstGenerator gen = new AstGenerator(teamDecl);
-
+
boolean hasBoundRole = false;
// check what will be generated:
boolean hasCallinBefore = false, hasCallinAfter = false, hasCallinReplace = false;
@@ -396,13 +396,13 @@ public class TeamMethodGenerator {
if (hasBoundRole) {
newMethod = new CopiedTeamMethod(teamDecl.compilationResult, methodDescriptor, gen);
} else {
- newMethod = gen.method(teamDecl.compilationResult,
- methodDescriptor.modifiers,
- methodDescriptor.makeReturnRef(gen),
- methodDescriptor.selector.toCharArray(),
+ newMethod = gen.method(teamDecl.compilationResult,
+ methodDescriptor.modifiers,
+ methodDescriptor.makeReturnRef(gen),
+ methodDescriptor.selector.toCharArray(),
null,
new Statement[0]); // regular empty method.
- }
+ }
}
AstEdit.addGeneratedMethod(teamDecl, newMethod);
}
@@ -428,16 +428,16 @@ public class TeamMethodGenerator {
void addFields(TypeDeclaration teamDecl, AstGenerator gen) {
// private WeakHashMap<Thread, Boolean> _OT$activatedThreads = new WeakHashMap<Thread, Boolean>();
addPrivateField(teamDecl, gen,
- weakHashMapTypeReference(gen),
+ weakHashMapTypeReference(gen),
"_OT$activatedThreads".toCharArray(),
gen.allocation(weakHashMapTypeReference(gen), null));
-
+
// private Object _OT$registrationLock= new Object();
addPrivateField(teamDecl, gen,
- gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT),
+ gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT),
"_OT$registrationLock".toCharArray(),
gen.allocation(gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT), null));
-
+
// private boolean _OT$lazyGlobalActiveFlag = false;
addPrivateField(teamDecl, gen,
gen.baseTypeReference(TypeConstants.BOOLEAN),
@@ -449,19 +449,19 @@ public class TeamMethodGenerator {
gen.baseTypeReference(TypeConstants.BOOLEAN),
"_OT$isExecutingCallin".toCharArray(),
gen.booleanLiteral(false));
-
+
// private int _OT$registrationState = _OT$UNREGISTERED;
addPrivateField(teamDecl, gen,
gen.baseTypeReference(TypeConstants.INT),
"_OT$registrationState".toCharArray(),
gen.intLiteral(0));
-
+
// private boolean _OT$globalActive = false;
addPrivateField(teamDecl, gen,
gen.baseTypeReference(TypeConstants.BOOLEAN),
"_OT$globalActive".toCharArray(),
gen.booleanLiteral(false));
-
+
// private ThreadLocal<Integer> _OT$implicitActivationsPerThread = new ThreadLocal<Integer>() {
// protected synchronized Integer initialValue() {
// return Integer.valueOf(0);
@@ -469,13 +469,13 @@ public class TeamMethodGenerator {
// };
TypeDeclaration anonThreadLocal = gen.anonymousType(teamDecl.compilationResult);
anonThreadLocal.methods = new MethodDeclaration[] {
- gen.method( teamDecl.compilationResult,
- AccProtected|AccSynchronized,
- gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_INTEGER),
- "initialValue".toCharArray(),
+ gen.method( teamDecl.compilationResult,
+ AccProtected|AccSynchronized,
+ gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_INTEGER),
+ "initialValue".toCharArray(),
null/*arguments*/,
new Statement[] {
- gen.returnStatement(gen.intLiteral(0)) // rely on autoboxing
+ gen.returnStatement(gen.intLiteral(0)) // rely on autoboxing
})
};
addPrivateField(teamDecl, gen,
@@ -488,11 +488,11 @@ public class TeamMethodGenerator {
boolean teamHasProblems = teamDecl.ignoreFurtherInvestigation;
AstEdit.addField(teamDecl, field, !teamHasProblems, false, false);
if (!teamHasProblems)
- field.binding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
+ field.binding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
}
QualifiedTypeReference weakHashMapTypeReference(AstGenerator gen) {
return gen.parameterizedQualifiedTypeReference(
- JAVA_LANG_WEAKHASHMAP,
+ JAVA_LANG_WEAKHASHMAP,
new TypeReference[]{
gen.qualifiedTypeReference(JAVA_LANG_THREAD),
gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_BOOLEAN)
@@ -505,8 +505,8 @@ public class TeamMethodGenerator {
gen.qualifiedTypeReference(TypeConstants.JAVA_LANG_INTEGER)
});
}
-
- /**
+
+ /**
* Add fake method bindings for methods that will be generated by the OTRE.
* These bindings are needed by the TeamConstantPoolMapper.
*/
@@ -569,16 +569,16 @@ public class TeamMethodGenerator {
offsets = TeamMethodGenerator.this.constantPoolOffsets;
structOffset = this.descriptor.methodCodeOffset;
}
- ConstantPoolObjectReader reader = new ConstantPoolObjectReader( bytes,
- offsets,
- this.descriptor.declaringClass.getTeamModel(),
+ ConstantPoolObjectReader reader = new ConstantPoolObjectReader( bytes,
+ offsets,
+ this.descriptor.declaringClass.getTeamModel(),
this.scope.environment());
new BytecodeTransformer().doCopyMethodCode( null /*srcRoleModel*/, this.binding, // source
(SourceTypeBinding)this.binding.declaringClass, this, // destination
bytes, // source bytes
offsets,
structOffset,
- reader, mapper, // mapping strategies
+ reader, mapper, // mapping strategies
classFile); // final destination
}
}
@@ -599,7 +599,7 @@ public class TeamMethodGenerator {
@Override
public ConstantPoolObject mapConstantPoolObject(ConstantPoolObject src_cpo) {
int type=src_cpo.getType();
-
+
TypeBinding clazz = null;
switch (type) {
case MethodRefTag:
@@ -613,7 +613,7 @@ public class TeamMethodGenerator {
}
if (TypeBinding.notEquals(clazz, this.srcType))
return src_cpo; // only map references to o.o.Team
-
+
// perform the mapping:
switch(type){
case FieldRefTag:
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TransformStatementsVisitor.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TransformStatementsVisitor.java
index 4d9e98136..9ac76ccf2 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TransformStatementsVisitor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TransformStatementsVisitor.java
@@ -82,7 +82,7 @@ public class TransformStatementsVisitor
private boolean isLocalTypeInCallin = false;
private WeavingScheme weavingScheme;
-
+
public TransformStatementsVisitor(WeavingScheme weavingScheme) {
this.weavingScheme = weavingScheme;
}
@@ -154,7 +154,7 @@ public class TransformStatementsVisitor
messageSend.bits |= ASTNode.HasBeenTransformed; // only the outer has been transformed so far.
return true;
}
-
+
/** May need to add arguments to a 'recursive' callin message send. */
@Override
public boolean visit(MessageSend messageSend, BlockScope scope) {
@@ -177,7 +177,7 @@ public class TransformStatementsVisitor
int len = args.length;
if (methodDecl.isStatic()) // chop of premature isSuperAccess flag:
System.arraycopy(args, 1, args=new Expression[len-1], 0, len-1);
- }
+ }
}
}
messageSend.arguments = MethodSignatureEnhancer.enhanceArguments(args, messageSend.sourceEnd+1, this.weavingScheme);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstConverter.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstConverter.java
index 01cd46f7a..c402c69ef 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstConverter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstConverter.java
@@ -211,7 +211,7 @@ public class AstConverter implements ClassFileConstants, ExtraCompilerModifiers,
fieldDeclaration.copyInheritanceSrc = fieldBinding.copyInheritanceSrc;
else
fieldDeclaration.copyInheritanceSrc = fieldBinding;
-
+
AnnotationBinding[] annotBindings = fieldBinding.getAnnotations();
if (annotBindings != Binding.NO_ANNOTATIONS) {
ProblemReporter pr = fieldBinding.isStatic() ?
@@ -238,7 +238,7 @@ public class AstConverter implements ClassFileConstants, ExtraCompilerModifiers,
pr.unexpectedAnnotationStructure(annotTypeName, fieldBinding.name, gen.sourceStart, gen.sourceEnd);
hasAnnotationError = true;
} else
- if ( numPairs == 1
+ if ( numPairs == 1
&& CharOperation.equals(names[0], TypeConstants.VALUE)) {
annotDecls[i] = gen.singleMemberAnnotation(annotTypeName, values[0]);
} else {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstEdit.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstEdit.java
index eca5735b2..1eeb2f1d6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstEdit.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstEdit.java
@@ -180,7 +180,7 @@ public class AstEdit {
TypeDeclaration classTypeDeclaration,
AbstractMethodDeclaration methodDeclaration,
boolean wasSynthetic,
- boolean addToFront,
+ boolean addToFront,
MethodBinding copyInheritanceSrc)
{
addMethod(classTypeDeclaration, methodDeclaration, wasSynthetic, addToFront, copyInheritanceSrc, true);
@@ -199,7 +199,7 @@ public class AstEdit {
TypeDeclaration classTypeDeclaration,
AbstractMethodDeclaration methodDeclaration,
boolean wasSynthetic,
- boolean addToFront,
+ boolean addToFront,
MethodBinding original,
boolean isCopyInheritance)
{
@@ -264,7 +264,7 @@ public class AstEdit {
decl.methods = null;
} else {
AbstractMethodDeclaration[] methods = new AbstractMethodDeclaration[length - 1];
-
+
if (decl.methods != null) {
for (int i = 0; i < decl.methods.length; i++) {
if (method == decl.methods[i].binding) {
@@ -273,7 +273,7 @@ public class AstEdit {
}
}
}
-
+
if (pos >= 0) {
System.arraycopy(decl.methods, 0, methods, 0, pos);
System.arraycopy(
@@ -530,7 +530,7 @@ public class AstEdit {
addImplementsReference(roleClassDecl, implementsRef);
}
- public static void addException(AbstractMethodDeclaration methodDecl, TypeReference exceptionRef, boolean resolve)
+ public static void addException(AbstractMethodDeclaration methodDecl, TypeReference exceptionRef, boolean resolve)
{
if (methodDecl.thrownExceptions != null) {
int len = methodDecl.thrownExceptions.length;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstFactory.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstFactory.java
index 107bab5c1..dfde07fb3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstFactory.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstFactory.java
@@ -57,7 +57,7 @@ public abstract class AstFactory implements ClassFileConstants, ExtraCompilerMod
this._sourcePosition = new SourcePosition(this.sourceStart, this.sourceEnd, this.pos);
}
- /**
+ /**
* This method shifts the generators position off by one.
* If adding a @SuppressWarnings annotation with this offset,
* non-generated code will not be affected by that annotation.
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstGenerator.java
index 4b186b2f7..88f44b5ca 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstGenerator.java
@@ -86,20 +86,20 @@ public class AstGenerator extends AstFactory {
static final int AccIfcMethod = AccAbstract|AccSemicolonBody;
public long sourceLevel = ClassFileConstants.JDK1_5;
- /**
- * If set to non-null, base anchored types matching this anchor are not encoded using the base field
+ /**
+ * If set to non-null, base anchored types matching this anchor are not encoded using the base field
* (possibly with static prefix),
* but a simple name "base" is used, representing the base argument in a callin wrapper.
*/
public ITeamAnchor replaceableBaseAnchor = null;
-
+
/**
* If this reference is non-null, qualifications in qualified this references that refer
- * to <code>replaceableEnclosingClass</code>'s super class should be updated to
+ * to <code>replaceableEnclosingClass</code>'s super class should be updated to
* <code>replaceableEnclosingClass</code> itself (strengthening during copy).
*/
public ReferenceBinding replaceableEnclosingClass;
-
+
public AstGenerator(int start, int end) {
super(start, end);
}
@@ -531,7 +531,7 @@ public class AstGenerator extends AstFactory {
compoundName = CharOperation.splitOn('$', tokenString);
TypeReference[][] arguments = new TypeReference[compoundName.length][];
int argPos = compoundName.length-1;
- boolean haveArguments = false;
+ boolean haveArguments = false;
do {
TypeBinding[] argumentTypes = paramType.arguments;
if (argumentTypes != null) {
@@ -725,9 +725,9 @@ public class AstGenerator extends AstFactory {
result.sourceEnd = this.sourceEnd;
return result;
}
-
- public LiftingTypeReference liftingTypeReference(TypeReference baseReference, TypeReference roleReference,
- char[] roleToken, char[][] baseTokens)
+
+ public LiftingTypeReference liftingTypeReference(TypeReference baseReference, TypeReference roleReference,
+ char[] roleToken, char[][] baseTokens)
{
LiftingTypeReference result = new LiftingTypeReference();
result.sourceStart = this.sourceStart;
@@ -740,7 +740,7 @@ public class AstGenerator extends AstFactory {
result.roleToken = roleToken;
return result;
}
-
+
public FieldDeclaration field(int modifiers, TypeReference typeRef, char[] name, Expression init)
{
FieldDeclaration field = new FieldDeclaration(name, this.sourceStart, this.sourceEnd);
@@ -804,7 +804,7 @@ public class AstGenerator extends AstFactory {
}
/** If typeBinding has a free type parameter, we need to push this param out as a method parameter. */
- public void maybeAddTypeParametersToMethod(ReferenceBinding typeBinding, MethodDeclaration methodDecl)
+ public void maybeAddTypeParametersToMethod(ReferenceBinding typeBinding, MethodDeclaration methodDecl)
{
if (typeBinding.isParameterizedType()) {
TypeBinding[] arguments = ((ParameterizedTypeBinding)typeBinding).arguments;
@@ -877,13 +877,13 @@ public class AstGenerator extends AstFactory {
// skip the receiver unless its again a hooked message send:
if (this.receiver.getClass() == this.getClass())
this.receiver.resolveType(scope);
-
+
this.binding = method;
this.resolvedType = method.returnType;
// the main payload:
hook.run(scope);
-
+
this.actualReceiverType = this.binding.declaringClass;
return this.resolvedType;
}
@@ -919,8 +919,8 @@ public class AstGenerator extends AstFactory {
}
/** Create a message send to a method that will be created by the otre. */
- public MessageSend fakeMessageSend(Expression receiver, char[] selector, Expression[] parameters,
- final ReferenceBinding receiverType, final TypeBinding resolvedReturn)
+ public MessageSend fakeMessageSend(Expression receiver, char[] selector, Expression[] parameters,
+ final ReferenceBinding receiverType, final TypeBinding resolvedReturn)
{
MessageSend messageSend = new MessageSend() {
@Override
@@ -929,7 +929,7 @@ public class AstGenerator extends AstFactory {
CheckPoint cp = referenceContext.compilationResult().getCheckPoint(referenceContext);
super.resolveType(scope);
referenceContext.compilationResult().rollBack(cp);
- this.binding = new MethodBinding(ClassFileConstants.AccStatic|ClassFileConstants.AccPublic, this.selector,
+ this.binding = new MethodBinding(ClassFileConstants.AccStatic|ClassFileConstants.AccPublic, this.selector,
resolvedReturn, this.binding.parameters, Binding.NO_EXCEPTIONS, receiverType);
return this.resolvedType = resolvedReturn;
}
@@ -980,7 +980,7 @@ public class AstGenerator extends AstFactory {
}
public QualifiedAllocationExpression anonymousAllocation(
- TypeReference superType, Expression[] arguments, TypeDeclaration anonymousType)
+ TypeReference superType, Expression[] arguments, TypeDeclaration anonymousType)
{
QualifiedAllocationExpression result = new QualifiedAllocationExpression();
result.enclosingInstance = null;
@@ -988,7 +988,7 @@ public class AstGenerator extends AstFactory {
result.arguments = arguments;
result.anonymousType = anonymousType;
anonymousType.allocation = result;
- return setPos(result);
+ return setPos(result);
}
public TypeDeclaration anonymousType(CompilationResult compilationResult) {
@@ -1004,7 +1004,7 @@ public class AstGenerator extends AstFactory {
anonymousType.isGenerated = true;
return anonymousType;
}
-
+
public ExplicitConstructorCall explicitConstructorCall(int accessMode) {
ExplicitConstructorCall call = new ExplicitConstructorCall(accessMode);
call.sourceStart = this.sourceStart;
@@ -1079,7 +1079,7 @@ public class AstGenerator extends AstFactory {
}
/**
* Assemble an ifstatement with negated condition, that hides the branch instruction from the debugger,
- * even when stepping into the condition.
+ * even when stepping into the condition.
*/
public IfStatement stealthIfNotStatement(final Expression condition, Statement thenStatement) {
// mark step-over after the condition:
@@ -1088,7 +1088,7 @@ public class AstGenerator extends AstFactory {
public StringBuffer printExpression(int indent, StringBuffer output) { return condition.print(indent, output); }
@Override
public TypeBinding resolveType(BlockScope scope) {
- return condition.resolveType(scope);
+ return condition.resolveType(scope);
}
@Override
public void computeConversion(Scope scope, TypeBinding runtimeType, TypeBinding compileTimeType) {
@@ -1097,10 +1097,10 @@ public class AstGenerator extends AstFactory {
this.bits = condition.bits;
}
@Override
- public Constant optimizedBooleanConstant() {
+ public Constant optimizedBooleanConstant() {
this.constant = condition.optimizedBooleanConstant();
this.bits = condition.bits;
- return this.constant;
+ return this.constant;
}
@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, boolean valueRequired) {
@@ -1122,7 +1122,7 @@ public class AstGenerator extends AstFactory {
new UnaryExpression( // NOT
recordingCondition,
OperatorIds.NOT),
- thenStatement,
+ thenStatement,
this.sourceStart, this.sourceEnd);
}
public ThrowStatement throwStatement(Expression exception) {
@@ -1368,7 +1368,7 @@ public class AstGenerator extends AstFactory {
ParameterizedQualifiedTypeReference fieldTypeRef;
TypeReference[] typeArguments = new TypeReference[] {
baseclassReference(baseTypeBinding, true/*erase*/),
- singleTypeReference(rootRoleBinding.sourceName())
+ singleTypeReference(rootRoleBinding.sourceName())
};
fieldTypeRef = (ParameterizedQualifiedTypeReference)parameterizedQualifiedTypeReference(
WEAK_HASH_MAP,
@@ -1428,7 +1428,7 @@ public class AstGenerator extends AstFactory {
else
return castExpression(expression, alienScopeTypeReference(typeReference(expectedType), originalScope), CastExpression.RAW);
}
-
+
// ========= Method Mappings: =========
public CalloutMappingDeclaration calloutMappingDeclaration(
CompilationResult compilationResult) {
@@ -1483,7 +1483,7 @@ public class AstGenerator extends AstFactory {
result.memberValue = arrayInitializer;
return result;
}
-
+
public NormalAnnotation normalAnnotation(char[][] compoundName, char[][] names, Expression[] values) {
assert names.length == values.length : "names and values must have same length"; //$NON-NLS-1$
NormalAnnotation result = new NormalAnnotation(qualifiedTypeReference(compoundName), this.sourceStart);
@@ -1496,7 +1496,7 @@ public class AstGenerator extends AstFactory {
result.memberValuePairs = pairs;
return result;
}
-
+
public MarkerAnnotation markerAnnotation(char[][] compoundName) {
return new MarkerAnnotation(qualifiedTypeReference(compoundName), this.sourceStart);
}
@@ -1530,7 +1530,7 @@ public class AstGenerator extends AstFactory {
origScope = ((IAlienScopeTypeReference)original).getAlienScope();
// if (origScope.parent.kind == Scope.CLASS_SCOPE)
// origScope = (ClassScope)origScope.parent;
-
+
TypeReference result;
if (original instanceof ParameterizedSingleTypeReference) {
ParameterizedSingleTypeReference pstRef = (ParameterizedSingleTypeReference) original;
@@ -1539,7 +1539,7 @@ public class AstGenerator extends AstFactory {
} else if (original instanceof SingleTypeReference) {
if (original instanceof ArrayTypeReference && original.dimensions() > 0) { // could be parameterized type reference
ArrayTypeReference singleTypeRef = (ArrayTypeReference) original;
- result = new AlienScopeArrayTypeReference(singleTypeRef.token, this.pos, singleTypeRef.dimensions, origScope);
+ result = new AlienScopeArrayTypeReference(singleTypeRef.token, this.pos, singleTypeRef.dimensions, origScope);
} else {
SingleTypeReference singleTypeRef = (SingleTypeReference) original;
result = new AlienScopeSingleTypeReference(singleTypeRef.token, this.pos, origScope);
@@ -1547,7 +1547,7 @@ public class AstGenerator extends AstFactory {
} else if (original instanceof QualifiedTypeReference) {
if (original instanceof ArrayQualifiedTypeReference && original.dimensions() > 0) { // could be parameterized type reference
ArrayQualifiedTypeReference qTypeRef= (ArrayQualifiedTypeReference)original;
- result = new AlienScopeArrayQualifiedTypeReference(qTypeRef.tokens, qTypeRef.sourcePositions, qTypeRef.dimensions(), origScope);
+ result = new AlienScopeArrayQualifiedTypeReference(qTypeRef.tokens, qTypeRef.sourcePositions, qTypeRef.dimensions(), origScope);
} else if (original instanceof ParameterizedQualifiedTypeReference) {
ParameterizedQualifiedTypeReference qTypeRef= (ParameterizedQualifiedTypeReference)original;
result = new AlienScopeParameterizedQualifiedTypeReference(qTypeRef, origScope);
@@ -1555,7 +1555,7 @@ public class AstGenerator extends AstFactory {
QualifiedTypeReference qTypeRef= (QualifiedTypeReference)original;
result = new AlienScopeQualifiedTypeReference(qTypeRef.tokens, qTypeRef.sourcePositions, origScope);
}
- } else {
+ } else {
throw new InternalCompilerError("Unexpected type reference: "+original); //$NON-NLS-1$
}
result.setBaseclassDecapsulation(DecapsulationState.REPORTED);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/IAlienScopeTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/IAlienScopeTypeReference.java
index 4f92545c0..afc16e6ef 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/IAlienScopeTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/IAlienScopeTypeReference.java
@@ -162,7 +162,7 @@ public interface IAlienScopeTypeReference {
return super.resolveType((BlockScope) this.alienScope, checkBounds);
}
}
-
+
class AlienScopeQualifiedTypeReference extends QualifiedTypeReference implements IAlienScopeTypeReference
{
Scope alienScope;
@@ -202,7 +202,7 @@ public interface IAlienScopeTypeReference {
// no-op, simply suppress this warning.
}
}
-
+
class AlienScopeParameterizedQualifiedTypeReference extends ParameterizedQualifiedTypeReference implements IAlienScopeTypeReference
{
@@ -243,8 +243,8 @@ public interface IAlienScopeTypeReference {
// no-op, simply suppress this warning.
}
}
-
-
+
+
class AlienScopeArrayQualifiedTypeReference extends ArrayQualifiedTypeReference implements IAlienScopeTypeReference
{
Scope alienScope;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/IDependentTypeSubstitution.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/IDependentTypeSubstitution.java
index f8b80db88..abf6f4b7a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/IDependentTypeSubstitution.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/IDependentTypeSubstitution.java
@@ -29,9 +29,9 @@ public interface IDependentTypeSubstitution {
* @param original the atomic type to substitute
* @param typeArguments type arguments to re-apply during/after substitution
* @param dimensions array dimensions to re-apply during/after substitution
- * @return null signals an error has been reported,
+ * @return null signals an error has been reported,
* returning original signals no substitutions were needed,
- * otherwise a substituted type is return.
+ * otherwise a substituted type is return.
*/
TypeBinding substitute(DependentTypeBinding original, TypeBinding[] typeArguments, int dimensions);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Protections.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Protections.java
index 33b306900..7305abb44 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Protections.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Protections.java
@@ -282,7 +282,7 @@ public class Protections implements ClassFileConstants, ExtraCompilerModifiers {
if (invocationType.roleModel.hasTSuperRole(declaringClass))
return true;
}
-
+
if (binding.isProtected()) {
// answer true if the invocationType is the declaringClass or they are in the same package
// OR the invocationType is a subclass of the declaringClass
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/RoleTypeCreator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/RoleTypeCreator.java
index 4421a6ab1..db211bde2 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/RoleTypeCreator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/RoleTypeCreator.java
@@ -135,7 +135,7 @@ public class RoleTypeCreator implements TagBits {
TypeBinding originalType,
final ASTNode typedNode,
ReferenceBinding refBinding,
- int dimensions)
+ int dimensions)
{
ReferenceBinding site = scope.enclosingSourceType();
assert( ! (site == null));
@@ -187,13 +187,13 @@ public class RoleTypeCreator implements TagBits {
boolean decapsulationAllowed = false;
if (typedNode instanceof Expression)
decapsulationAllowed = ((Expression)typedNode).getBaseclassDecapsulation().isAllowed();
-
+
if ( (variableBinding instanceof VariableBinding)
- && (((VariableBinding)variableBinding).otBits & IOTConstants.IsFreshTeamInstance) != 0)
+ && (((VariableBinding)variableBinding).otBits & IOTConstants.IsFreshTeamInstance) != 0)
{
if (!refBinding.isRoleType())
return variableBinding.getDependentTypeBinding(refBinding, -1, null, dimensions);
- return
+ return
originalType;
} else if (variableBinding == null) {
if (needAnchor)
@@ -317,18 +317,18 @@ public class RoleTypeCreator implements TagBits {
// anchored to argument, instantiate directly:
Expression anchorExpr = send.arguments[roleReturn._argumentPosition];
TypeBinding anchorType = anchorExpr.resolvedType;
-
+
ITeamAnchor anchor = null;
if (anchorType.isRole() && ((ReferenceBinding)anchorType).isCompatibleViaLowering(roleEnclosing)) {
// see 1.1.31-otjld-stacked-teams-1 f.
if (anchorExpr.isThis())
anchor = ((ReferenceBinding)anchorType).getField(IOTConstants._OT_BASE, true);
else
- return returnType; // cannot improve, error will be reported upstream
+ return returnType; // cannot improve, error will be reported upstream
} else {
if (anchorType.isRole())
anchorType = ((ReferenceBinding)anchorType).getRealClass(); // ignore role-ness of team anchor
- if (!anchorType.isCompatibleWith(roleEnclosing))
+ if (!anchorType.isCompatibleWith(roleEnclosing))
return returnType; // cannot improve, anchor doesn't match expected team.
anchor = (ITeamAnchor)((NameReference)anchorExpr).binding;
}
@@ -547,16 +547,16 @@ public class RoleTypeCreator implements TagBits {
// consider arrays:
int dimensions = typeToWrap.dimensions();
typeToWrap = typeToWrap.leafComponentType();
-
+
// consider parameterized:
TypeBinding[] arguments = null;
- if (typeToWrap.isParameterizedType())
+ if (typeToWrap.isParameterizedType())
arguments = ((ParameterizedTypeBinding)typeToWrap).arguments;
// easy problems first:
if (!(typeToWrap instanceof ReferenceBinding) || typeToWrap.isEnum())
return originalType;
-
+
if (typeToWrap instanceof UnresolvedReferenceBinding) {
// defer wrapping until resolve():
return ((UnresolvedReferenceBinding) typeToWrap).deferredWrappableType(scope, site, typedNode, problemReporter);
@@ -716,14 +716,14 @@ public class RoleTypeCreator implements TagBits {
/* Wraps either relative to defaultAnchor or unqualified. */
private static TypeBinding maybeWrapSignatureType(TypeBinding type, MethodScope scope, ASTNode typedNode, ITeamAnchor defaultAnchor) {
- if ( defaultAnchor != null
+ if ( defaultAnchor != null
&& !type.leafComponentType().isBaseType()
&& defaultAnchor.isTeamContainingRole((ReferenceBinding) type.leafComponentType()))
{
return defaultAnchor.getDependentTypeBinding(
- (ReferenceBinding) type.leafComponentType(),
- 0, // typeParamPosition
- Binding.NO_PARAMETERS,
+ (ReferenceBinding) type.leafComponentType(),
+ 0, // typeParamPosition
+ Binding.NO_PARAMETERS,
type.dimensions());
} else {
return maybeWrapUnqualifiedRoleType(type, scope, typedNode);
@@ -922,7 +922,7 @@ public class RoleTypeCreator implements TagBits {
return cannotWrapType(roleType, problemReporter, typedNode);
}
}
- else if (anchorExpr instanceof AllocationExpression)
+ else if (anchorExpr instanceof AllocationExpression)
{
// this anchor matches nothing
String displayName = "fresh-instance-of-"+((AllocationExpression)anchorExpr).type.toString(); //$NON-NLS-1$
@@ -1630,10 +1630,10 @@ public class RoleTypeCreator implements TagBits {
return false;
}
- /**
+ /**
* Decompose a given type into atomic types (taking into account arrays and type arguments)
- * perform a given type substitution for each atomic type and
- * re-assemble to a type of the same shape as the given type.
+ * perform a given type substitution for each atomic type and
+ * re-assemble to a type of the same shape as the given type.
* @param original the given type to be substituted
* @param environment for creation of parameterized types and array types
* @param substitution what to perform on each atomic dependent type
@@ -1643,7 +1643,7 @@ public class RoleTypeCreator implements TagBits {
TypeBinding type = original;
int dimensions = type.dimensions();
type = type.leafComponentType();
-
+
TypeBinding[] typeArguments = null;
boolean hasInstantiated = false;
if (type.isParameterizedType()) {
@@ -1666,7 +1666,7 @@ public class RoleTypeCreator implements TagBits {
}
if (type instanceof DependentTypeBinding) {
- TypeBinding substituted = substitution.substitute((DependentTypeBinding) type, typeArguments, dimensions);
+ TypeBinding substituted = substitution.substitute((DependentTypeBinding) type, typeArguments, dimensions);
if (substituted != type) // includes substituted == null //$IDENTITY-COMPARISON$
return substituted;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Sorting.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Sorting.java
index 18dcc72e4..62ac2c6b5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Sorting.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Sorting.java
@@ -47,7 +47,7 @@ public class Sorting {
ReferenceBinding[] unsorted = new ReferenceBinding[len];
ReferenceBinding[] sorted = new ReferenceBinding[len];
System.arraycopy(enclosing.memberTypes, 0, unsorted, 0, len);
-
+
int o = 0;
for(int i=0; i<len; i++)
o = sort(enclosing, unsorted, i, sorted, o);
@@ -99,10 +99,10 @@ public class Sorting {
}
// --- similar for role models:
-
+
public static RoleModel[] sortRoles(RoleModel[] unsorted) {
int len = unsorted.length;
-
+
RoleModel[] sorted = new RoleModel[len];
int o = 0;
for(int i=0; i<len; i++)
@@ -130,17 +130,17 @@ public class Sorting {
return 0;
}
});
-
+
return sorted;
}
-
+
// Transfer input[i] and all its supers into output[o] ff.
private static int sort(RoleModel[] input, int i,
RoleModel[] output, int o)
{
if (input[i] == null || input[i].getBinding() == null)
return o;
-
+
ReferenceBinding inBinding = input[i].getBinding();
ReferenceBinding superclass = inBinding.superclass();
o = sortSuper(superclass, input, output, o);
@@ -170,7 +170,7 @@ public class Sorting {
break;
}
if (inScope) {
-
+
// search superclass within input:
int j = 0;
for(j=0; j<input.length; j++)
@@ -184,7 +184,7 @@ public class Sorting {
}
return o;
}
-
+
/** Apply the sorting from member type bindings to their ASTs, too. */
public static void sortMemberTypes(TypeDeclaration typeDeclaration) {
if (typeDeclaration.memberTypes == null) return;
@@ -194,7 +194,7 @@ public class Sorting {
int l = 0;
allMembers: for (int i=0; i<bindings.length; i++) {
ReferenceBinding current = bindings[i];
- if (current.isBinaryBinding())
+ if (current.isBinaryBinding())
continue; // no AST: phantom or reused rofi
// find corresponding AST
for (int j=0; j<unsorted.length; j++) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/TypeAnalyzer.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/TypeAnalyzer.java
index c554ba935..dae45049d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/TypeAnalyzer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/TypeAnalyzer.java
@@ -164,7 +164,7 @@ public class TypeAnalyzer {
public static boolean isSameType(ReferenceBinding site, TypeBinding t1, TypeBinding t2)
{
if (TypeBinding.equalsEquals(t1, t2)) return true;
- if (t1 == null || t2 == null)
+ if (t1 == null || t2 == null)
return false;
if (t1.isArrayType()) {
if ( !t2.isArrayType()
@@ -270,7 +270,7 @@ public class TypeAnalyzer {
char[][] tname1 = compoundNameOfReferenceType((ReferenceBinding)tsuperType, true, true);
char[][] tname2 = compoundNameOfReferenceType((ReferenceBinding)currentType, true, true);
- if (CharOperation.equals(tname1, tname2)) {
+ if (CharOperation.equals(tname1, tname2)) {
if (TypeBinding.notEquals(tsuperType, currentType) && tsuperType.isValidBinding()) // don't complain about different missing types
throw new InternalCompilerError("different bindings for the same type??"+currentType+':'+tsuperType); //$NON-NLS-1$
return true;
@@ -548,7 +548,7 @@ public class TypeAnalyzer {
}
if (!allowOuter)
return null;
- isStaticScope = type.isStatic();
+ isStaticScope = type.isStatic();
type = type.enclosingType();
}
return null;
@@ -606,7 +606,7 @@ public class TypeAnalyzer {
@Override public int sourceEnd() { return 0; }
@Override public void setFieldIndex(int depth) { /* nop */ }
@Override public void setDepth(int depth) { /* nop */ }
-
+
@Override public void setActualReceiverType(ReferenceBinding receiverType) { /* nop */ }
@Override public boolean receiverIsImplicitThis() { return false; }
@Override public boolean isTypeAccess() { return false; }
@@ -614,17 +614,17 @@ public class TypeAnalyzer {
@Override public boolean isQualifiedSuper() { return false; }
@Override public boolean checkingPotentialCompatibility() { return false; }
@Override public void acceptPotentiallyCompatibleMethods(MethodBinding[] methods) { /* nop */ }
-
+
@Override
public TypeBinding invocationTargetType() {
return scope.getJavaLangObject();
}
-
+
@Override
public ExpressionContext getExpressionContext() {
return ExpressionContext.ASSIGNMENT_CONTEXT;
}
-
+
@Override
public TypeBinding[] genericTypeArguments() {
return null;

Back to the top