<s> package org . eclipse . jdt . internal . compiler . ast ; import org . eclipse . jdt . internal . compiler . codegen . * ; import org . eclipse . jdt . internal . compiler . flow . * ; import org . eclipse . jdt . internal . compiler . impl . Constant ; import org . eclipse . jdt . internal . compiler . lookup . * ; public abstract class Statement extends ASTNode { protected static boolean isKnowDeadCodePattern ( Expression expression ) { if ( expression instanceof UnaryExpression ) { expression = ( ( UnaryExpression ) expression ) . expression ; } if ( expression instanceof Reference ) return true ; return false ; } public abstract FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) ; public static final int NOT_COMPLAINED = 0 ; public static final int COMPLAINED_FAKE_REACHABLE = 1 ; public static final int COMPLAINED_UNREACHABLE = 2 ; protected int checkAgainstNullAnnotation ( BlockScope currentScope , LocalVariableBinding local , int nullStatus ) { return nullStatus ; } public void branchChainTo ( BranchLabel label ) { } public int complainIfUnreachable ( FlowInfo flowInfo , BlockScope scope , int previousComplaintLevel ) { if ( ( flowInfo . reachMode ( ) & FlowInfo . UNREACHABLE ) != 0 ) { if ( ( flowInfo . reachMode ( ) & FlowInfo . UNREACHABLE_OR_DEAD ) != 0 ) this . bits &= ~ ASTNode . IsReachable ; if ( flowInfo == FlowInfo . DEAD_END ) { if ( previousComplaintLevel < COMPLAINED_UNREACHABLE ) { scope . problemReporter ( ) . unreachableCode ( this ) ; } return COMPLAINED_UNREACHABLE ; } else { if ( previousComplaintLevel < COMPLAINED_FAKE_REACHABLE ) { scope . problemReporter ( ) . fakeReachable ( this ) ; } return COMPLAINED_FAKE_REACHABLE ; } } return previousComplaintLevel ; } public void generateArguments ( MethodBinding binding , Expression [ ] arguments , BlockScope currentScope , CodeStream codeStream ) { if ( binding . isVarargs ( ) ) { TypeBinding [ ] params = binding . parameters ; int paramLength = params . length ; int varArgIndex = paramLength - 1 ; for ( int i = 0 ; i < varArgIndex ; i ++ ) { arguments [ i ] . generateCode ( currentScope , codeStream , true ) ; } ArrayBinding varArgsType = ( ArrayBinding ) params [ varArgIndex ] ; ArrayBinding codeGenVarArgsType = ( ArrayBinding ) binding . parameters [ varArgIndex ] . erasure ( ) ; int elementsTypeID = varArgsType . elementsType ( ) . id ; int argLength = arguments == null ? 0 : arguments . length ; if ( argLength > paramLength ) { codeStream . generateInlinedValue ( argLength - varArgIndex ) ; codeStream . newArray ( codeGenVarArgsType ) ; for ( int i = varArgIndex ; i < argLength ; i ++ ) { codeStream . dup ( ) ; codeStream . generateInlinedValue ( i - varArgIndex ) ; arguments [ i ] . generateCode ( currentScope , codeStream , true ) ; codeStream . arrayAtPut ( elementsTypeID , false ) ; } } else if ( argLength == paramLength ) { TypeBinding lastType = arguments [ varArgIndex ] . resolvedType ; if ( lastType == TypeBinding . NULL || ( varArgsType . dimensions ( ) == lastType . dimensions ( ) && lastType . isCompatibleWith ( varArgsType ) ) ) { arguments [ varArgIndex ] . generateCode ( currentScope , codeStream , true ) ; } else { codeStream . generateInlinedValue ( 1 ) ; codeStream . newArray ( codeGenVarArgsType ) ; codeStream . dup ( ) ; codeStream . generateInlinedValue ( 0 ) ; arguments [ varArgIndex ] . generateCode ( currentScope , codeStream , true ) ; codeStream . arrayAtPut ( elementsTypeID , false ) ; } } else { codeStream . generateInlinedValue ( 0 ) ; codeStream . newArray ( codeGenVarArgsType ) ; } } else if ( arguments != null ) { for ( int i = 0 , max = arguments . length ; i < max ; i ++ ) arguments [ i ] . generateCode ( currentScope , codeStream , true ) ; } } public abstract void generateCode ( BlockScope currentScope , CodeStream codeStream ) ; protected boolean isBoxingCompatible ( TypeBinding expressionType , TypeBinding targetType , Expression expression , Scope scope ) { if ( scope . isBoxingCompatibleWith ( expressionType , targetType ) ) return true ; return expressionType . isBaseType ( ) && ! targetType . isBaseType ( ) && ! targetType . isTypeVariable ( ) && scope . compilerOptions ( ) . sourceLevel >= org . eclipse . jdt . internal . compiler . classfmt . ClassFileConstants . JDK1_5 && expression . isConstantValueOfTypeAssignableToType ( expressionType , scope . environment ( ) . computeBoxingType ( targetType ) ) ; } public boolean isEmptyBlock ( ) { return false ; } public boolean isValidJavaStatement ( ) { return true ; } public StringBuffer print ( int indent , StringBuffer output ) { return printStatement ( indent , output ) ; } public abstract StringBuffer printStatement ( int indent , StringBuffer output ) ; public abstract void resolve ( BlockScope scope ) ; public Constant resolveCase ( BlockScope scope , TypeBinding testType , SwitchStatement switchStatement ) { resolve ( scope ) ; return Constant . NotAConstant ; } public TypeBinding expectedType ( ) { return null ; } } </s>