edu.rice.cs.javalanglevels
Class BodyBodyIntermediateVisitor

java.lang.Object
  extended by edu.rice.cs.javalanglevels.JExpressionIFPrunableDepthFirstVisitor
      extended by edu.rice.cs.javalanglevels.LanguageLevelVisitor
          extended by edu.rice.cs.javalanglevels.IntermediateVisitor
              extended by edu.rice.cs.javalanglevels.BodyBodyIntermediateVisitor
All Implemented Interfaces:
JExpressionIFVisitor<Void>

public class BodyBodyIntermediateVisitor
extends IntermediateVisitor

Language Level Visitor for the Intermediate Language Level. Enforces constraints during the first walk of the AST (checking for language specific errors and building the symbol table). This class enforces things that are common to all contexts reachable within a method body or other body (not class or interface body) at the Intermediate Language Level).


Nested Class Summary
static class BodyBodyIntermediateVisitor.BodyBodyIntermediateVisitorTest
          Test most of the methods declared above right here:
 
Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.IntermediateVisitor
IntermediateVisitor.IntermediateVisitorTest
 
Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.LanguageLevelVisitor
LanguageLevelVisitor.LanguageLevelVisitorTest
 
Field Summary
 
Fields inherited from class edu.rice.cs.javalanglevels.LanguageLevelVisitor
_genericTypes, _log, errors, FINAL_MAV, PACKAGE_MAV, PRIVATE_MAV, PROTECTED_MAV, PUBLIC_MAV, symbolTable
 
Constructor Summary
BodyBodyIntermediateVisitor(BodyData bodyData, File file, String packageName, String enclosingClassName, LinkedList<String> importedFiles, LinkedList<String> importedPackages, HashSet<String> classesInThisFile, Hashtable<String,Triple<SourceInfo,LanguageLevelVisitor,SymbolData>> continuations, LinkedList<Command> fixUps, HashSet<String> innerClassesInThisBody)
          Constructor for BodyBodyElementaryVisitor.
 
Method Summary
protected  VariableData[] _variableDeclaration2VariableData(VariableDeclaration vd, Data enclosingData)
          Process a local variable declaration within a method.
 Void forBlock(Block that)
          Process an instance of Block.
 Void forCatchBlock(CatchBlock that)
          Visit the block as in forBlock(), but first add the exception parameter as a variable in that lock.
 Void forComplexAnonymousClassInstantiation(ComplexAnonymousClassInstantiation that)
          Delegate to helper method.
 Void forInnerClassDef(InnerClassDef that)
          Process a local inner class definition
 Void forInnerInterfaceDef(InnerInterfaceDef that)
          Process a local inner interface definition
 Void forInstanceInitializer(InstanceInitializer that)
          Process an instance of InstanceInitializer.
 Void forMethodDefDoFirst(MethodDef that)
          Give an appropriate error
 Void forSimpleAnonymousClassInstantiation(SimpleAnonymousClassInstantiation that)
          Delegate to helper method.
 Void forThisReferenceDoFirst(ThisReference that)
          If this is the body of a constructor, referencing 'this' is illegal.
 Void forVariableDeclarationOnly(VariableDeclaration that)
          Adds the variables that were declared to the body data and make sure that no two variables have the same name.
 
Methods inherited from class edu.rice.cs.javalanglevels.IntermediateVisitor
complexAnonymousClassInstantiationHelper, forBitwiseAndExpressionDoFirst, forBitwiseAssignmentExpressionDoFirst, forBitwiseBinaryExpressionDoFirst, forBitwiseNotExpressionDoFirst, forBitwiseNotExpressionDoFirst, forBitwiseOrExpressionDoFirst, forBitwiseXorExpressionDoFirst, forClassDef, forInterfaceDef, forModifiersAndVisibilityDoFirst, forShiftAssignmentExpressionDoFirst, forShiftBinaryExpressionDoFirst, forSynchronizedStatementDoFirst, forTypeParameterDoFirst, handleInnerClassDef, handleInnerInterfaceDef, llVariableDeclaration2VariableData, newClassBodyVisitor, simpleAnonymousClassInstantiationHelper
 
Methods inherited from class edu.rice.cs.javalanglevels.LanguageLevelVisitor
_addAndIgnoreError, _addError, _badModifiers, _checkError, _getSymbolDataFromFileSystem, _identifyType, _lookupTypeFromWithinClass, _resetNonStaticFields, addGeneratedMethod, addInnerSymbolData, anonymousClassInstantiationHelper, arrayEquals, createAccessors, createConstructor, createEquals, createHashCode, createImportedSymbolContinuation, createMethodData, createToString, defineAnonymousSymbolData, defineArraySymbolData, defineInnerSymbolData, defineSymbolData, defineSymbolData, forAbstractMethodDefDoFirst, forClassDefDoFirst, forClassImportStatementOnly, forComplexNameReference, forConcreteMethodDefDoFirst, forEmptyExpressionDoFirst, forInnerInterfaceDefDoFirst, forInterfaceDefDoFirst, formalParameters2VariableData, forMemberType, forNoOpExpressionDoFirst, forPackageImportStatementOnly, forPackageStatementOnly, forSimpleNamedClassInstantiation, forSimpleNameReference, forSourceFile, forSourceFileDoFirst, forStringLiteralOnly, forVariableDeclaration, getFieldAccessorName, getFile, getFormalParameterMav, getQualifiedClassName, getQualifiedClassName, getQualifiedSymbolData, getQualifiedSymbolData, getQualifiedSymbolData, getQualifiedSymbolData, getSymbolData, getSymbolData, getSymbolData, getSymbolData, getSymbolData, getUnqualifiedClassName, identifyInnerClasses, isConstructor, isDuplicateVariableData, isJavaLibraryClass, makeContinuation, prune, referenceType2String, resolveSymbol
 
Methods inherited from class edu.rice.cs.javalanglevels.JExpressionIFPrunableDepthFirstVisitor
defaultCase, defaultDoFirst, forAbstractMethodDef, forAbstractMethodDefOnly, forAndExpression, forAndExpressionDoFirst, forAndExpressionOnly, forAnonymousClassInstantiationDoFirst, forAnonymousClassInstantiationOnly, forArrayAccess, forArrayAccessDoFirst, forArrayAccessOnly, forArrayInitializer, forArrayInitializerDoFirst, forArrayInitializerOnly, forArrayInstantiationDoFirst, forArrayInstantiationOnly, forArrayType, forArrayTypeDoFirst, forArrayTypeOnly, forAssignmentExpressionDoFirst, forAssignmentExpressionOnly, forBinaryExpressionDoFirst, forBinaryExpressionOnly, forBitwiseAndAssignmentExpression, forBitwiseAndAssignmentExpressionDoFirst, forBitwiseAndAssignmentExpressionOnly, forBitwiseAndExpression, forBitwiseAndExpressionOnly, forBitwiseAssignmentExpressionOnly, forBitwiseBinaryExpressionOnly, forBitwiseNotExpression, forBitwiseNotExpressionOnly, forBitwiseOrAssignmentExpression, forBitwiseOrAssignmentExpressionDoFirst, forBitwiseOrAssignmentExpressionOnly, forBitwiseOrExpression, forBitwiseOrExpressionOnly, forBitwiseXorAssignmentExpression, forBitwiseXorAssignmentExpressionDoFirst, forBitwiseXorAssignmentExpressionOnly, forBitwiseXorExpression, forBitwiseXorExpressionOnly, forBlockDoFirst, forBlockOnly, forBodyDoFirst, forBodyOnly, forBooleanExpressionDoFirst, forBooleanExpressionOnly, forBooleanLiteral, forBooleanLiteralDoFirst, forBooleanLiteralOnly, forBracedBody, forBracedBodyDoFirst, forBracedBodyOnly, forBreakStatementDoFirst, forBreakStatementOnly, forCastExpression, forCastExpressionDoFirst, forCastExpressionOnly, forCatchBlockDoFirst, forCatchBlockOnly, forCharLiteral, forCharLiteralDoFirst, forCharLiteralOnly, forClassDefOnly, forClassImportStatement, forClassImportStatementDoFirst, forClassInstantiationDoFirst, forClassInstantiationOnly, forClassLiteral, forClassLiteralDoFirst, forClassLiteralOnly, forClassOrInterfaceType, forClassOrInterfaceTypeDoFirst, forClassOrInterfaceTypeOnly, forComparisonExpressionDoFirst, forComparisonExpressionOnly, forComplexAnonymousClassInstantiationDoFirst, forComplexAnonymousClassInstantiationOnly, forComplexInitializedArrayInstantiation, forComplexInitializedArrayInstantiationDoFirst, forComplexInitializedArrayInstantiationOnly, forComplexMethodInvocation, forComplexMethodInvocationDoFirst, forComplexMethodInvocationOnly, forComplexNamedClassInstantiation, forComplexNamedClassInstantiationDoFirst, forComplexNamedClassInstantiationOnly, forComplexNameReferenceDoFirst, forComplexNameReferenceOnly, forComplexSuperConstructorInvocation, forComplexSuperConstructorInvocationDoFirst, forComplexSuperConstructorInvocationOnly, forComplexSuperReference, forComplexSuperReferenceDoFirst, forComplexSuperReferenceOnly, forComplexThisConstructorInvocation, forComplexThisConstructorInvocationDoFirst, forComplexThisConstructorInvocationOnly, forComplexThisReference, forComplexThisReferenceDoFirst, forComplexThisReferenceOnly, forComplexUninitializedArrayInstantiation, forComplexUninitializedArrayInstantiationDoFirst, forComplexUninitializedArrayInstantiationOnly, forCompoundWord, forCompoundWordDoFirst, forCompoundWordOnly, forConcreteMethodDef, forConcreteMethodDefOnly, forConditionalExpression, forConditionalExpressionDoFirst, forConditionalExpressionOnly, forConstructorDef, forConstructorDefDoFirst, forConstructorDefOnly, forContinueStatementDoFirst, forContinueStatementOnly, forDefaultCase, forDefaultCaseDoFirst, forDefaultCaseOnly, forDimensionExpressionList, forDimensionExpressionListDoFirst, forDimensionExpressionListOnly, forDivideAssignmentExpression, forDivideAssignmentExpressionDoFirst, forDivideAssignmentExpressionOnly, forDivideExpression, forDivideExpressionDoFirst, forDivideExpressionOnly, forDoStatement, forDoStatementDoFirst, forDoStatementOnly, forDoubleLiteral, forDoubleLiteralDoFirst, forDoubleLiteralOnly, forEmptyExpression, forEmptyExpressionOnly, forEmptyForCondition, forEmptyForConditionDoFirst, forEmptyForConditionOnly, forEmptyStatement, forEmptyStatementDoFirst, forEmptyStatementOnly, forEqualityExpressionDoFirst, forEqualityExpressionOnly, forEqualsExpression, forEqualsExpressionDoFirst, forEqualsExpressionOnly, forExpressionDoFirst, forExpressionListDoFirst, forExpressionListOnly, forExpressionOnly, forExpressionStatement, forExpressionStatementDoFirst, forExpressionStatementOnly, forFloatLiteral, forFloatLiteralDoFirst, forFloatLiteralOnly, forFormalParameter, forFormalParameterDoFirst, forFormalParameterOnly, forForStatement, forForStatementDoFirst, forForStatementOnly, forFunctionInvocationDoFirst, forFunctionInvocationOnly, forGreaterThanExpression, forGreaterThanExpressionDoFirst, forGreaterThanExpressionOnly, forGreaterThanOrEqualExpression, forGreaterThanOrEqualExpressionDoFirst, forGreaterThanOrEqualExpressionOnly, forIfThenElseStatement, forIfThenElseStatementDoFirst, forIfThenElseStatementOnly, forIfThenStatement, forIfThenStatementDoFirst, forIfThenStatementOnly, forImportStatementDoFirst, forImportStatementOnly, forIncrementExpressionDoFirst, forIncrementExpressionOnly, forInitializedArrayInstantiationDoFirst, forInitializedArrayInstantiationOnly, forInitializedVariableDeclarator, forInitializedVariableDeclaratorDoFirst, forInitializedVariableDeclaratorOnly, forInitializerDoFirst, forInitializerOnly, forInnerClassDefDoFirst, forInnerClassDefOnly, forInnerInterfaceDefOnly, forInstanceInitializerDoFirst, forInstanceInitializerOnly, forInstanceofExpression, forInstanceofExpressionDoFirst, forInstanceofExpressionOnly, forInstantiationDoFirst, forInstantiationOnly, forIntegerLiteral, forIntegerLiteralDoFirst, forIntegerLiteralOnly, forInterfaceDefOnly, forJExpressionDoFirst, forJExpressionOnly, forLabeledBreakStatement, forLabeledBreakStatementDoFirst, forLabeledBreakStatementOnly, forLabeledCase, forLabeledCaseDoFirst, forLabeledCaseOnly, forLabeledContinueStatement, forLabeledContinueStatementDoFirst, forLabeledContinueStatementOnly, forLabeledStatement, forLabeledStatementDoFirst, forLabeledStatementOnly, forLeftShiftAssignmentExpression, forLeftShiftAssignmentExpressionDoFirst, forLeftShiftAssignmentExpressionOnly, forLeftShiftExpression, forLeftShiftExpressionDoFirst, forLeftShiftExpressionOnly, forLessThanExpression, forLessThanExpressionDoFirst, forLessThanExpressionOnly, forLessThanOrEqualExpression, forLessThanOrEqualExpressionDoFirst, forLessThanOrEqualExpressionOnly, forLexicalLiteralDoFirst, forLexicalLiteralOnly, forLongLiteral, forLongLiteralDoFirst, forLongLiteralOnly, forMemberTypeDoFirst, forMemberTypeOnly, forMethodDefOnly, forMethodInvocationDoFirst, forMethodInvocationOnly, forMinusAssignmentExpression, forMinusAssignmentExpressionDoFirst, forMinusAssignmentExpressionOnly, forMinusExpression, forMinusExpressionDoFirst, forMinusExpressionOnly, forModAssignmentExpression, forModAssignmentExpressionDoFirst, forModAssignmentExpressionOnly, forModExpression, forModExpressionDoFirst, forModExpressionOnly, forModifiersAndVisibility, forModifiersAndVisibilityOnly, forMultiplyAssignmentExpression, forMultiplyAssignmentExpressionDoFirst, forMultiplyAssignmentExpressionOnly, forMultiplyExpression, forMultiplyExpressionDoFirst, forMultiplyExpressionOnly, forNamedClassInstantiationDoFirst, forNamedClassInstantiationOnly, forNameReferenceDoFirst, forNameReferenceOnly, forNegativeExpression, forNegativeExpressionDoFirst, forNegativeExpressionOnly, forNegativePostfixIncrementExpression, forNegativePostfixIncrementExpressionDoFirst, forNegativePostfixIncrementExpressionOnly, forNegativePrefixIncrementExpression, forNegativePrefixIncrementExpressionDoFirst, forNegativePrefixIncrementExpressionOnly, forNoOpExpression, forNoOpExpressionOnly, forNormalTryCatchStatement, forNormalTryCatchStatementDoFirst, forNormalTryCatchStatementOnly, forNotEqualExpression, forNotEqualExpressionDoFirst, forNotEqualExpressionOnly, forNotExpression, forNotExpressionDoFirst, forNotExpressionOnly, forNullLiteral, forNullLiteralDoFirst, forNullLiteralOnly, forNumericAssignmentExpressionDoFirst, forNumericAssignmentExpressionOnly, forNumericBinaryExpressionDoFirst, forNumericBinaryExpressionOnly, forNumericUnaryExpressionDoFirst, forNumericUnaryExpressionOnly, forOrExpression, forOrExpressionDoFirst, forOrExpressionOnly, forPackageImportStatement, forPackageImportStatementDoFirst, forPackageStatement, forPackageStatementDoFirst, forParenthesized, forParenthesizedDoFirst, forParenthesizedExpressionList, forParenthesizedExpressionListDoFirst, forParenthesizedExpressionListOnly, forParenthesizedOnly, forPlusAssignmentExpression, forPlusAssignmentExpressionDoFirst, forPlusAssignmentExpressionOnly, forPlusExpression, forPlusExpressionDoFirst, forPlusExpressionOnly, forPositiveExpression, forPositiveExpressionDoFirst, forPositiveExpressionOnly, forPositivePostfixIncrementExpression, forPositivePostfixIncrementExpressionDoFirst, forPositivePostfixIncrementExpressionOnly, forPositivePrefixIncrementExpression, forPositivePrefixIncrementExpressionDoFirst, forPositivePrefixIncrementExpressionOnly, forPostfixIncrementExpressionDoFirst, forPostfixIncrementExpressionOnly, forPrefixIncrementExpressionDoFirst, forPrefixIncrementExpressionOnly, forPrimaryDoFirst, forPrimaryOnly, forPrimitiveType, forPrimitiveTypeDoFirst, forPrimitiveTypeOnly, forReferenceTypeDoFirst, forReferenceTypeOnly, forReturnStatementDoFirst, forReturnStatementOnly, forRightSignedShiftAssignmentExpression, forRightSignedShiftAssignmentExpressionDoFirst, forRightSignedShiftAssignmentExpressionOnly, forRightSignedShiftExpression, forRightSignedShiftExpressionDoFirst, forRightSignedShiftExpressionOnly, forRightUnsignedShiftAssignmentExpression, forRightUnsignedShiftAssignmentExpressionDoFirst, forRightUnsignedShiftAssignmentExpressionOnly, forRightUnsignedShiftExpression, forRightUnsignedShiftExpressionDoFirst, forRightUnsignedShiftExpressionOnly, forShiftAssignmentExpressionOnly, forShiftBinaryExpressionOnly, forSimpleAnonymousClassInstantiationDoFirst, forSimpleAnonymousClassInstantiationOnly, forSimpleAssignmentExpression, forSimpleAssignmentExpressionDoFirst, forSimpleAssignmentExpressionOnly, forSimpleInitializedArrayInstantiation, forSimpleInitializedArrayInstantiationDoFirst, forSimpleInitializedArrayInstantiationOnly, forSimpleMethodInvocation, forSimpleMethodInvocationDoFirst, forSimpleMethodInvocationOnly, forSimpleNamedClassInstantiationDoFirst, forSimpleNamedClassInstantiationOnly, forSimpleNameReferenceDoFirst, forSimpleNameReferenceOnly, forSimpleSuperConstructorInvocation, forSimpleSuperConstructorInvocationDoFirst, forSimpleSuperConstructorInvocationOnly, forSimpleSuperReference, forSimpleSuperReferenceDoFirst, forSimpleSuperReferenceOnly, forSimpleThisConstructorInvocation, forSimpleThisConstructorInvocationDoFirst, forSimpleThisConstructorInvocationOnly, forSimpleThisReference, forSimpleThisReferenceDoFirst, forSimpleThisReferenceOnly, forSimpleUninitializedArrayInstantiation, forSimpleUninitializedArrayInstantiationDoFirst, forSimpleUninitializedArrayInstantiationOnly, forSourceFileOnly, forStatementDoFirst, forStatementOnly, forStaticInitializer, forStaticInitializerDoFirst, forStaticInitializerOnly, forStringLiteral, forStringLiteralDoFirst, forSuperConstructorInvocationDoFirst, forSuperConstructorInvocationOnly, forSuperReferenceDoFirst, forSuperReferenceOnly, forSwitchCaseDoFirst, forSwitchCaseOnly, forSwitchStatement, forSwitchStatementDoFirst, forSwitchStatementOnly, forSynchronizedStatement, forSynchronizedStatementOnly, forThisConstructorInvocationDoFirst, forThisConstructorInvocationOnly, forThisReferenceOnly, forThrowStatement, forThrowStatementDoFirst, forThrowStatementOnly, forTryCatchFinallyStatement, forTryCatchFinallyStatementDoFirst, forTryCatchFinallyStatementOnly, forTryCatchStatementDoFirst, forTryCatchStatementOnly, forTypeDefBaseDoFirst, forTypeDefBaseOnly, forTypeDoFirst, forTypeOnly, forTypeParameter, forTypeParameterOnly, forTypeVariable, forTypeVariableDoFirst, forTypeVariableOnly, forUnaryExpressionDoFirst, forUnaryExpressionOnly, forUnbracedBody, forUnbracedBodyDoFirst, forUnbracedBodyOnly, forUninitializedArrayInstantiationDoFirst, forUninitializedArrayInstantiationOnly, forUninitializedVariableDeclarator, forUninitializedVariableDeclaratorDoFirst, forUninitializedVariableDeclaratorOnly, forUnlabeledBreakStatement, forUnlabeledBreakStatementDoFirst, forUnlabeledBreakStatementOnly, forUnlabeledContinueStatement, forUnlabeledContinueStatementDoFirst, forUnlabeledContinueStatementOnly, forUnparenthesizedExpressionList, forUnparenthesizedExpressionListDoFirst, forUnparenthesizedExpressionListOnly, forValueReturnStatement, forValueReturnStatementDoFirst, forValueReturnStatementOnly, forVariableDeclarationDoFirst, forVariableDeclaratorDoFirst, forVariableDeclaratorOnly, forVariableReferenceDoFirst, forVariableReferenceOnly, forVoidReturn, forVoidReturnDoFirst, forVoidReturnOnly, forVoidReturnStatement, forVoidReturnStatementDoFirst, forVoidReturnStatementOnly, forWhileStatement, forWhileStatementDoFirst, forWhileStatementOnly, forWord, forWordDoFirst, forWordOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BodyBodyIntermediateVisitor

public BodyBodyIntermediateVisitor(BodyData bodyData,
                                   File file,
                                   String packageName,
                                   String enclosingClassName,
                                   LinkedList<String> importedFiles,
                                   LinkedList<String> importedPackages,
                                   HashSet<String> classesInThisFile,
                                   Hashtable<String,Triple<SourceInfo,LanguageLevelVisitor,SymbolData>> continuations,
                                   LinkedList<Command> fixUps,
                                   HashSet<String> innerClassesInThisBody)
Constructor for BodyBodyElementaryVisitor.

Parameters:
bodyData - The BodyData that encloses the context we are visiting.
file - The source file this came from.
packageName - The package the source file is in
importedPackages - A list of package names that were specifically imported
classesInThisFile - A list of the classes that are yet to be defined in this source file
continuations - A hashtable corresponding to the continuations (unresolved Symbol Datas) that will need to be resolved
fixUps - A list of commands to be performed after this pass to fixup the symbolTable
Method Detail

forMethodDefDoFirst

public Void forMethodDefDoFirst(MethodDef that)
Give an appropriate error

Overrides:
forMethodDefDoFirst in class JExpressionIFPrunableDepthFirstVisitor

forInstanceInitializer

public Void forInstanceInitializer(InstanceInitializer that)
Description copied from interface: JExpressionIFVisitor
Process an instance of InstanceInitializer.

Specified by:
forInstanceInitializer in interface JExpressionIFVisitor<Void>
Overrides:
forInstanceInitializer in class JExpressionIFPrunableDepthFirstVisitor

forBlock

public Void forBlock(Block that)
Description copied from interface: JExpressionIFVisitor
Process an instance of Block.

Specified by:
forBlock in interface JExpressionIFVisitor<Void>
Overrides:
forBlock in class JExpressionIFPrunableDepthFirstVisitor

forCatchBlock

public Void forCatchBlock(CatchBlock that)
Visit the block as in forBlock(), but first add the exception parameter as a variable in that lock. TODO: move this method into LanguageLevelVisitor.

Specified by:
forCatchBlock in interface JExpressionIFVisitor<Void>
Overrides:
forCatchBlock in class JExpressionIFPrunableDepthFirstVisitor

forVariableDeclarationOnly

public Void forVariableDeclarationOnly(VariableDeclaration that)
Adds the variables that were declared to the body data and make sure that no two variables have the same name.

Overrides:
forVariableDeclarationOnly in class JExpressionIFPrunableDepthFirstVisitor

forInnerClassDef

public Void forInnerClassDef(InnerClassDef that)
Process a local inner class definition

Specified by:
forInnerClassDef in interface JExpressionIFVisitor<Void>
Overrides:
forInnerClassDef in class JExpressionIFPrunableDepthFirstVisitor

forInnerInterfaceDef

public Void forInnerInterfaceDef(InnerInterfaceDef that)
Process a local inner interface definition

Specified by:
forInnerInterfaceDef in interface JExpressionIFVisitor<Void>
Overrides:
forInnerInterfaceDef in class JExpressionIFPrunableDepthFirstVisitor

forSimpleAnonymousClassInstantiation

public Void forSimpleAnonymousClassInstantiation(SimpleAnonymousClassInstantiation that)
Delegate to helper method.

Specified by:
forSimpleAnonymousClassInstantiation in interface JExpressionIFVisitor<Void>
Overrides:
forSimpleAnonymousClassInstantiation in class JExpressionIFPrunableDepthFirstVisitor

forComplexAnonymousClassInstantiation

public Void forComplexAnonymousClassInstantiation(ComplexAnonymousClassInstantiation that)
Delegate to helper method.

Specified by:
forComplexAnonymousClassInstantiation in interface JExpressionIFVisitor<Void>
Overrides:
forComplexAnonymousClassInstantiation in class JExpressionIFPrunableDepthFirstVisitor

forThisReferenceDoFirst

public Void forThisReferenceDoFirst(ThisReference that)
If this is the body of a constructor, referencing 'this' is illegal. So, check to see if this is a constructor, and if so, throw an error. This should catch both the ComplexThisReference and the SimpleThisReference case.

Overrides:
forThisReferenceDoFirst in class JExpressionIFPrunableDepthFirstVisitor

_variableDeclaration2VariableData

protected VariableData[] _variableDeclaration2VariableData(VariableDeclaration vd,
                                                           Data enclosingData)
Process a local variable declaration within a method. Calls the super method to convert these to a VariableData array, then makes sure that each VariableData is set to be final, as required at the Intermediate level.

Overrides:
_variableDeclaration2VariableData in class LanguageLevelVisitor
Parameters:
enclosingData - The Data which contains the variables