text
stringlengths
30
1.67M
<s> package org . eclipse . jdt . internal . compiler . codegen ; import org . eclipse . jdt . core . compiler . CharOperation ; import org . eclipse . jdt . internal . compiler . ClassFile ; import org . eclipse . jdt . internal . compiler . CompilationResult ; import org . eclipse . jdt . internal . compiler . ast . ASTNode ; import org . eclipse . jdt . internal . compiler . ast . AbstractMethodDeclaration ; import org . eclipse . jdt . internal . compiler . ast . AbstractVariableDeclaration ; import org . eclipse . jdt . internal . compiler . ast . AllocationExpression ; import org . eclipse . jdt . internal . compiler . ast . ExplicitConstructorCall ; import org . eclipse . jdt . internal . compiler . ast . Expression ; import org . eclipse . jdt . internal . compiler . ast . FieldDeclaration ; import org . eclipse . jdt . internal . compiler . ast . OperatorIds ; import org . eclipse . jdt . internal . compiler . ast . TypeDeclaration ; import org . eclipse . jdt . internal . compiler . classfmt . ClassFileConstants ; import org . eclipse . jdt . internal . compiler . flow . UnconditionalFlowInfo ; import org . eclipse . jdt . internal . compiler . impl . CompilerOptions ; import org . eclipse . jdt . internal . compiler . impl . Constant ; import org . eclipse . jdt . internal . compiler . lookup . * ; import org . eclipse . jdt . internal . compiler . problem . AbortMethod ; import org . eclipse . jdt . internal . compiler . util . Util ; public class CodeStream { public static FieldBinding [ ] ImplicitThis = new FieldBinding [ ] { } ; public static final int LABELS_INCREMENT = <NUM_LIT:5> ; public static final int LOCALS_INCREMENT = <NUM_LIT:10> ; static ExceptionLabel [ ] noExceptionHandlers = new ExceptionLabel [ LABELS_INCREMENT ] ; static BranchLabel [ ] noLabels = new BranchLabel [ LABELS_INCREMENT ] ; static LocalVariableBinding [ ] noLocals = new LocalVariableBinding [ LOCALS_INCREMENT ] ; static LocalVariableBinding [ ] noVisibleLocals = new LocalVariableBinding [ LOCALS_INCREMENT ] ; public static final CompilationResult RESTART_IN_WIDE_MODE = new CompilationResult ( ( char [ ] ) null , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) ; public static final CompilationResult RESTART_CODE_GEN_FOR_UNUSED_LOCALS_MODE = new CompilationResult ( ( char [ ] ) null , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) ; public int allLocalsCounter ; public byte [ ] bCodeStream ; public ClassFile classFile ; public int classFileOffset ; public ConstantPool constantPool ; public int countLabels ; public ExceptionLabel [ ] exceptionLabels = new ExceptionLabel [ LABELS_INCREMENT ] ; public int exceptionLabelsCounter ; public int generateAttributes ; static final int L_UNKNOWN = <NUM_LIT:0> , L_OPTIMIZABLE = <NUM_LIT:2> , L_CANNOT_OPTIMIZE = <NUM_LIT:4> ; public BranchLabel [ ] labels = new BranchLabel [ LABELS_INCREMENT ] ; public int lastEntryPC ; public int lastAbruptCompletion ; public int [ ] lineSeparatorPositions ; public int lineNumberStart ; public int lineNumberEnd ; public LocalVariableBinding [ ] locals = new LocalVariableBinding [ LOCALS_INCREMENT ] ; public int maxFieldCount ; public int maxLocals ; public AbstractMethodDeclaration methodDeclaration ; public int [ ] pcToSourceMap = new int [ <NUM_LIT:24> ] ; public int pcToSourceMapSize ; public int position ; public boolean preserveUnusedLocals ; public int stackDepth ; public int stackMax ; public int startingClassFileOffset ; protected long targetLevel ; public LocalVariableBinding [ ] visibleLocals = new LocalVariableBinding [ LOCALS_INCREMENT ] ; int visibleLocalsCount ; public boolean wideMode = false ; public CodeStream ( ClassFile givenClassFile ) { this . targetLevel = givenClassFile . targetJDK ; this . generateAttributes = givenClassFile . produceAttributes ; if ( ( givenClassFile . produceAttributes & ClassFileConstants . ATTR_LINES ) != <NUM_LIT:0> ) { this . lineSeparatorPositions = givenClassFile . referenceBinding . scope . referenceCompilationUnit ( ) . compilationResult . getLineSeparatorPositions ( ) ; } } public static int insertionIndex ( int [ ] pcToSourceMap , int length , int pc ) { int g = <NUM_LIT:0> ; int d = length - <NUM_LIT:2> ; int m = <NUM_LIT:0> ; while ( g <= d ) { m = ( g + d ) / <NUM_LIT:2> ; if ( ( m & <NUM_LIT:1> ) != <NUM_LIT:0> ) m -- ; int currentPC = pcToSourceMap [ m ] ; if ( pc < currentPC ) { d = m - <NUM_LIT:2> ; } else if ( pc > currentPC ) { g = m + <NUM_LIT:2> ; } else { return - <NUM_LIT:1> ; } } if ( pc < pcToSourceMap [ m ] ) return m ; return m + <NUM_LIT:2> ; } public static final void sort ( int [ ] tab , int lo0 , int hi0 , int [ ] result ) { int lo = lo0 ; int hi = hi0 ; int mid ; if ( hi0 > lo0 ) { mid = tab [ lo0 + ( hi0 - lo0 ) / <NUM_LIT:2> ] ; while ( lo <= hi ) { while ( ( lo < hi0 ) && ( tab [ lo ] < mid ) ) ++ lo ; while ( ( hi > lo0 ) && ( tab [ hi ] > mid ) ) -- hi ; if ( lo <= hi ) { swap ( tab , lo , hi , result ) ; ++ lo ; -- hi ; } } if ( lo0 < hi ) sort ( tab , lo0 , hi , result ) ; if ( lo < hi0 ) sort ( tab , lo , hi0 , result ) ; } } private static final void swap ( int a [ ] , int i , int j , int result [ ] ) { int T ; T = a [ i ] ; a [ i ] = a [ j ] ; a [ j ] = T ; T = result [ j ] ; result [ j ] = result [ i ] ; result [ i ] = T ; } public void aaload ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_aaload ; } public void aastore ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:3> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_aastore ; } public void aconst_null ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) { this . stackMax = this . stackDepth ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_aconst_null ; } public void addDefinitelyAssignedVariables ( Scope scope , int initStateIndex ) { if ( ( this . generateAttributes & ( ClassFileConstants . ATTR_VARS | ClassFileConstants . ATTR_STACK_MAP_TABLE | ClassFileConstants . ATTR_STACK_MAP ) ) == <NUM_LIT:0> ) return ; for ( int i = <NUM_LIT:0> ; i < this . visibleLocalsCount ; i ++ ) { LocalVariableBinding localBinding = this . visibleLocals [ i ] ; if ( localBinding != null ) { if ( isDefinitelyAssigned ( scope , initStateIndex , localBinding ) ) { if ( ( localBinding . initializationCount == <NUM_LIT:0> ) || ( localBinding . initializationPCs [ ( ( localBinding . initializationCount - <NUM_LIT:1> ) << <NUM_LIT:1> ) + <NUM_LIT:1> ] != - <NUM_LIT:1> ) ) { localBinding . recordInitializationStartPC ( this . position ) ; } } } } } public void addLabel ( BranchLabel aLabel ) { if ( this . countLabels == this . labels . length ) System . arraycopy ( this . labels , <NUM_LIT:0> , this . labels = new BranchLabel [ this . countLabels + LABELS_INCREMENT ] , <NUM_LIT:0> , this . countLabels ) ; this . labels [ this . countLabels ++ ] = aLabel ; } public void addVariable ( LocalVariableBinding localBinding ) { } public void addVisibleLocalVariable ( LocalVariableBinding localBinding ) { if ( ( this . generateAttributes & ( ClassFileConstants . ATTR_VARS | ClassFileConstants . ATTR_STACK_MAP_TABLE | ClassFileConstants . ATTR_STACK_MAP ) ) == <NUM_LIT:0> ) return ; if ( this . visibleLocalsCount >= this . visibleLocals . length ) System . arraycopy ( this . visibleLocals , <NUM_LIT:0> , this . visibleLocals = new LocalVariableBinding [ this . visibleLocalsCount * <NUM_LIT:2> ] , <NUM_LIT:0> , this . visibleLocalsCount ) ; this . visibleLocals [ this . visibleLocalsCount ++ ] = localBinding ; } public void aload ( int iArg ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . maxLocals <= iArg ) { this . maxLocals = iArg + <NUM_LIT:1> ; } if ( iArg > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_wide ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_aload ; writeUnsignedShort ( iArg ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_aload ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) iArg ; } } public void aload_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) { this . stackMax = this . stackDepth ; } if ( this . maxLocals == <NUM_LIT:0> ) { this . maxLocals = <NUM_LIT:1> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_aload_0 ; } public void aload_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . maxLocals <= <NUM_LIT:1> ) { this . maxLocals = <NUM_LIT:2> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_aload_1 ; } public void aload_2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . maxLocals <= <NUM_LIT:2> ) { this . maxLocals = <NUM_LIT:3> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_aload_2 ; } public void aload_3 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . maxLocals <= <NUM_LIT:3> ) { this . maxLocals = <NUM_LIT:4> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_aload_3 ; } public void anewarray ( TypeBinding typeBinding ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_anewarray ; writeUnsignedShort ( this . constantPool . literalIndexForType ( typeBinding ) ) ; } public void areturn ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_areturn ; this . lastAbruptCompletion = this . position ; } public void arrayAt ( int typeBindingID ) { switch ( typeBindingID ) { case TypeIds . T_int : iaload ( ) ; break ; case TypeIds . T_byte : case TypeIds . T_boolean : baload ( ) ; break ; case TypeIds . T_short : saload ( ) ; break ; case TypeIds . T_char : caload ( ) ; break ; case TypeIds . T_long : laload ( ) ; break ; case TypeIds . T_float : faload ( ) ; break ; case TypeIds . T_double : daload ( ) ; break ; default : aaload ( ) ; } } public void arrayAtPut ( int elementTypeID , boolean valueRequired ) { switch ( elementTypeID ) { case TypeIds . T_int : if ( valueRequired ) dup_x2 ( ) ; iastore ( ) ; break ; case TypeIds . T_byte : case TypeIds . T_boolean : if ( valueRequired ) dup_x2 ( ) ; bastore ( ) ; break ; case TypeIds . T_short : if ( valueRequired ) dup_x2 ( ) ; sastore ( ) ; break ; case TypeIds . T_char : if ( valueRequired ) dup_x2 ( ) ; castore ( ) ; break ; case TypeIds . T_long : if ( valueRequired ) dup2_x2 ( ) ; lastore ( ) ; break ; case TypeIds . T_float : if ( valueRequired ) dup_x2 ( ) ; fastore ( ) ; break ; case TypeIds . T_double : if ( valueRequired ) dup2_x2 ( ) ; dastore ( ) ; break ; default : if ( valueRequired ) dup_x2 ( ) ; aastore ( ) ; } } public void arraylength ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_arraylength ; } public void astore ( int iArg ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals <= iArg ) { this . maxLocals = iArg + <NUM_LIT:1> ; } if ( iArg > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_wide ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_astore ; writeUnsignedShort ( iArg ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_astore ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) iArg ; } } public void astore_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals == <NUM_LIT:0> ) { this . maxLocals = <NUM_LIT:1> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_astore_0 ; } public void astore_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals <= <NUM_LIT:1> ) { this . maxLocals = <NUM_LIT:2> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_astore_1 ; } public void astore_2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals <= <NUM_LIT:2> ) { this . maxLocals = <NUM_LIT:3> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_astore_2 ; } public void astore_3 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals <= <NUM_LIT:3> ) { this . maxLocals = <NUM_LIT:4> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_astore_3 ; } public void athrow ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_athrow ; this . lastAbruptCompletion = this . position ; } public void baload ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_baload ; } public void bastore ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:3> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_bastore ; } public void bipush ( byte b ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_bipush ; this . bCodeStream [ this . classFileOffset ++ ] = b ; } public void caload ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_caload ; } public void castore ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:3> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_castore ; } public void checkcast ( int baseId ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_checkcast ; switch ( baseId ) { case TypeIds . T_byte : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangByteConstantPoolName ) ) ; break ; case TypeIds . T_short : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangShortConstantPoolName ) ) ; break ; case TypeIds . T_char : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangCharacterConstantPoolName ) ) ; break ; case TypeIds . T_int : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangIntegerConstantPoolName ) ) ; break ; case TypeIds . T_long : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangLongConstantPoolName ) ) ; break ; case TypeIds . T_float : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangFloatConstantPoolName ) ) ; break ; case TypeIds . T_double : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangDoubleConstantPoolName ) ) ; break ; case TypeIds . T_boolean : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangBooleanConstantPoolName ) ) ; } } public void checkcast ( TypeBinding typeBinding ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_checkcast ; writeUnsignedShort ( this . constantPool . literalIndexForType ( typeBinding ) ) ; } public void d2f ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_d2f ; } public void d2i ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_d2i ; } public void d2l ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_d2l ; } public void dadd ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dadd ; } public void daload ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_daload ; } public void dastore ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:4> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dastore ; } public void dcmpg ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:3> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dcmpg ; } public void dcmpl ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:3> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dcmpl ; } public void dconst_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dconst_0 ; } public void dconst_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dconst_1 ; } public void ddiv ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ddiv ; } public void decrStackSize ( int offset ) { this . stackDepth -= offset ; } public void dload ( int iArg ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . maxLocals < iArg + <NUM_LIT:2> ) { this . maxLocals = iArg + <NUM_LIT:2> ; } if ( iArg > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_wide ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dload ; writeUnsignedShort ( iArg ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dload ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) iArg ; } } public void dload_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . maxLocals < <NUM_LIT:2> ) { this . maxLocals = <NUM_LIT:2> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dload_0 ; } public void dload_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . maxLocals < <NUM_LIT:3> ) { this . maxLocals = <NUM_LIT:3> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dload_1 ; } public void dload_2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . maxLocals < <NUM_LIT:4> ) { this . maxLocals = <NUM_LIT:4> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dload_2 ; } public void dload_3 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . maxLocals < <NUM_LIT:5> ) { this . maxLocals = <NUM_LIT:5> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dload_3 ; } public void dmul ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dmul ; } public void dneg ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dneg ; } public void drem ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_drem ; } public void dreturn ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dreturn ; this . lastAbruptCompletion = this . position ; } public void dstore ( int iArg ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . maxLocals <= iArg + <NUM_LIT:1> ) { this . maxLocals = iArg + <NUM_LIT:2> ; } if ( iArg > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_wide ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dstore ; writeUnsignedShort ( iArg ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dstore ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) iArg ; } } public void dstore_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . maxLocals < <NUM_LIT:2> ) { this . maxLocals = <NUM_LIT:2> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dstore_0 ; } public void dstore_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . maxLocals < <NUM_LIT:3> ) { this . maxLocals = <NUM_LIT:3> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dstore_1 ; } public void dstore_2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . maxLocals < <NUM_LIT:4> ) { this . maxLocals = <NUM_LIT:4> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dstore_2 ; } public void dstore_3 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . maxLocals < <NUM_LIT:5> ) { this . maxLocals = <NUM_LIT:5> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dstore_3 ; } public void dsub ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dsub ; } public void dup ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) { this . stackMax = this . stackDepth ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dup ; } public void dup_x1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dup_x1 ; } public void dup_x2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dup_x2 ; } public void dup2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dup2 ; } public void dup2_x1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dup2_x1 ; } public void dup2_x2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_dup2_x2 ; } public void exitUserScope ( BlockScope currentScope ) { if ( ( this . generateAttributes & ( ClassFileConstants . ATTR_VARS | ClassFileConstants . ATTR_STACK_MAP_TABLE | ClassFileConstants . ATTR_STACK_MAP ) ) == <NUM_LIT:0> ) return ; int index = this . visibleLocalsCount - <NUM_LIT:1> ; while ( index >= <NUM_LIT:0> ) { LocalVariableBinding visibleLocal = this . visibleLocals [ index ] ; if ( visibleLocal == null || visibleLocal . declaringScope != currentScope ) { index -- ; continue ; } if ( visibleLocal . initializationCount > <NUM_LIT:0> ) { visibleLocal . recordInitializationEndPC ( this . position ) ; } this . visibleLocals [ index -- ] = null ; } } public void exitUserScope ( BlockScope currentScope , LocalVariableBinding binding ) { if ( ( this . generateAttributes & ( ClassFileConstants . ATTR_VARS | ClassFileConstants . ATTR_STACK_MAP_TABLE | ClassFileConstants . ATTR_STACK_MAP ) ) == <NUM_LIT:0> ) return ; int index = this . visibleLocalsCount - <NUM_LIT:1> ; while ( index >= <NUM_LIT:0> ) { LocalVariableBinding visibleLocal = this . visibleLocals [ index ] ; if ( visibleLocal == null || visibleLocal . declaringScope != currentScope || visibleLocal == binding ) { index -- ; continue ; } if ( visibleLocal . initializationCount > <NUM_LIT:0> ) { visibleLocal . recordInitializationEndPC ( this . position ) ; } this . visibleLocals [ index -- ] = null ; } } public void f2d ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_f2d ; } public void f2i ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_f2i ; } public void f2l ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_f2l ; } public void fadd ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fadd ; } public void faload ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_faload ; } public void fastore ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:3> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fastore ; } public void fcmpg ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fcmpg ; } public void fcmpl ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fcmpl ; } public void fconst_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fconst_0 ; } public void fconst_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fconst_1 ; } public void fconst_2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fconst_2 ; } public void fdiv ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fdiv ; } public void fieldAccess ( byte opcode , FieldBinding fieldBinding , TypeBinding declaringClass ) { if ( declaringClass == null ) declaringClass = fieldBinding . declaringClass ; if ( ( declaringClass . tagBits & TagBits . ContainsNestedTypeReferences ) != <NUM_LIT:0> ) { Util . recordNestedType ( this . classFile , declaringClass ) ; } TypeBinding returnType = fieldBinding . type ; int returnTypeSize ; switch ( returnType . id ) { case TypeIds . T_long : case TypeIds . T_double : returnTypeSize = <NUM_LIT:2> ; break ; default : returnTypeSize = <NUM_LIT:1> ; break ; } this . fieldAccess ( opcode , returnTypeSize , declaringClass . constantPoolName ( ) , fieldBinding . name , returnType . signature ( ) ) ; } private void fieldAccess ( byte opcode , int returnTypeSize , char [ ] declaringClass , char [ ] fieldName , char [ ] signature ) { this . countLabels = <NUM_LIT:0> ; switch ( opcode ) { case Opcodes . OPC_getfield : if ( returnTypeSize == <NUM_LIT:2> ) { this . stackDepth ++ ; } break ; case Opcodes . OPC_getstatic : if ( returnTypeSize == <NUM_LIT:2> ) { this . stackDepth += <NUM_LIT:2> ; } else { this . stackDepth ++ ; } break ; case Opcodes . OPC_putfield : if ( returnTypeSize == <NUM_LIT:2> ) { this . stackDepth -= <NUM_LIT:3> ; } else { this . stackDepth -= <NUM_LIT:2> ; } break ; case Opcodes . OPC_putstatic : if ( returnTypeSize == <NUM_LIT:2> ) { this . stackDepth -= <NUM_LIT:2> ; } else { this . stackDepth -- ; } } if ( this . stackDepth > this . stackMax ) { this . stackMax = this . stackDepth ; } if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = opcode ; writeUnsignedShort ( this . constantPool . literalIndexForField ( declaringClass , fieldName , signature ) ) ; } public void fload ( int iArg ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . maxLocals <= iArg ) { this . maxLocals = iArg + <NUM_LIT:1> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( iArg > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_wide ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fload ; writeUnsignedShort ( iArg ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fload ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) iArg ; } } public void fload_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . maxLocals == <NUM_LIT:0> ) { this . maxLocals = <NUM_LIT:1> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fload_0 ; } public void fload_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . maxLocals <= <NUM_LIT:1> ) { this . maxLocals = <NUM_LIT:2> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fload_1 ; } public void fload_2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . maxLocals <= <NUM_LIT:2> ) { this . maxLocals = <NUM_LIT:3> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fload_2 ; } public void fload_3 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . maxLocals <= <NUM_LIT:3> ) { this . maxLocals = <NUM_LIT:4> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fload_3 ; } public void fmul ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fmul ; } public void fneg ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fneg ; } public void frem ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_frem ; } public void freturn ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_freturn ; this . lastAbruptCompletion = this . position ; } public void fstore ( int iArg ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals <= iArg ) { this . maxLocals = iArg + <NUM_LIT:1> ; } if ( iArg > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_wide ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fstore ; writeUnsignedShort ( iArg ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fstore ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) iArg ; } } public void fstore_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals == <NUM_LIT:0> ) { this . maxLocals = <NUM_LIT:1> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fstore_0 ; } public void fstore_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals <= <NUM_LIT:1> ) { this . maxLocals = <NUM_LIT:2> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fstore_1 ; } public void fstore_2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals <= <NUM_LIT:2> ) { this . maxLocals = <NUM_LIT:3> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fstore_2 ; } public void fstore_3 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals <= <NUM_LIT:3> ) { this . maxLocals = <NUM_LIT:4> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fstore_3 ; } public void fsub ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_fsub ; } public void generateBoxingConversion ( int unboxedTypeID ) { switch ( unboxedTypeID ) { case TypeIds . T_byte : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { invoke ( Opcodes . OPC_invokestatic , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangByteConstantPoolName , ConstantPool . ValueOf , ConstantPool . byteByteSignature ) ; } else { newWrapperFor ( unboxedTypeID ) ; dup_x1 ( ) ; swap ( ) ; invoke ( Opcodes . OPC_invokespecial , <NUM_LIT:2> , <NUM_LIT:0> , ConstantPool . JavaLangByteConstantPoolName , ConstantPool . Init , ConstantPool . ByteConstrSignature ) ; } break ; case TypeIds . T_short : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { invoke ( Opcodes . OPC_invokestatic , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangShortConstantPoolName , ConstantPool . ValueOf , ConstantPool . shortShortSignature ) ; } else { newWrapperFor ( unboxedTypeID ) ; dup_x1 ( ) ; swap ( ) ; invoke ( Opcodes . OPC_invokespecial , <NUM_LIT:2> , <NUM_LIT:0> , ConstantPool . JavaLangShortConstantPoolName , ConstantPool . Init , ConstantPool . ShortConstrSignature ) ; } break ; case TypeIds . T_char : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { invoke ( Opcodes . OPC_invokestatic , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangCharacterConstantPoolName , ConstantPool . ValueOf , ConstantPool . charCharacterSignature ) ; } else { newWrapperFor ( unboxedTypeID ) ; dup_x1 ( ) ; swap ( ) ; invoke ( Opcodes . OPC_invokespecial , <NUM_LIT:2> , <NUM_LIT:0> , ConstantPool . JavaLangCharacterConstantPoolName , ConstantPool . Init , ConstantPool . CharConstrSignature ) ; } break ; case TypeIds . T_int : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { invoke ( Opcodes . OPC_invokestatic , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangIntegerConstantPoolName , ConstantPool . ValueOf , ConstantPool . IntIntegerSignature ) ; } else { newWrapperFor ( unboxedTypeID ) ; dup_x1 ( ) ; swap ( ) ; invoke ( Opcodes . OPC_invokespecial , <NUM_LIT:2> , <NUM_LIT:0> , ConstantPool . JavaLangIntegerConstantPoolName , ConstantPool . Init , ConstantPool . IntConstrSignature ) ; } break ; case TypeIds . T_long : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { invoke ( Opcodes . OPC_invokestatic , <NUM_LIT:2> , <NUM_LIT:1> , ConstantPool . JavaLangLongConstantPoolName , ConstantPool . ValueOf , ConstantPool . longLongSignature ) ; } else { newWrapperFor ( unboxedTypeID ) ; dup_x2 ( ) ; dup_x2 ( ) ; pop ( ) ; invoke ( Opcodes . OPC_invokespecial , <NUM_LIT:3> , <NUM_LIT:0> , ConstantPool . JavaLangLongConstantPoolName , ConstantPool . Init , ConstantPool . LongConstrSignature ) ; } break ; case TypeIds . T_float : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { invoke ( Opcodes . OPC_invokestatic , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangFloatConstantPoolName , ConstantPool . ValueOf , ConstantPool . floatFloatSignature ) ; } else { newWrapperFor ( unboxedTypeID ) ; dup_x1 ( ) ; swap ( ) ; invoke ( Opcodes . OPC_invokespecial , <NUM_LIT:2> , <NUM_LIT:0> , ConstantPool . JavaLangFloatConstantPoolName , ConstantPool . Init , ConstantPool . FloatConstrSignature ) ; } break ; case TypeIds . T_double : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { invoke ( Opcodes . OPC_invokestatic , <NUM_LIT:2> , <NUM_LIT:1> , ConstantPool . JavaLangDoubleConstantPoolName , ConstantPool . ValueOf , ConstantPool . doubleDoubleSignature ) ; } else { newWrapperFor ( unboxedTypeID ) ; dup_x2 ( ) ; dup_x2 ( ) ; pop ( ) ; invoke ( Opcodes . OPC_invokespecial , <NUM_LIT:3> , <NUM_LIT:0> , ConstantPool . JavaLangDoubleConstantPoolName , ConstantPool . Init , ConstantPool . DoubleConstrSignature ) ; } break ; case TypeIds . T_boolean : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { invoke ( Opcodes . OPC_invokestatic , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangBooleanConstantPoolName , ConstantPool . ValueOf , ConstantPool . booleanBooleanSignature ) ; } else { newWrapperFor ( unboxedTypeID ) ; dup_x1 ( ) ; swap ( ) ; invoke ( Opcodes . OPC_invokespecial , <NUM_LIT:2> , <NUM_LIT:0> , ConstantPool . JavaLangBooleanConstantPoolName , ConstantPool . Init , ConstantPool . BooleanConstrSignature ) ; } } } public void generateClassLiteralAccessForType ( TypeBinding accessedType , FieldBinding syntheticFieldBinding ) { if ( accessedType . isBaseType ( ) && accessedType != TypeBinding . NULL ) { getTYPE ( accessedType . id ) ; return ; } if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { this . ldc ( accessedType ) ; } else { BranchLabel endLabel = new BranchLabel ( this ) ; if ( syntheticFieldBinding != null ) { fieldAccess ( Opcodes . OPC_getstatic , syntheticFieldBinding , null ) ; dup ( ) ; ifnonnull ( endLabel ) ; pop ( ) ; } ExceptionLabel classNotFoundExceptionHandler = new ExceptionLabel ( this , TypeBinding . NULL ) ; classNotFoundExceptionHandler . placeStart ( ) ; this . ldc ( accessedType == TypeBinding . NULL ? "<STR_LIT>" : String . valueOf ( accessedType . constantPoolName ( ) ) . replace ( '<CHAR_LIT:/>' , '<CHAR_LIT:.>' ) ) ; invokeClassForName ( ) ; classNotFoundExceptionHandler . placeEnd ( ) ; if ( syntheticFieldBinding != null ) { dup ( ) ; fieldAccess ( Opcodes . OPC_putstatic , syntheticFieldBinding , null ) ; } goto_ ( endLabel ) ; int savedStackDepth = this . stackDepth ; pushExceptionOnStack ( TypeBinding . NULL ) ; classNotFoundExceptionHandler . place ( ) ; newNoClassDefFoundError ( ) ; dup_x1 ( ) ; this . swap ( ) ; invokeThrowableGetMessage ( ) ; invokeNoClassDefFoundErrorStringConstructor ( ) ; athrow ( ) ; endLabel . place ( ) ; this . stackDepth = savedStackDepth ; } } final public void generateCodeAttributeForProblemMethod ( String problemMessage ) { newJavaLangError ( ) ; dup ( ) ; ldc ( problemMessage ) ; invokeJavaLangErrorConstructor ( ) ; athrow ( ) ; } public void generateConstant ( Constant constant , int implicitConversionCode ) { int targetTypeID = ( implicitConversionCode & TypeIds . IMPLICIT_CONVERSION_MASK ) > > <NUM_LIT:4> ; if ( targetTypeID == <NUM_LIT:0> ) targetTypeID = constant . typeID ( ) ; switch ( targetTypeID ) { case TypeIds . T_boolean : generateInlinedValue ( constant . booleanValue ( ) ) ; break ; case TypeIds . T_char : generateInlinedValue ( constant . charValue ( ) ) ; break ; case TypeIds . T_byte : generateInlinedValue ( constant . byteValue ( ) ) ; break ; case TypeIds . T_short : generateInlinedValue ( constant . shortValue ( ) ) ; break ; case TypeIds . T_int : generateInlinedValue ( constant . intValue ( ) ) ; break ; case TypeIds . T_long : generateInlinedValue ( constant . longValue ( ) ) ; break ; case TypeIds . T_float : generateInlinedValue ( constant . floatValue ( ) ) ; break ; case TypeIds . T_double : generateInlinedValue ( constant . doubleValue ( ) ) ; break ; case TypeIds . T_JavaLangString : ldc ( constant . stringValue ( ) ) ; } if ( ( implicitConversionCode & TypeIds . BOXING ) != <NUM_LIT:0> ) { generateBoxingConversion ( targetTypeID ) ; } } public void generateEmulatedReadAccessForField ( FieldBinding fieldBinding ) { generateEmulationForField ( fieldBinding ) ; this . swap ( ) ; invokeJavaLangReflectFieldGetter ( fieldBinding . type . id ) ; if ( ! fieldBinding . type . isBaseType ( ) ) { this . checkcast ( fieldBinding . type ) ; } } public void generateEmulatedWriteAccessForField ( FieldBinding fieldBinding ) { invokeJavaLangReflectFieldSetter ( fieldBinding . type . id ) ; } public void generateEmulationForConstructor ( Scope scope , MethodBinding methodBinding ) { this . ldc ( String . valueOf ( methodBinding . declaringClass . constantPoolName ( ) ) . replace ( '<CHAR_LIT:/>' , '<CHAR_LIT:.>' ) ) ; invokeClassForName ( ) ; int paramLength = methodBinding . parameters . length ; this . generateInlinedValue ( paramLength ) ; newArray ( scope . createArrayType ( scope . getType ( TypeConstants . JAVA_LANG_CLASS , <NUM_LIT:3> ) , <NUM_LIT:1> ) ) ; if ( paramLength > <NUM_LIT:0> ) { dup ( ) ; for ( int i = <NUM_LIT:0> ; i < paramLength ; i ++ ) { this . generateInlinedValue ( i ) ; TypeBinding parameter = methodBinding . parameters [ i ] ; if ( parameter . isBaseType ( ) ) { getTYPE ( parameter . id ) ; } else if ( parameter . isArrayType ( ) ) { ArrayBinding array = ( ArrayBinding ) parameter ; if ( array . leafComponentType . isBaseType ( ) ) { getTYPE ( array . leafComponentType . id ) ; } else { this . ldc ( String . valueOf ( array . leafComponentType . constantPoolName ( ) ) . replace ( '<CHAR_LIT:/>' , '<CHAR_LIT:.>' ) ) ; invokeClassForName ( ) ; } int dimensions = array . dimensions ; this . generateInlinedValue ( dimensions ) ; newarray ( TypeIds . T_int ) ; invokeArrayNewInstance ( ) ; invokeObjectGetClass ( ) ; } else { this . ldc ( String . valueOf ( methodBinding . declaringClass . constantPoolName ( ) ) . replace ( '<CHAR_LIT:/>' , '<CHAR_LIT:.>' ) ) ; invokeClassForName ( ) ; } aastore ( ) ; if ( i < paramLength - <NUM_LIT:1> ) { dup ( ) ; } } } invokeClassGetDeclaredConstructor ( ) ; dup ( ) ; iconst_1 ( ) ; invokeAccessibleObjectSetAccessible ( ) ; } public void generateEmulationForField ( FieldBinding fieldBinding ) { this . ldc ( String . valueOf ( fieldBinding . declaringClass . constantPoolName ( ) ) . replace ( '<CHAR_LIT:/>' , '<CHAR_LIT:.>' ) ) ; invokeClassForName ( ) ; this . ldc ( String . valueOf ( fieldBinding . name ) ) ; invokeClassGetDeclaredField ( ) ; dup ( ) ; iconst_1 ( ) ; invokeAccessibleObjectSetAccessible ( ) ; } public void generateEmulationForMethod ( Scope scope , MethodBinding methodBinding ) { this . ldc ( String . valueOf ( methodBinding . declaringClass . constantPoolName ( ) ) . replace ( '<CHAR_LIT:/>' , '<CHAR_LIT:.>' ) ) ; invokeClassForName ( ) ; this . ldc ( String . valueOf ( methodBinding . selector ) ) ; int paramLength = methodBinding . parameters . length ; this . generateInlinedValue ( paramLength ) ; newArray ( scope . createArrayType ( scope . getType ( TypeConstants . JAVA_LANG_CLASS , <NUM_LIT:3> ) , <NUM_LIT:1> ) ) ; if ( paramLength > <NUM_LIT:0> ) { dup ( ) ; for ( int i = <NUM_LIT:0> ; i < paramLength ; i ++ ) { this . generateInlinedValue ( i ) ; TypeBinding parameter = methodBinding . parameters [ i ] ; if ( parameter . isBaseType ( ) ) { getTYPE ( parameter . id ) ; } else if ( parameter . isArrayType ( ) ) { ArrayBinding array = ( ArrayBinding ) parameter ; if ( array . leafComponentType . isBaseType ( ) ) { getTYPE ( array . leafComponentType . id ) ; } else { this . ldc ( String . valueOf ( array . leafComponentType . constantPoolName ( ) ) . replace ( '<CHAR_LIT:/>' , '<CHAR_LIT:.>' ) ) ; invokeClassForName ( ) ; } int dimensions = array . dimensions ; this . generateInlinedValue ( dimensions ) ; newarray ( TypeIds . T_int ) ; invokeArrayNewInstance ( ) ; invokeObjectGetClass ( ) ; } else { this . ldc ( String . valueOf ( methodBinding . declaringClass . constantPoolName ( ) ) . replace ( '<CHAR_LIT:/>' , '<CHAR_LIT:.>' ) ) ; invokeClassForName ( ) ; } aastore ( ) ; if ( i < paramLength - <NUM_LIT:1> ) { dup ( ) ; } } } invokeClassGetDeclaredMethod ( ) ; dup ( ) ; iconst_1 ( ) ; invokeAccessibleObjectSetAccessible ( ) ; } public void generateImplicitConversion ( int implicitConversionCode ) { if ( ( implicitConversionCode & TypeIds . UNBOXING ) != <NUM_LIT:0> ) { final int typeId = implicitConversionCode & TypeIds . COMPILE_TYPE_MASK ; generateUnboxingConversion ( typeId ) ; } switch ( implicitConversionCode & TypeIds . IMPLICIT_CONVERSION_MASK ) { case TypeIds . Float2Char : f2i ( ) ; i2c ( ) ; break ; case TypeIds . Double2Char : d2i ( ) ; i2c ( ) ; break ; case TypeIds . Int2Char : case TypeIds . Short2Char : case TypeIds . Byte2Char : i2c ( ) ; break ; case TypeIds . Long2Char : l2i ( ) ; i2c ( ) ; break ; case TypeIds . Char2Float : case TypeIds . Short2Float : case TypeIds . Int2Float : case TypeIds . Byte2Float : i2f ( ) ; break ; case TypeIds . Double2Float : d2f ( ) ; break ; case TypeIds . Long2Float : l2f ( ) ; break ; case TypeIds . Float2Byte : f2i ( ) ; i2b ( ) ; break ; case TypeIds . Double2Byte : d2i ( ) ; i2b ( ) ; break ; case TypeIds . Int2Byte : case TypeIds . Short2Byte : case TypeIds . Char2Byte : i2b ( ) ; break ; case TypeIds . Long2Byte : l2i ( ) ; i2b ( ) ; break ; case TypeIds . Byte2Double : case TypeIds . Char2Double : case TypeIds . Short2Double : case TypeIds . Int2Double : i2d ( ) ; break ; case TypeIds . Float2Double : f2d ( ) ; break ; case TypeIds . Long2Double : l2d ( ) ; break ; case TypeIds . Byte2Short : case TypeIds . Char2Short : case TypeIds . Int2Short : i2s ( ) ; break ; case TypeIds . Double2Short : d2i ( ) ; i2s ( ) ; break ; case TypeIds . Long2Short : l2i ( ) ; i2s ( ) ; break ; case TypeIds . Float2Short : f2i ( ) ; i2s ( ) ; break ; case TypeIds . Double2Int : d2i ( ) ; break ; case TypeIds . Float2Int : f2i ( ) ; break ; case TypeIds . Long2Int : l2i ( ) ; break ; case TypeIds . Int2Long : case TypeIds . Char2Long : case TypeIds . Byte2Long : case TypeIds . Short2Long : i2l ( ) ; break ; case TypeIds . Double2Long : d2l ( ) ; break ; case TypeIds . Float2Long : f2l ( ) ; break ; case TypeIds . Object2boolean : case TypeIds . Object2byte : case TypeIds . Object2short : case TypeIds . Object2int : case TypeIds . Object2long : case TypeIds . Object2float : case TypeIds . Object2char : case TypeIds . Object2double : int runtimeType = ( implicitConversionCode & TypeIds . IMPLICIT_CONVERSION_MASK ) > > <NUM_LIT:4> ; checkcast ( runtimeType ) ; generateUnboxingConversion ( runtimeType ) ; break ; } if ( ( implicitConversionCode & TypeIds . BOXING ) != <NUM_LIT:0> ) { final int typeId = ( implicitConversionCode & TypeIds . IMPLICIT_CONVERSION_MASK ) > > <NUM_LIT:4> ; generateBoxingConversion ( typeId ) ; } } public void generateInlinedValue ( boolean inlinedValue ) { if ( inlinedValue ) iconst_1 ( ) ; else iconst_0 ( ) ; } public void generateInlinedValue ( byte inlinedValue ) { switch ( inlinedValue ) { case - <NUM_LIT:1> : iconst_m1 ( ) ; break ; case <NUM_LIT:0> : iconst_0 ( ) ; break ; case <NUM_LIT:1> : iconst_1 ( ) ; break ; case <NUM_LIT:2> : iconst_2 ( ) ; break ; case <NUM_LIT:3> : iconst_3 ( ) ; break ; case <NUM_LIT:4> : iconst_4 ( ) ; break ; case <NUM_LIT:5> : iconst_5 ( ) ; break ; default : if ( ( - <NUM_LIT> <= inlinedValue ) && ( inlinedValue <= <NUM_LIT> ) ) { bipush ( inlinedValue ) ; return ; } } } public void generateInlinedValue ( char inlinedValue ) { switch ( inlinedValue ) { case <NUM_LIT:0> : iconst_0 ( ) ; break ; case <NUM_LIT:1> : iconst_1 ( ) ; break ; case <NUM_LIT:2> : iconst_2 ( ) ; break ; case <NUM_LIT:3> : iconst_3 ( ) ; break ; case <NUM_LIT:4> : iconst_4 ( ) ; break ; case <NUM_LIT:5> : iconst_5 ( ) ; break ; default : if ( ( <NUM_LIT:6> <= inlinedValue ) && ( inlinedValue <= <NUM_LIT> ) ) { bipush ( ( byte ) inlinedValue ) ; return ; } if ( ( <NUM_LIT> <= inlinedValue ) && ( inlinedValue <= <NUM_LIT> ) ) { sipush ( inlinedValue ) ; return ; } this . ldc ( inlinedValue ) ; } } public void generateInlinedValue ( double inlinedValue ) { if ( inlinedValue == <NUM_LIT:0.0> ) { if ( Double . doubleToLongBits ( inlinedValue ) != <NUM_LIT> ) this . ldc2_w ( inlinedValue ) ; else dconst_0 ( ) ; return ; } if ( inlinedValue == <NUM_LIT:1.0> ) { dconst_1 ( ) ; return ; } this . ldc2_w ( inlinedValue ) ; } public void generateInlinedValue ( float inlinedValue ) { if ( inlinedValue == <NUM_LIT:0.0f> ) { if ( Float . floatToIntBits ( inlinedValue ) != <NUM_LIT:0> ) this . ldc ( inlinedValue ) ; else fconst_0 ( ) ; return ; } if ( inlinedValue == <NUM_LIT:1.0f> ) { fconst_1 ( ) ; return ; } if ( inlinedValue == <NUM_LIT> ) { fconst_2 ( ) ; return ; } this . ldc ( inlinedValue ) ; } public void generateInlinedValue ( int inlinedValue ) { switch ( inlinedValue ) { case - <NUM_LIT:1> : iconst_m1 ( ) ; break ; case <NUM_LIT:0> : iconst_0 ( ) ; break ; case <NUM_LIT:1> : iconst_1 ( ) ; break ; case <NUM_LIT:2> : iconst_2 ( ) ; break ; case <NUM_LIT:3> : iconst_3 ( ) ; break ; case <NUM_LIT:4> : iconst_4 ( ) ; break ; case <NUM_LIT:5> : iconst_5 ( ) ; break ; default : if ( ( - <NUM_LIT> <= inlinedValue ) && ( inlinedValue <= <NUM_LIT> ) ) { bipush ( ( byte ) inlinedValue ) ; return ; } if ( ( - <NUM_LIT> <= inlinedValue ) && ( inlinedValue <= <NUM_LIT> ) ) { sipush ( inlinedValue ) ; return ; } this . ldc ( inlinedValue ) ; } } public void generateInlinedValue ( long inlinedValue ) { if ( inlinedValue == <NUM_LIT:0> ) { lconst_0 ( ) ; return ; } if ( inlinedValue == <NUM_LIT:1> ) { lconst_1 ( ) ; return ; } this . ldc2_w ( inlinedValue ) ; } public void generateInlinedValue ( short inlinedValue ) { switch ( inlinedValue ) { case - <NUM_LIT:1> : iconst_m1 ( ) ; break ; case <NUM_LIT:0> : iconst_0 ( ) ; break ; case <NUM_LIT:1> : iconst_1 ( ) ; break ; case <NUM_LIT:2> : iconst_2 ( ) ; break ; case <NUM_LIT:3> : iconst_3 ( ) ; break ; case <NUM_LIT:4> : iconst_4 ( ) ; break ; case <NUM_LIT:5> : iconst_5 ( ) ; break ; default : if ( ( - <NUM_LIT> <= inlinedValue ) && ( inlinedValue <= <NUM_LIT> ) ) { bipush ( ( byte ) inlinedValue ) ; return ; } sipush ( inlinedValue ) ; } } public void generateOuterAccess ( Object [ ] mappingSequence , ASTNode invocationSite , Binding target , Scope scope ) { if ( mappingSequence == null ) { if ( target instanceof LocalVariableBinding ) { scope . problemReporter ( ) . needImplementation ( invocationSite ) ; } else { scope . problemReporter ( ) . noSuchEnclosingInstance ( ( ReferenceBinding ) target , invocationSite , false ) ; } return ; } if ( mappingSequence == BlockScope . NoEnclosingInstanceInConstructorCall ) { scope . problemReporter ( ) . noSuchEnclosingInstance ( ( ReferenceBinding ) target , invocationSite , true ) ; return ; } else if ( mappingSequence == BlockScope . NoEnclosingInstanceInStaticContext ) { scope . problemReporter ( ) . noSuchEnclosingInstance ( ( ReferenceBinding ) target , invocationSite , false ) ; return ; } if ( mappingSequence == BlockScope . EmulationPathToImplicitThis ) { aload_0 ( ) ; return ; } else if ( mappingSequence [ <NUM_LIT:0> ] instanceof FieldBinding ) { FieldBinding fieldBinding = ( FieldBinding ) mappingSequence [ <NUM_LIT:0> ] ; aload_0 ( ) ; fieldAccess ( Opcodes . OPC_getfield , fieldBinding , null ) ; } else { load ( ( LocalVariableBinding ) mappingSequence [ <NUM_LIT:0> ] ) ; } for ( int i = <NUM_LIT:1> , length = mappingSequence . length ; i < length ; i ++ ) { if ( mappingSequence [ i ] instanceof FieldBinding ) { FieldBinding fieldBinding = ( FieldBinding ) mappingSequence [ i ] ; fieldAccess ( Opcodes . OPC_getfield , fieldBinding , null ) ; } else { invoke ( Opcodes . OPC_invokestatic , ( MethodBinding ) mappingSequence [ i ] , null ) ; } } } public void generateReturnBytecode ( Expression expression ) { if ( expression == null ) { return_ ( ) ; } else { final int implicitConversion = expression . implicitConversion ; if ( ( implicitConversion & TypeIds . BOXING ) != <NUM_LIT:0> ) { areturn ( ) ; return ; } int runtimeType = ( implicitConversion & TypeIds . IMPLICIT_CONVERSION_MASK ) > > <NUM_LIT:4> ; switch ( runtimeType ) { case TypeIds . T_boolean : case TypeIds . T_int : ireturn ( ) ; break ; case TypeIds . T_float : freturn ( ) ; break ; case TypeIds . T_long : lreturn ( ) ; break ; case TypeIds . T_double : dreturn ( ) ; break ; default : areturn ( ) ; } } } public void generateStringConcatenationAppend ( BlockScope blockScope , Expression oper1 , Expression oper2 ) { int pc ; if ( oper1 == null ) { newStringContatenation ( ) ; dup_x1 ( ) ; this . swap ( ) ; invokeStringValueOf ( TypeIds . T_JavaLangObject ) ; invokeStringConcatenationStringConstructor ( ) ; } else { pc = this . position ; oper1 . generateOptimizedStringConcatenationCreation ( blockScope , this , oper1 . implicitConversion & TypeIds . COMPILE_TYPE_MASK ) ; this . recordPositionsFrom ( pc , oper1 . sourceStart ) ; } pc = this . position ; oper2 . generateOptimizedStringConcatenation ( blockScope , this , oper2 . implicitConversion & TypeIds . COMPILE_TYPE_MASK ) ; this . recordPositionsFrom ( pc , oper2 . sourceStart ) ; invokeStringConcatenationToString ( ) ; } public void generateSyntheticBodyForConstructorAccess ( SyntheticMethodBinding accessBinding ) { initializeMaxLocals ( accessBinding ) ; MethodBinding constructorBinding = accessBinding . targetMethod ; TypeBinding [ ] parameters = constructorBinding . parameters ; int length = parameters . length ; int resolvedPosition = <NUM_LIT:1> ; aload_0 ( ) ; TypeBinding declaringClass = constructorBinding . declaringClass ; if ( declaringClass . erasure ( ) . id == TypeIds . T_JavaLangEnum || declaringClass . isEnum ( ) ) { aload_1 ( ) ; iload_2 ( ) ; resolvedPosition += <NUM_LIT:2> ; } if ( declaringClass . isNestedType ( ) ) { NestedTypeBinding nestedType = ( NestedTypeBinding ) declaringClass ; SyntheticArgumentBinding [ ] syntheticArguments = nestedType . syntheticEnclosingInstances ( ) ; for ( int i = <NUM_LIT:0> ; i < ( syntheticArguments == null ? <NUM_LIT:0> : syntheticArguments . length ) ; i ++ ) { TypeBinding type ; load ( ( type = syntheticArguments [ i ] . type ) , resolvedPosition ) ; switch ( type . id ) { case TypeIds . T_long : case TypeIds . T_double : resolvedPosition += <NUM_LIT:2> ; break ; default : resolvedPosition ++ ; break ; } } } for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { TypeBinding parameter ; load ( parameter = parameters [ i ] , resolvedPosition ) ; switch ( parameter . id ) { case TypeIds . T_long : case TypeIds . T_double : resolvedPosition += <NUM_LIT:2> ; break ; default : resolvedPosition ++ ; break ; } } if ( declaringClass . isNestedType ( ) ) { NestedTypeBinding nestedType = ( NestedTypeBinding ) declaringClass ; SyntheticArgumentBinding [ ] syntheticArguments = nestedType . syntheticOuterLocalVariables ( ) ; for ( int i = <NUM_LIT:0> ; i < ( syntheticArguments == null ? <NUM_LIT:0> : syntheticArguments . length ) ; i ++ ) { TypeBinding type ; load ( type = syntheticArguments [ i ] . type , resolvedPosition ) ; switch ( type . id ) { case TypeIds . T_long : case TypeIds . T_double : resolvedPosition += <NUM_LIT:2> ; break ; default : resolvedPosition ++ ; break ; } } } invoke ( Opcodes . OPC_invokespecial , constructorBinding , null ) ; return_ ( ) ; } public void generateSyntheticBodyForEnumValueOf ( SyntheticMethodBinding methodBinding ) { initializeMaxLocals ( methodBinding ) ; final ReferenceBinding declaringClass = methodBinding . declaringClass ; generateClassLiteralAccessForType ( declaringClass , null ) ; aload_0 ( ) ; invokeJavaLangEnumvalueOf ( declaringClass ) ; this . checkcast ( declaringClass ) ; areturn ( ) ; } public void generateSyntheticBodyForEnumValues ( SyntheticMethodBinding methodBinding ) { ClassScope scope = ( ( SourceTypeBinding ) methodBinding . declaringClass ) . scope ; initializeMaxLocals ( methodBinding ) ; TypeBinding enumArray = methodBinding . returnType ; fieldAccess ( Opcodes . OPC_getstatic , scope . referenceContext . enumValuesSyntheticfield , null ) ; dup ( ) ; astore_0 ( ) ; iconst_0 ( ) ; aload_0 ( ) ; arraylength ( ) ; dup ( ) ; istore_1 ( ) ; newArray ( ( ArrayBinding ) enumArray ) ; dup ( ) ; astore_2 ( ) ; iconst_0 ( ) ; iload_1 ( ) ; invokeSystemArraycopy ( ) ; aload_2 ( ) ; areturn ( ) ; } public void generateSyntheticBodyForEnumInitializationMethod ( SyntheticMethodBinding methodBinding ) { this . maxLocals = <NUM_LIT:0> ; SourceTypeBinding sourceTypeBinding = ( SourceTypeBinding ) methodBinding . declaringClass ; TypeDeclaration typeDeclaration = sourceTypeBinding . scope . referenceContext ; BlockScope staticInitializerScope = typeDeclaration . staticInitializerScope ; FieldDeclaration [ ] fieldDeclarations = typeDeclaration . fields ; for ( int i = methodBinding . startIndex , max = methodBinding . endIndex ; i < max ; i ++ ) { FieldDeclaration fieldDecl = fieldDeclarations [ i ] ; if ( fieldDecl . isStatic ( ) ) { if ( fieldDecl . getKind ( ) == AbstractVariableDeclaration . ENUM_CONSTANT ) { fieldDecl . generateCode ( staticInitializerScope , this ) ; } } } return_ ( ) ; } public void generateSyntheticBodyForFieldReadAccess ( SyntheticMethodBinding accessMethod ) { initializeMaxLocals ( accessMethod ) ; FieldBinding fieldBinding = accessMethod . targetReadField ; TypeBinding declaringClass = accessMethod . purpose == SyntheticMethodBinding . SuperFieldReadAccess ? accessMethod . declaringClass . superclass ( ) : accessMethod . declaringClass ; if ( fieldBinding . isStatic ( ) ) { fieldAccess ( Opcodes . OPC_getstatic , fieldBinding , declaringClass ) ; } else { aload_0 ( ) ; fieldAccess ( Opcodes . OPC_getfield , fieldBinding , declaringClass ) ; } switch ( fieldBinding . type . id ) { case TypeIds . T_boolean : case TypeIds . T_byte : case TypeIds . T_char : case TypeIds . T_short : case TypeIds . T_int : ireturn ( ) ; break ; case TypeIds . T_long : lreturn ( ) ; break ; case TypeIds . T_float : freturn ( ) ; break ; case TypeIds . T_double : dreturn ( ) ; break ; default : areturn ( ) ; } } public void generateSyntheticBodyForFieldWriteAccess ( SyntheticMethodBinding accessMethod ) { initializeMaxLocals ( accessMethod ) ; FieldBinding fieldBinding = accessMethod . targetWriteField ; TypeBinding declaringClass = accessMethod . purpose == SyntheticMethodBinding . SuperFieldWriteAccess ? accessMethod . declaringClass . superclass ( ) : accessMethod . declaringClass ; if ( fieldBinding . isStatic ( ) ) { load ( fieldBinding . type , <NUM_LIT:0> ) ; fieldAccess ( Opcodes . OPC_putstatic , fieldBinding , declaringClass ) ; } else { aload_0 ( ) ; load ( fieldBinding . type , <NUM_LIT:1> ) ; fieldAccess ( Opcodes . OPC_putfield , fieldBinding , declaringClass ) ; } return_ ( ) ; } public void generateSyntheticBodyForMethodAccess ( SyntheticMethodBinding accessMethod ) { initializeMaxLocals ( accessMethod ) ; MethodBinding targetMethod = accessMethod . targetMethod ; TypeBinding [ ] parameters = targetMethod . parameters ; int length = parameters . length ; TypeBinding [ ] arguments = accessMethod . purpose == SyntheticMethodBinding . BridgeMethod ? accessMethod . parameters : null ; int resolvedPosition ; if ( targetMethod . isStatic ( ) ) resolvedPosition = <NUM_LIT:0> ; else { aload_0 ( ) ; resolvedPosition = <NUM_LIT:1> ; } for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { TypeBinding parameter = parameters [ i ] ; if ( arguments != null ) { TypeBinding argument = arguments [ i ] ; load ( argument , resolvedPosition ) ; if ( argument != parameter ) checkcast ( parameter ) ; } else { load ( parameter , resolvedPosition ) ; } switch ( parameter . id ) { case TypeIds . T_long : case TypeIds . T_double : resolvedPosition += <NUM_LIT:2> ; break ; default : resolvedPosition ++ ; break ; } } if ( targetMethod . isStatic ( ) ) invoke ( Opcodes . OPC_invokestatic , targetMethod , accessMethod . declaringClass ) ; else { if ( targetMethod . isConstructor ( ) || targetMethod . isPrivate ( ) || accessMethod . purpose == SyntheticMethodBinding . SuperMethodAccess ) { TypeBinding declaringClass = accessMethod . purpose == SyntheticMethodBinding . SuperMethodAccess ? accessMethod . declaringClass . superclass ( ) : accessMethod . declaringClass ; invoke ( Opcodes . OPC_invokespecial , targetMethod , declaringClass ) ; } else { if ( targetMethod . declaringClass . isInterface ( ) ) { invoke ( Opcodes . OPC_invokeinterface , targetMethod , null ) ; } else { invoke ( Opcodes . OPC_invokevirtual , targetMethod , accessMethod . declaringClass ) ; } } } switch ( targetMethod . returnType . id ) { case TypeIds . T_void : return_ ( ) ; break ; case TypeIds . T_boolean : case TypeIds . T_byte : case TypeIds . T_char : case TypeIds . T_short : case TypeIds . T_int : ireturn ( ) ; break ; case TypeIds . T_long : lreturn ( ) ; break ; case TypeIds . T_float : freturn ( ) ; break ; case TypeIds . T_double : dreturn ( ) ; break ; default : TypeBinding accessErasure = accessMethod . returnType . erasure ( ) ; TypeBinding match = targetMethod . returnType . findSuperTypeOriginatingFrom ( accessErasure ) ; if ( match == null ) { this . checkcast ( accessErasure ) ; } areturn ( ) ; } } public void generateSyntheticBodyForSwitchTable ( SyntheticMethodBinding methodBinding ) { ClassScope scope = ( ( SourceTypeBinding ) methodBinding . declaringClass ) . scope ; initializeMaxLocals ( methodBinding ) ; final BranchLabel nullLabel = new BranchLabel ( this ) ; FieldBinding syntheticFieldBinding = methodBinding . targetReadField ; fieldAccess ( Opcodes . OPC_getstatic , syntheticFieldBinding , null ) ; dup ( ) ; ifnull ( nullLabel ) ; areturn ( ) ; pushOnStack ( syntheticFieldBinding . type ) ; nullLabel . place ( ) ; pop ( ) ; ReferenceBinding enumBinding = ( ReferenceBinding ) methodBinding . targetEnumType ; ArrayBinding arrayBinding = scope . createArrayType ( enumBinding , <NUM_LIT:1> ) ; invokeJavaLangEnumValues ( enumBinding , arrayBinding ) ; arraylength ( ) ; newarray ( ClassFileConstants . INT_ARRAY ) ; astore_0 ( ) ; LocalVariableBinding localVariableBinding = new LocalVariableBinding ( "<STR_LIT>" . toCharArray ( ) , scope . createArrayType ( TypeBinding . INT , <NUM_LIT:1> ) , <NUM_LIT:0> , false ) ; addVariable ( localVariableBinding ) ; final FieldBinding [ ] fields = enumBinding . fields ( ) ; if ( fields != null ) { for ( int i = <NUM_LIT:0> , max = fields . length ; i < max ; i ++ ) { FieldBinding fieldBinding = fields [ i ] ; if ( ( fieldBinding . getAccessFlags ( ) & ClassFileConstants . AccEnum ) != <NUM_LIT:0> ) { final BranchLabel endLabel = new BranchLabel ( this ) ; final ExceptionLabel anyExceptionHandler = new ExceptionLabel ( this , TypeBinding . LONG ) ; anyExceptionHandler . placeStart ( ) ; aload_0 ( ) ; fieldAccess ( Opcodes . OPC_getstatic , fieldBinding , null ) ; invokeEnumOrdinal ( enumBinding . constantPoolName ( ) ) ; this . generateInlinedValue ( fieldBinding . id + <NUM_LIT:1> ) ; iastore ( ) ; anyExceptionHandler . placeEnd ( ) ; goto_ ( endLabel ) ; pushExceptionOnStack ( TypeBinding . LONG ) ; anyExceptionHandler . place ( ) ; pop ( ) ; endLabel . place ( ) ; } } } aload_0 ( ) ; dup ( ) ; fieldAccess ( Opcodes . OPC_putstatic , syntheticFieldBinding , null ) ; areturn ( ) ; removeVariable ( localVariableBinding ) ; } public void generateSyntheticEnclosingInstanceValues ( BlockScope currentScope , ReferenceBinding targetType , Expression enclosingInstance , ASTNode invocationSite ) { ReferenceBinding checkedTargetType = targetType . isAnonymousType ( ) ? ( ReferenceBinding ) targetType . superclass ( ) . erasure ( ) : targetType ; boolean hasExtraEnclosingInstance = enclosingInstance != null ; if ( hasExtraEnclosingInstance && ( ! checkedTargetType . isNestedType ( ) || checkedTargetType . isStatic ( ) ) ) { currentScope . problemReporter ( ) . unnecessaryEnclosingInstanceSpecification ( enclosingInstance , checkedTargetType ) ; return ; } ReferenceBinding [ ] syntheticArgumentTypes ; if ( ( syntheticArgumentTypes = targetType . syntheticEnclosingInstanceTypes ( ) ) != null ) { ReferenceBinding targetEnclosingType = checkedTargetType . enclosingType ( ) ; long compliance = currentScope . compilerOptions ( ) . complianceLevel ; boolean denyEnclosingArgInConstructorCall ; if ( compliance <= ClassFileConstants . JDK1_3 ) { denyEnclosingArgInConstructorCall = invocationSite instanceof AllocationExpression ; } else if ( compliance == ClassFileConstants . JDK1_4 ) { denyEnclosingArgInConstructorCall = invocationSite instanceof AllocationExpression || invocationSite instanceof ExplicitConstructorCall && ( ( ExplicitConstructorCall ) invocationSite ) . isSuperAccess ( ) ; } else { denyEnclosingArgInConstructorCall = ( invocationSite instanceof AllocationExpression || invocationSite instanceof ExplicitConstructorCall && ( ( ExplicitConstructorCall ) invocationSite ) . isSuperAccess ( ) ) && ! targetType . isLocalType ( ) ; } boolean complyTo14 = compliance >= ClassFileConstants . JDK1_4 ; for ( int i = <NUM_LIT:0> , max = syntheticArgumentTypes . length ; i < max ; i ++ ) { ReferenceBinding syntheticArgType = syntheticArgumentTypes [ i ] ; if ( hasExtraEnclosingInstance && syntheticArgType == targetEnclosingType ) { hasExtraEnclosingInstance = false ; enclosingInstance . generateCode ( currentScope , this , true ) ; if ( complyTo14 ) { dup ( ) ; invokeObjectGetClass ( ) ; pop ( ) ; } } else { Object [ ] emulationPath = currentScope . getEmulationPath ( syntheticArgType , false , denyEnclosingArgInConstructorCall ) ; generateOuterAccess ( emulationPath , invocationSite , syntheticArgType , currentScope ) ; } } if ( hasExtraEnclosingInstance ) { currentScope . problemReporter ( ) . unnecessaryEnclosingInstanceSpecification ( enclosingInstance , checkedTargetType ) ; } } } public void generateSyntheticOuterArgumentValues ( BlockScope currentScope , ReferenceBinding targetType , ASTNode invocationSite ) { SyntheticArgumentBinding syntheticArguments [ ] ; if ( ( syntheticArguments = targetType . syntheticOuterLocalVariables ( ) ) != null ) { for ( int i = <NUM_LIT:0> , max = syntheticArguments . length ; i < max ; i ++ ) { LocalVariableBinding targetVariable = syntheticArguments [ i ] . actualOuterLocalVariable ; VariableBinding [ ] emulationPath = currentScope . getEmulationPath ( targetVariable ) ; generateOuterAccess ( emulationPath , invocationSite , targetVariable , currentScope ) ; } } } public void generateUnboxingConversion ( int unboxedTypeID ) { switch ( unboxedTypeID ) { case TypeIds . T_byte : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangByteConstantPoolName , ConstantPool . BYTEVALUE_BYTE_METHOD_NAME , ConstantPool . BYTEVALUE_BYTE_METHOD_SIGNATURE ) ; break ; case TypeIds . T_short : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangShortConstantPoolName , ConstantPool . SHORTVALUE_SHORT_METHOD_NAME , ConstantPool . SHORTVALUE_SHORT_METHOD_SIGNATURE ) ; break ; case TypeIds . T_char : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangCharacterConstantPoolName , ConstantPool . CHARVALUE_CHARACTER_METHOD_NAME , ConstantPool . CHARVALUE_CHARACTER_METHOD_SIGNATURE ) ; break ; case TypeIds . T_int : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangIntegerConstantPoolName , ConstantPool . INTVALUE_INTEGER_METHOD_NAME , ConstantPool . INTVALUE_INTEGER_METHOD_SIGNATURE ) ; break ; case TypeIds . T_long : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:2> , ConstantPool . JavaLangLongConstantPoolName , ConstantPool . LONGVALUE_LONG_METHOD_NAME , ConstantPool . LONGVALUE_LONG_METHOD_SIGNATURE ) ; break ; case TypeIds . T_float : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangFloatConstantPoolName , ConstantPool . FLOATVALUE_FLOAT_METHOD_NAME , ConstantPool . FLOATVALUE_FLOAT_METHOD_SIGNATURE ) ; break ; case TypeIds . T_double : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:2> , ConstantPool . JavaLangDoubleConstantPoolName , ConstantPool . DOUBLEVALUE_DOUBLE_METHOD_NAME , ConstantPool . DOUBLEVALUE_DOUBLE_METHOD_SIGNATURE ) ; break ; case TypeIds . T_boolean : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangBooleanConstantPoolName , ConstantPool . BOOLEANVALUE_BOOLEAN_METHOD_NAME , ConstantPool . BOOLEANVALUE_BOOLEAN_METHOD_SIGNATURE ) ; } } public void generateWideRevertedConditionalBranch ( byte revertedOpcode , BranchLabel wideTarget ) { BranchLabel intermediate = new BranchLabel ( this ) ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = revertedOpcode ; intermediate . branch ( ) ; goto_w ( wideTarget ) ; intermediate . place ( ) ; } public void getBaseTypeValue ( int baseTypeID ) { switch ( baseTypeID ) { case TypeIds . T_byte : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangByteConstantPoolName , ConstantPool . BYTEVALUE_BYTE_METHOD_NAME , ConstantPool . BYTEVALUE_BYTE_METHOD_SIGNATURE ) ; break ; case TypeIds . T_short : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangShortConstantPoolName , ConstantPool . SHORTVALUE_SHORT_METHOD_NAME , ConstantPool . SHORTVALUE_SHORT_METHOD_SIGNATURE ) ; break ; case TypeIds . T_char : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangCharacterConstantPoolName , ConstantPool . CHARVALUE_CHARACTER_METHOD_NAME , ConstantPool . CHARVALUE_CHARACTER_METHOD_SIGNATURE ) ; break ; case TypeIds . T_int : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangIntegerConstantPoolName , ConstantPool . INTVALUE_INTEGER_METHOD_NAME , ConstantPool . INTVALUE_INTEGER_METHOD_SIGNATURE ) ; break ; case TypeIds . T_long : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:2> , ConstantPool . JavaLangLongConstantPoolName , ConstantPool . LONGVALUE_LONG_METHOD_NAME , ConstantPool . LONGVALUE_LONG_METHOD_SIGNATURE ) ; break ; case TypeIds . T_float : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangFloatConstantPoolName , ConstantPool . FLOATVALUE_FLOAT_METHOD_NAME , ConstantPool . FLOATVALUE_FLOAT_METHOD_SIGNATURE ) ; break ; case TypeIds . T_double : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:2> , ConstantPool . JavaLangDoubleConstantPoolName , ConstantPool . DOUBLEVALUE_DOUBLE_METHOD_NAME , ConstantPool . DOUBLEVALUE_DOUBLE_METHOD_SIGNATURE ) ; break ; case TypeIds . T_boolean : invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangBooleanConstantPoolName , ConstantPool . BOOLEANVALUE_BOOLEAN_METHOD_NAME , ConstantPool . BOOLEANVALUE_BOOLEAN_METHOD_SIGNATURE ) ; } } final public byte [ ] getContents ( ) { byte [ ] contents ; System . arraycopy ( this . bCodeStream , <NUM_LIT:0> , contents = new byte [ this . position ] , <NUM_LIT:0> , this . position ) ; return contents ; } public static TypeBinding getConstantPoolDeclaringClass ( Scope currentScope , FieldBinding codegenBinding , TypeBinding actualReceiverType , boolean isImplicitThisReceiver ) { ReferenceBinding constantPoolDeclaringClass = codegenBinding . declaringClass ; if ( constantPoolDeclaringClass != actualReceiverType . erasure ( ) && ! actualReceiverType . isArrayType ( ) && constantPoolDeclaringClass != null && codegenBinding . constant ( ) == Constant . NotAConstant ) { CompilerOptions options = currentScope . compilerOptions ( ) ; if ( ( options . targetJDK >= ClassFileConstants . JDK1_2 && ( options . complianceLevel >= ClassFileConstants . JDK1_4 || ! ( isImplicitThisReceiver && codegenBinding . isStatic ( ) ) ) && constantPoolDeclaringClass . id != TypeIds . T_JavaLangObject ) || ! constantPoolDeclaringClass . canBeSeenBy ( currentScope ) ) { return actualReceiverType . erasure ( ) ; } } return constantPoolDeclaringClass ; } public static TypeBinding getConstantPoolDeclaringClass ( Scope currentScope , MethodBinding codegenBinding , TypeBinding actualReceiverType , boolean isImplicitThisReceiver ) { TypeBinding constantPoolDeclaringClass = codegenBinding . declaringClass ; if ( codegenBinding == currentScope . environment ( ) . arrayClone ) { CompilerOptions options = currentScope . compilerOptions ( ) ; if ( options . sourceLevel > ClassFileConstants . JDK1_4 ) { constantPoolDeclaringClass = actualReceiverType . erasure ( ) ; } } else { if ( 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 ) || ! codegenBinding . declaringClass . canBeSeenBy ( currentScope ) ) { constantPoolDeclaringClass = actualReceiverType . erasure ( ) ; } } } return constantPoolDeclaringClass ; } protected int getPosition ( ) { return this . position ; } public void getTYPE ( int baseTypeID ) { this . countLabels = <NUM_LIT:0> ; switch ( baseTypeID ) { case TypeIds . T_byte : fieldAccess ( Opcodes . OPC_getstatic , <NUM_LIT:1> , ConstantPool . JavaLangByteConstantPoolName , ConstantPool . TYPE , ConstantPool . JavaLangClassSignature ) ; break ; case TypeIds . T_short : fieldAccess ( Opcodes . OPC_getstatic , <NUM_LIT:1> , ConstantPool . JavaLangShortConstantPoolName , ConstantPool . TYPE , ConstantPool . JavaLangClassSignature ) ; break ; case TypeIds . T_char : fieldAccess ( Opcodes . OPC_getstatic , <NUM_LIT:1> , ConstantPool . JavaLangCharacterConstantPoolName , ConstantPool . TYPE , ConstantPool . JavaLangClassSignature ) ; break ; case TypeIds . T_int : fieldAccess ( Opcodes . OPC_getstatic , <NUM_LIT:1> , ConstantPool . JavaLangIntegerConstantPoolName , ConstantPool . TYPE , ConstantPool . JavaLangClassSignature ) ; break ; case TypeIds . T_long : fieldAccess ( Opcodes . OPC_getstatic , <NUM_LIT:1> , ConstantPool . JavaLangLongConstantPoolName , ConstantPool . TYPE , ConstantPool . JavaLangClassSignature ) ; break ; case TypeIds . T_float : fieldAccess ( Opcodes . OPC_getstatic , <NUM_LIT:1> , ConstantPool . JavaLangFloatConstantPoolName , ConstantPool . TYPE , ConstantPool . JavaLangClassSignature ) ; break ; case TypeIds . T_double : fieldAccess ( Opcodes . OPC_getstatic , <NUM_LIT:1> , ConstantPool . JavaLangDoubleConstantPoolName , ConstantPool . TYPE , ConstantPool . JavaLangClassSignature ) ; break ; case TypeIds . T_boolean : fieldAccess ( Opcodes . OPC_getstatic , <NUM_LIT:1> , ConstantPool . JavaLangBooleanConstantPoolName , ConstantPool . TYPE , ConstantPool . JavaLangClassSignature ) ; break ; case TypeIds . T_void : fieldAccess ( Opcodes . OPC_getstatic , <NUM_LIT:1> , ConstantPool . JavaLangVoidConstantPoolName , ConstantPool . TYPE , ConstantPool . JavaLangClassSignature ) ; break ; } } public void goto_ ( BranchLabel label ) { if ( this . wideMode ) { goto_w ( label ) ; return ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } boolean chained = inlineForwardReferencesFromLabelsTargeting ( label , this . position ) ; if ( chained && this . lastAbruptCompletion == this . position ) { if ( label . position != Label . POS_NOT_SET ) { int [ ] forwardRefs = label . forwardReferences ( ) ; for ( int i = <NUM_LIT:0> , max = label . forwardReferenceCount ( ) ; i < max ; i ++ ) { this . writePosition ( label , forwardRefs [ i ] ) ; } this . countLabels = <NUM_LIT:0> ; } return ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_goto ; label . branch ( ) ; this . lastAbruptCompletion = this . position ; } public void goto_w ( BranchLabel label ) { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_goto_w ; label . branchWide ( ) ; this . lastAbruptCompletion = this . position ; } public void i2b ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_i2b ; } public void i2c ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_i2c ; } public void i2d ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_i2d ; } public void i2f ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_i2f ; } public void i2l ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_i2l ; } public void i2s ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_i2s ; } public void iadd ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iadd ; } public void iaload ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iaload ; } public void iand ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iand ; } public void iastore ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:3> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iastore ; } public void iconst_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iconst_0 ; } public void iconst_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iconst_1 ; } public void iconst_2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iconst_2 ; } public void iconst_3 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iconst_3 ; } public void iconst_4 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iconst_4 ; } public void iconst_5 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iconst_5 ; } public void iconst_m1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iconst_m1 ; } public void idiv ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_idiv ; } public void if_acmpeq ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_if_acmpne , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_if_acmpeq ; lbl . branch ( ) ; } } public void if_acmpne ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_if_acmpeq , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_if_acmpne ; lbl . branch ( ) ; } } public void if_icmpeq ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_if_icmpne , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_if_icmpeq ; lbl . branch ( ) ; } } public void if_icmpge ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_if_icmplt , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_if_icmpge ; lbl . branch ( ) ; } } public void if_icmpgt ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_if_icmple , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_if_icmpgt ; lbl . branch ( ) ; } } public void if_icmple ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_if_icmpgt , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_if_icmple ; lbl . branch ( ) ; } } public void if_icmplt ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_if_icmpge , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_if_icmplt ; lbl . branch ( ) ; } } public void if_icmpne ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_if_icmpeq , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_if_icmpne ; lbl . branch ( ) ; } } public void ifeq ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_ifne , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ifeq ; lbl . branch ( ) ; } } public void ifge ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_iflt , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ifge ; lbl . branch ( ) ; } } public void ifgt ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_ifle , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ifgt ; lbl . branch ( ) ; } } public void ifle ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_ifgt , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ifle ; lbl . branch ( ) ; } } public void iflt ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_ifge , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iflt ; lbl . branch ( ) ; } } public void ifne ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_ifeq , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ifne ; lbl . branch ( ) ; } } public void ifnonnull ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_ifnull , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ifnonnull ; lbl . branch ( ) ; } } public void ifnull ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . wideMode ) { generateWideRevertedConditionalBranch ( Opcodes . OPC_ifnonnull , lbl ) ; } else { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ifnull ; lbl . branch ( ) ; } } final public void iinc ( int index , int value ) { this . countLabels = <NUM_LIT:0> ; if ( ( index > <NUM_LIT:255> ) || ( value < - <NUM_LIT> || value > <NUM_LIT> ) ) { if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_wide ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iinc ; writeUnsignedShort ( index ) ; writeSignedShort ( value ) ; } else { if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:3> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iinc ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) index ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) value ; } } public void iload ( int iArg ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . maxLocals <= iArg ) { this . maxLocals = iArg + <NUM_LIT:1> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( iArg > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_wide ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iload ; writeUnsignedShort ( iArg ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iload ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) iArg ; } } public void iload_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . maxLocals <= <NUM_LIT:0> ) { this . maxLocals = <NUM_LIT:1> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iload_0 ; } public void iload_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . maxLocals <= <NUM_LIT:1> ) { this . maxLocals = <NUM_LIT:2> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iload_1 ; } public void iload_2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . maxLocals <= <NUM_LIT:2> ) { this . maxLocals = <NUM_LIT:3> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iload_2 ; } public void iload_3 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . maxLocals <= <NUM_LIT:3> ) { this . maxLocals = <NUM_LIT:4> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iload_3 ; } public void imul ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_imul ; } public int indexOfSameLineEntrySincePC ( int pc , int line ) { for ( int index = pc , max = this . pcToSourceMapSize ; index < max ; index += <NUM_LIT:2> ) { if ( this . pcToSourceMap [ index + <NUM_LIT:1> ] == line ) return index ; } return - <NUM_LIT:1> ; } public void ineg ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ineg ; } public void init ( ClassFile targetClassFile ) { this . classFile = targetClassFile ; this . constantPool = targetClassFile . constantPool ; this . bCodeStream = targetClassFile . contents ; this . classFileOffset = targetClassFile . contentsOffset ; this . startingClassFileOffset = this . classFileOffset ; this . pcToSourceMapSize = <NUM_LIT:0> ; this . lastEntryPC = <NUM_LIT:0> ; int length = this . visibleLocals . length ; if ( noVisibleLocals . length < length ) { noVisibleLocals = new LocalVariableBinding [ length ] ; } System . arraycopy ( noVisibleLocals , <NUM_LIT:0> , this . visibleLocals , <NUM_LIT:0> , length ) ; this . visibleLocalsCount = <NUM_LIT:0> ; length = this . locals . length ; if ( noLocals . length < length ) { noLocals = new LocalVariableBinding [ length ] ; } System . arraycopy ( noLocals , <NUM_LIT:0> , this . locals , <NUM_LIT:0> , length ) ; this . allLocalsCounter = <NUM_LIT:0> ; length = this . exceptionLabels . length ; if ( noExceptionHandlers . length < length ) { noExceptionHandlers = new ExceptionLabel [ length ] ; } System . arraycopy ( noExceptionHandlers , <NUM_LIT:0> , this . exceptionLabels , <NUM_LIT:0> , length ) ; this . exceptionLabelsCounter = <NUM_LIT:0> ; length = this . labels . length ; if ( noLabels . length < length ) { noLabels = new BranchLabel [ length ] ; } System . arraycopy ( noLabels , <NUM_LIT:0> , this . labels , <NUM_LIT:0> , length ) ; this . countLabels = <NUM_LIT:0> ; this . lastAbruptCompletion = - <NUM_LIT:1> ; this . stackMax = <NUM_LIT:0> ; this . stackDepth = <NUM_LIT:0> ; this . maxLocals = <NUM_LIT:0> ; this . position = <NUM_LIT:0> ; } public void initializeMaxLocals ( MethodBinding methodBinding ) { if ( methodBinding == null ) { this . maxLocals = <NUM_LIT:0> ; return ; } this . maxLocals = methodBinding . isStatic ( ) ? <NUM_LIT:0> : <NUM_LIT:1> ; ReferenceBinding declaringClass = methodBinding . declaringClass ; if ( methodBinding . isConstructor ( ) && declaringClass . isEnum ( ) ) { this . maxLocals += <NUM_LIT:2> ; } if ( methodBinding . isConstructor ( ) && declaringClass . isNestedType ( ) ) { this . maxLocals += declaringClass . getEnclosingInstancesSlotSize ( ) ; this . maxLocals += declaringClass . getOuterLocalVariablesSlotSize ( ) ; } TypeBinding [ ] parameterTypes ; if ( ( parameterTypes = methodBinding . parameters ) != null ) { for ( int i = <NUM_LIT:0> , max = parameterTypes . length ; i < max ; i ++ ) { switch ( parameterTypes [ i ] . id ) { case TypeIds . T_long : case TypeIds . T_double : this . maxLocals += <NUM_LIT:2> ; break ; default : this . maxLocals ++ ; } } } } public boolean inlineForwardReferencesFromLabelsTargeting ( BranchLabel targetLabel , int gotoLocation ) { if ( targetLabel . delegate != null ) return false ; int chaining = L_UNKNOWN ; for ( int i = this . countLabels - <NUM_LIT:1> ; i >= <NUM_LIT:0> ; i -- ) { BranchLabel currentLabel = this . labels [ i ] ; if ( currentLabel . position != gotoLocation ) break ; if ( currentLabel == targetLabel ) { chaining |= L_CANNOT_OPTIMIZE ; continue ; } if ( currentLabel . isStandardLabel ( ) ) { if ( currentLabel . delegate != null ) continue ; targetLabel . becomeDelegateFor ( currentLabel ) ; chaining |= L_OPTIMIZABLE ; continue ; } chaining |= L_CANNOT_OPTIMIZE ; } return ( chaining & ( L_OPTIMIZABLE | L_CANNOT_OPTIMIZE ) ) == L_OPTIMIZABLE ; } public void instance_of ( TypeBinding typeBinding ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_instanceof ; writeUnsignedShort ( this . constantPool . literalIndexForType ( typeBinding ) ) ; } protected void invoke ( byte opcode , int receiverAndArgsSize , int returnTypeSize , char [ ] declaringClass , char [ ] selector , char [ ] signature ) { this . countLabels = <NUM_LIT:0> ; if ( opcode == Opcodes . OPC_invokeinterface ) { if ( this . classFileOffset + <NUM_LIT:4> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:3> ; this . bCodeStream [ this . classFileOffset ++ ] = opcode ; writeUnsignedShort ( this . constantPool . literalIndexForMethod ( declaringClass , selector , signature , true ) ) ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) receiverAndArgsSize ; this . bCodeStream [ this . classFileOffset ++ ] = <NUM_LIT:0> ; } else { if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = opcode ; writeUnsignedShort ( this . constantPool . literalIndexForMethod ( declaringClass , selector , signature , false ) ) ; } this . stackDepth += returnTypeSize - receiverAndArgsSize ; if ( this . stackDepth > this . stackMax ) { this . stackMax = this . stackDepth ; } } public void invoke ( byte opcode , MethodBinding methodBinding , TypeBinding declaringClass ) { if ( declaringClass == null ) declaringClass = methodBinding . declaringClass ; if ( ( declaringClass . tagBits & TagBits . ContainsNestedTypeReferences ) != <NUM_LIT:0> ) { Util . recordNestedType ( this . classFile , declaringClass ) ; } int receiverAndArgsSize ; switch ( opcode ) { case Opcodes . OPC_invokestatic : receiverAndArgsSize = <NUM_LIT:0> ; break ; case Opcodes . OPC_invokeinterface : case Opcodes . OPC_invokevirtual : receiverAndArgsSize = <NUM_LIT:1> ; break ; case Opcodes . OPC_invokespecial : receiverAndArgsSize = <NUM_LIT:1> ; if ( methodBinding . isConstructor ( ) ) { if ( declaringClass . isNestedType ( ) ) { ReferenceBinding nestedType = ( ReferenceBinding ) declaringClass ; receiverAndArgsSize += nestedType . getEnclosingInstancesSlotSize ( ) ; SyntheticArgumentBinding [ ] syntheticArguments = nestedType . syntheticOuterLocalVariables ( ) ; if ( syntheticArguments != null ) { for ( int i = <NUM_LIT:0> , max = syntheticArguments . length ; i < max ; i ++ ) { switch ( syntheticArguments [ i ] . id ) { case TypeIds . T_double : case TypeIds . T_long : receiverAndArgsSize += <NUM_LIT:2> ; break ; default : receiverAndArgsSize ++ ; break ; } } } } if ( declaringClass . isEnum ( ) ) { receiverAndArgsSize += <NUM_LIT:2> ; } } break ; default : return ; } for ( int i = methodBinding . parameters . length - <NUM_LIT:1> ; i >= <NUM_LIT:0> ; i -- ) { switch ( methodBinding . parameters [ i ] . id ) { case TypeIds . T_double : case TypeIds . T_long : receiverAndArgsSize += <NUM_LIT:2> ; break ; default : receiverAndArgsSize ++ ; break ; } } int returnTypeSize ; switch ( methodBinding . returnType . id ) { case TypeIds . T_double : case TypeIds . T_long : returnTypeSize = <NUM_LIT:2> ; break ; case TypeIds . T_void : returnTypeSize = <NUM_LIT:0> ; break ; default : returnTypeSize = <NUM_LIT:1> ; break ; } invoke ( opcode , receiverAndArgsSize , returnTypeSize , declaringClass . constantPoolName ( ) , methodBinding . selector , methodBinding . signature ( this . classFile ) ) ; } protected void invokeAccessibleObjectSetAccessible ( ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:2> , <NUM_LIT:0> , ConstantPool . JAVALANGREFLECTACCESSIBLEOBJECT_CONSTANTPOOLNAME , ConstantPool . SETACCESSIBLE_NAME , ConstantPool . SETACCESSIBLE_SIGNATURE ) ; } protected void invokeArrayNewInstance ( ) { invoke ( Opcodes . OPC_invokestatic , <NUM_LIT:2> , <NUM_LIT:1> , ConstantPool . JAVALANGREFLECTARRAY_CONSTANTPOOLNAME , ConstantPool . NewInstance , ConstantPool . NewInstanceSignature ) ; } public void invokeClassForName ( ) { invoke ( Opcodes . OPC_invokestatic , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangClassConstantPoolName , ConstantPool . ForName , ConstantPool . ForNameSignature ) ; } protected void invokeClassGetDeclaredConstructor ( ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:2> , <NUM_LIT:1> , ConstantPool . JavaLangClassConstantPoolName , ConstantPool . GETDECLAREDCONSTRUCTOR_NAME , ConstantPool . GETDECLAREDCONSTRUCTOR_SIGNATURE ) ; } protected void invokeClassGetDeclaredField ( ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:2> , <NUM_LIT:1> , ConstantPool . JavaLangClassConstantPoolName , ConstantPool . GETDECLAREDFIELD_NAME , ConstantPool . GETDECLAREDFIELD_SIGNATURE ) ; } protected void invokeClassGetDeclaredMethod ( ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:3> , <NUM_LIT:1> , ConstantPool . JavaLangClassConstantPoolName , ConstantPool . GETDECLAREDMETHOD_NAME , ConstantPool . GETDECLAREDMETHOD_SIGNATURE ) ; } public void invokeEnumOrdinal ( char [ ] enumTypeConstantPoolName ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , enumTypeConstantPoolName , ConstantPool . Ordinal , ConstantPool . OrdinalSignature ) ; } public void invokeIterableIterator ( TypeBinding iterableReceiverType ) { if ( ( iterableReceiverType . tagBits & TagBits . ContainsNestedTypeReferences ) != <NUM_LIT:0> ) { Util . recordNestedType ( this . classFile , iterableReceiverType ) ; } invoke ( iterableReceiverType . isInterface ( ) ? Opcodes . OPC_invokeinterface : Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , iterableReceiverType . constantPoolName ( ) , ConstantPool . ITERATOR_NAME , ConstantPool . ITERATOR_SIGNATURE ) ; } public void invokeAutoCloseableClose ( TypeBinding resourceType ) { invoke ( resourceType . isInterface ( ) ? Opcodes . OPC_invokeinterface : Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:0> , resourceType . constantPoolName ( ) , ConstantPool . Close , ConstantPool . CloseSignature ) ; } public void invokeThrowableAddSuppressed ( ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:2> , <NUM_LIT:0> , ConstantPool . JavaLangThrowableConstantPoolName , ConstantPool . AddSuppressed , ConstantPool . AddSuppressedSignature ) ; } public void invokeJavaLangAssertionErrorConstructor ( int typeBindingID ) { int receiverAndArgsSize ; char [ ] signature ; switch ( typeBindingID ) { case TypeIds . T_int : case TypeIds . T_byte : case TypeIds . T_short : signature = ConstantPool . IntConstrSignature ; receiverAndArgsSize = <NUM_LIT:2> ; break ; case TypeIds . T_long : signature = ConstantPool . LongConstrSignature ; receiverAndArgsSize = <NUM_LIT:3> ; break ; case TypeIds . T_float : signature = ConstantPool . FloatConstrSignature ; receiverAndArgsSize = <NUM_LIT:2> ; break ; case TypeIds . T_double : signature = ConstantPool . DoubleConstrSignature ; receiverAndArgsSize = <NUM_LIT:3> ; break ; case TypeIds . T_char : signature = ConstantPool . CharConstrSignature ; receiverAndArgsSize = <NUM_LIT:2> ; break ; case TypeIds . T_boolean : signature = ConstantPool . BooleanConstrSignature ; receiverAndArgsSize = <NUM_LIT:2> ; break ; case TypeIds . T_JavaLangObject : case TypeIds . T_JavaLangString : case TypeIds . T_null : signature = ConstantPool . ObjectConstrSignature ; receiverAndArgsSize = <NUM_LIT:2> ; break ; default : return ; } invoke ( Opcodes . OPC_invokespecial , receiverAndArgsSize , <NUM_LIT:0> , ConstantPool . JavaLangAssertionErrorConstantPoolName , ConstantPool . Init , signature ) ; } public void invokeJavaLangAssertionErrorDefaultConstructor ( ) { invoke ( Opcodes . OPC_invokespecial , <NUM_LIT:1> , <NUM_LIT:0> , ConstantPool . JavaLangAssertionErrorConstantPoolName , ConstantPool . Init , ConstantPool . DefaultConstructorSignature ) ; } public void invokeJavaLangClassDesiredAssertionStatus ( ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangClassConstantPoolName , ConstantPool . DesiredAssertionStatus , ConstantPool . DesiredAssertionStatusSignature ) ; } public void invokeJavaLangEnumvalueOf ( ReferenceBinding binding ) { invoke ( Opcodes . OPC_invokestatic , <NUM_LIT:2> , <NUM_LIT:1> , ConstantPool . JavaLangEnumConstantPoolName , ConstantPool . ValueOf , ConstantPool . ValueOfStringClassSignature ) ; } public void invokeJavaLangEnumValues ( TypeBinding enumBinding , ArrayBinding arrayBinding ) { char [ ] signature = "<STR_LIT>" . toCharArray ( ) ; signature = CharOperation . concat ( signature , arrayBinding . constantPoolName ( ) ) ; invoke ( Opcodes . OPC_invokestatic , <NUM_LIT:0> , <NUM_LIT:1> , enumBinding . constantPoolName ( ) , TypeConstants . VALUES , signature ) ; } public void invokeJavaLangErrorConstructor ( ) { invoke ( Opcodes . OPC_invokespecial , <NUM_LIT:2> , <NUM_LIT:0> , ConstantPool . JavaLangErrorConstantPoolName , ConstantPool . Init , ConstantPool . StringConstructorSignature ) ; } public void invokeJavaLangReflectConstructorNewInstance ( ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:2> , <NUM_LIT:1> , ConstantPool . JavaLangReflectConstructorConstantPoolName , ConstantPool . NewInstance , ConstantPool . JavaLangReflectConstructorNewInstanceSignature ) ; } protected void invokeJavaLangReflectFieldGetter ( int typeID ) { char [ ] selector ; char [ ] signature ; int returnTypeSize ; switch ( typeID ) { case TypeIds . T_int : selector = ConstantPool . GET_INT_METHOD_NAME ; signature = ConstantPool . GET_INT_METHOD_SIGNATURE ; returnTypeSize = <NUM_LIT:1> ; break ; case TypeIds . T_byte : selector = ConstantPool . GET_BYTE_METHOD_NAME ; signature = ConstantPool . GET_BYTE_METHOD_SIGNATURE ; returnTypeSize = <NUM_LIT:1> ; break ; case TypeIds . T_short : selector = ConstantPool . GET_SHORT_METHOD_NAME ; signature = ConstantPool . GET_SHORT_METHOD_SIGNATURE ; returnTypeSize = <NUM_LIT:1> ; break ; case TypeIds . T_long : selector = ConstantPool . GET_LONG_METHOD_NAME ; signature = ConstantPool . GET_LONG_METHOD_SIGNATURE ; returnTypeSize = <NUM_LIT:2> ; break ; case TypeIds . T_float : selector = ConstantPool . GET_FLOAT_METHOD_NAME ; signature = ConstantPool . GET_FLOAT_METHOD_SIGNATURE ; returnTypeSize = <NUM_LIT:1> ; break ; case TypeIds . T_double : selector = ConstantPool . GET_DOUBLE_METHOD_NAME ; signature = ConstantPool . GET_DOUBLE_METHOD_SIGNATURE ; returnTypeSize = <NUM_LIT:2> ; break ; case TypeIds . T_char : selector = ConstantPool . GET_CHAR_METHOD_NAME ; signature = ConstantPool . GET_CHAR_METHOD_SIGNATURE ; returnTypeSize = <NUM_LIT:1> ; break ; case TypeIds . T_boolean : selector = ConstantPool . GET_BOOLEAN_METHOD_NAME ; signature = ConstantPool . GET_BOOLEAN_METHOD_SIGNATURE ; returnTypeSize = <NUM_LIT:1> ; break ; default : selector = ConstantPool . GET_OBJECT_METHOD_NAME ; signature = ConstantPool . GET_OBJECT_METHOD_SIGNATURE ; returnTypeSize = <NUM_LIT:1> ; break ; } invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:2> , returnTypeSize , ConstantPool . JAVALANGREFLECTFIELD_CONSTANTPOOLNAME , selector , signature ) ; } protected void invokeJavaLangReflectFieldSetter ( int typeID ) { char [ ] selector ; char [ ] signature ; int receiverAndArgsSize ; switch ( typeID ) { case TypeIds . T_int : selector = ConstantPool . SET_INT_METHOD_NAME ; signature = ConstantPool . SET_INT_METHOD_SIGNATURE ; receiverAndArgsSize = <NUM_LIT:3> ; break ; case TypeIds . T_byte : selector = ConstantPool . SET_BYTE_METHOD_NAME ; signature = ConstantPool . SET_BYTE_METHOD_SIGNATURE ; receiverAndArgsSize = <NUM_LIT:3> ; break ; case TypeIds . T_short : selector = ConstantPool . SET_SHORT_METHOD_NAME ; signature = ConstantPool . SET_SHORT_METHOD_SIGNATURE ; receiverAndArgsSize = <NUM_LIT:3> ; break ; case TypeIds . T_long : selector = ConstantPool . SET_LONG_METHOD_NAME ; signature = ConstantPool . SET_LONG_METHOD_SIGNATURE ; receiverAndArgsSize = <NUM_LIT:4> ; break ; case TypeIds . T_float : selector = ConstantPool . SET_FLOAT_METHOD_NAME ; signature = ConstantPool . SET_FLOAT_METHOD_SIGNATURE ; receiverAndArgsSize = <NUM_LIT:3> ; break ; case TypeIds . T_double : selector = ConstantPool . SET_DOUBLE_METHOD_NAME ; signature = ConstantPool . SET_DOUBLE_METHOD_SIGNATURE ; receiverAndArgsSize = <NUM_LIT:4> ; break ; case TypeIds . T_char : selector = ConstantPool . SET_CHAR_METHOD_NAME ; signature = ConstantPool . SET_CHAR_METHOD_SIGNATURE ; receiverAndArgsSize = <NUM_LIT:3> ; break ; case TypeIds . T_boolean : selector = ConstantPool . SET_BOOLEAN_METHOD_NAME ; signature = ConstantPool . SET_BOOLEAN_METHOD_SIGNATURE ; receiverAndArgsSize = <NUM_LIT:3> ; break ; default : selector = ConstantPool . SET_OBJECT_METHOD_NAME ; signature = ConstantPool . SET_OBJECT_METHOD_SIGNATURE ; receiverAndArgsSize = <NUM_LIT:3> ; break ; } invoke ( Opcodes . OPC_invokevirtual , receiverAndArgsSize , <NUM_LIT:0> , ConstantPool . JAVALANGREFLECTFIELD_CONSTANTPOOLNAME , selector , signature ) ; } public void invokeJavaLangReflectMethodInvoke ( ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:3> , <NUM_LIT:1> , ConstantPool . JAVALANGREFLECTMETHOD_CONSTANTPOOLNAME , ConstantPool . INVOKE_METHOD_METHOD_NAME , ConstantPool . INVOKE_METHOD_METHOD_SIGNATURE ) ; } public void invokeJavaUtilIteratorHasNext ( ) { invoke ( Opcodes . OPC_invokeinterface , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaUtilIteratorConstantPoolName , ConstantPool . HasNext , ConstantPool . HasNextSignature ) ; } public void invokeJavaUtilIteratorNext ( ) { invoke ( Opcodes . OPC_invokeinterface , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaUtilIteratorConstantPoolName , ConstantPool . Next , ConstantPool . NextSignature ) ; } public void invokeNoClassDefFoundErrorStringConstructor ( ) { invoke ( Opcodes . OPC_invokespecial , <NUM_LIT:2> , <NUM_LIT:0> , ConstantPool . JavaLangNoClassDefFoundErrorConstantPoolName , ConstantPool . Init , ConstantPool . StringConstructorSignature ) ; } public void invokeObjectGetClass ( ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangObjectConstantPoolName , ConstantPool . GetClass , ConstantPool . GetClassSignature ) ; } public void invokeStringConcatenationAppendForType ( int typeID ) { int receiverAndArgsSize ; char [ ] declaringClass = null ; char [ ] selector = ConstantPool . Append ; char [ ] signature = null ; switch ( typeID ) { case TypeIds . T_int : case TypeIds . T_byte : case TypeIds . T_short : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { declaringClass = ConstantPool . JavaLangStringBuilderConstantPoolName ; signature = ConstantPool . StringBuilderAppendIntSignature ; } else { declaringClass = ConstantPool . JavaLangStringBufferConstantPoolName ; signature = ConstantPool . StringBufferAppendIntSignature ; } receiverAndArgsSize = <NUM_LIT:2> ; break ; case TypeIds . T_long : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { declaringClass = ConstantPool . JavaLangStringBuilderConstantPoolName ; signature = ConstantPool . StringBuilderAppendLongSignature ; } else { declaringClass = ConstantPool . JavaLangStringBufferConstantPoolName ; signature = ConstantPool . StringBufferAppendLongSignature ; } receiverAndArgsSize = <NUM_LIT:3> ; break ; case TypeIds . T_float : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { declaringClass = ConstantPool . JavaLangStringBuilderConstantPoolName ; signature = ConstantPool . StringBuilderAppendFloatSignature ; } else { declaringClass = ConstantPool . JavaLangStringBufferConstantPoolName ; signature = ConstantPool . StringBufferAppendFloatSignature ; } receiverAndArgsSize = <NUM_LIT:2> ; break ; case TypeIds . T_double : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { declaringClass = ConstantPool . JavaLangStringBuilderConstantPoolName ; signature = ConstantPool . StringBuilderAppendDoubleSignature ; } else { declaringClass = ConstantPool . JavaLangStringBufferConstantPoolName ; signature = ConstantPool . StringBufferAppendDoubleSignature ; } receiverAndArgsSize = <NUM_LIT:3> ; break ; case TypeIds . T_char : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { declaringClass = ConstantPool . JavaLangStringBuilderConstantPoolName ; signature = ConstantPool . StringBuilderAppendCharSignature ; } else { declaringClass = ConstantPool . JavaLangStringBufferConstantPoolName ; signature = ConstantPool . StringBufferAppendCharSignature ; } receiverAndArgsSize = <NUM_LIT:2> ; break ; case TypeIds . T_boolean : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { declaringClass = ConstantPool . JavaLangStringBuilderConstantPoolName ; signature = ConstantPool . StringBuilderAppendBooleanSignature ; } else { declaringClass = ConstantPool . JavaLangStringBufferConstantPoolName ; signature = ConstantPool . StringBufferAppendBooleanSignature ; } receiverAndArgsSize = <NUM_LIT:2> ; break ; case TypeIds . T_JavaLangString : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { declaringClass = ConstantPool . JavaLangStringBuilderConstantPoolName ; signature = ConstantPool . StringBuilderAppendStringSignature ; } else { declaringClass = ConstantPool . JavaLangStringBufferConstantPoolName ; signature = ConstantPool . StringBufferAppendStringSignature ; } receiverAndArgsSize = <NUM_LIT:2> ; break ; default : if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { declaringClass = ConstantPool . JavaLangStringBuilderConstantPoolName ; signature = ConstantPool . StringBuilderAppendObjectSignature ; } else { declaringClass = ConstantPool . JavaLangStringBufferConstantPoolName ; signature = ConstantPool . StringBufferAppendObjectSignature ; } receiverAndArgsSize = <NUM_LIT:2> ; break ; } invoke ( Opcodes . OPC_invokevirtual , receiverAndArgsSize , <NUM_LIT:1> , declaringClass , selector , signature ) ; } public void invokeStringConcatenationDefaultConstructor ( ) { char [ ] declaringClass ; if ( this . targetLevel < ClassFileConstants . JDK1_5 ) { declaringClass = ConstantPool . JavaLangStringBufferConstantPoolName ; } else { declaringClass = ConstantPool . JavaLangStringBuilderConstantPoolName ; } invoke ( Opcodes . OPC_invokespecial , <NUM_LIT:1> , <NUM_LIT:0> , declaringClass , ConstantPool . Init , ConstantPool . DefaultConstructorSignature ) ; } public void invokeStringConcatenationStringConstructor ( ) { char [ ] declaringClass ; if ( this . targetLevel < ClassFileConstants . JDK1_5 ) { declaringClass = ConstantPool . JavaLangStringBufferConstantPoolName ; } else { declaringClass = ConstantPool . JavaLangStringBuilderConstantPoolName ; } invoke ( Opcodes . OPC_invokespecial , <NUM_LIT:2> , <NUM_LIT:0> , declaringClass , ConstantPool . Init , ConstantPool . StringConstructorSignature ) ; } public void invokeStringConcatenationToString ( ) { char [ ] declaringClass ; if ( this . targetLevel < ClassFileConstants . JDK1_5 ) { declaringClass = ConstantPool . JavaLangStringBufferConstantPoolName ; } else { declaringClass = ConstantPool . JavaLangStringBuilderConstantPoolName ; } invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , declaringClass , ConstantPool . ToString , ConstantPool . ToStringSignature ) ; } public void invokeStringEquals ( ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:2> , <NUM_LIT:1> , ConstantPool . JavaLangStringConstantPoolName , ConstantPool . Equals , ConstantPool . EqualsSignature ) ; } public void invokeStringHashCode ( ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangStringConstantPoolName , ConstantPool . HashCode , ConstantPool . HashCodeSignature ) ; } public void invokeStringIntern ( ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangStringConstantPoolName , ConstantPool . Intern , ConstantPool . InternSignature ) ; } public void invokeStringValueOf ( int typeID ) { char [ ] signature ; int receiverAndArgsSize ; switch ( typeID ) { case TypeIds . T_int : case TypeIds . T_byte : case TypeIds . T_short : signature = ConstantPool . ValueOfIntSignature ; receiverAndArgsSize = <NUM_LIT:1> ; break ; case TypeIds . T_long : signature = ConstantPool . ValueOfLongSignature ; receiverAndArgsSize = <NUM_LIT:2> ; break ; case TypeIds . T_float : signature = ConstantPool . ValueOfFloatSignature ; receiverAndArgsSize = <NUM_LIT:1> ; break ; case TypeIds . T_double : signature = ConstantPool . ValueOfDoubleSignature ; receiverAndArgsSize = <NUM_LIT:2> ; break ; case TypeIds . T_char : signature = ConstantPool . ValueOfCharSignature ; receiverAndArgsSize = <NUM_LIT:1> ; break ; case TypeIds . T_boolean : signature = ConstantPool . ValueOfBooleanSignature ; receiverAndArgsSize = <NUM_LIT:1> ; break ; case TypeIds . T_JavaLangObject : case TypeIds . T_JavaLangString : case TypeIds . T_null : case TypeIds . T_undefined : signature = ConstantPool . ValueOfObjectSignature ; receiverAndArgsSize = <NUM_LIT:1> ; break ; default : return ; } invoke ( Opcodes . OPC_invokestatic , receiverAndArgsSize , <NUM_LIT:1> , ConstantPool . JavaLangStringConstantPoolName , ConstantPool . ValueOf , signature ) ; } public void invokeSystemArraycopy ( ) { invoke ( Opcodes . OPC_invokestatic , <NUM_LIT:5> , <NUM_LIT:0> , ConstantPool . JavaLangSystemConstantPoolName , ConstantPool . ArrayCopy , ConstantPool . ArrayCopySignature ) ; } public void invokeThrowableGetMessage ( ) { invoke ( Opcodes . OPC_invokevirtual , <NUM_LIT:1> , <NUM_LIT:1> , ConstantPool . JavaLangThrowableConstantPoolName , ConstantPool . GetMessage , ConstantPool . GetMessageSignature ) ; } public void ior ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ior ; } public void irem ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_irem ; } public void ireturn ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ireturn ; this . lastAbruptCompletion = this . position ; } public boolean isDefinitelyAssigned ( Scope scope , int initStateIndex , LocalVariableBinding local ) { if ( ( local . tagBits & TagBits . IsArgument ) != <NUM_LIT:0> ) { return true ; } if ( initStateIndex == - <NUM_LIT:1> ) return false ; int localPosition = local . id + this . maxFieldCount ; MethodScope methodScope = scope . methodScope ( ) ; if ( localPosition < UnconditionalFlowInfo . BitCacheSize ) { return ( methodScope . definiteInits [ initStateIndex ] & ( <NUM_LIT:1L> << localPosition ) ) != <NUM_LIT:0> ; } long [ ] extraInits = methodScope . extraDefiniteInits [ initStateIndex ] ; if ( extraInits == null ) return false ; int vectorIndex ; if ( ( vectorIndex = ( localPosition / UnconditionalFlowInfo . BitCacheSize ) - <NUM_LIT:1> ) >= extraInits . length ) return false ; return ( ( extraInits [ vectorIndex ] ) & ( <NUM_LIT:1L> << ( localPosition % UnconditionalFlowInfo . BitCacheSize ) ) ) != <NUM_LIT:0> ; } public void ishl ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ishl ; } public void ishr ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ishr ; } public void istore ( int iArg ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals <= iArg ) { this . maxLocals = iArg + <NUM_LIT:1> ; } if ( iArg > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_wide ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_istore ; writeUnsignedShort ( iArg ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_istore ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) iArg ; } } public void istore_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals == <NUM_LIT:0> ) { this . maxLocals = <NUM_LIT:1> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_istore_0 ; } public void istore_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals <= <NUM_LIT:1> ) { this . maxLocals = <NUM_LIT:2> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_istore_1 ; } public void istore_2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals <= <NUM_LIT:2> ) { this . maxLocals = <NUM_LIT:3> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_istore_2 ; } public void istore_3 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . maxLocals <= <NUM_LIT:3> ) { this . maxLocals = <NUM_LIT:4> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_istore_3 ; } public void isub ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_isub ; } public void iushr ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_iushr ; } public void ixor ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ixor ; } final public void jsr ( BranchLabel lbl ) { if ( this . wideMode ) { jsr_w ( lbl ) ; return ; } this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_jsr ; lbl . branch ( ) ; } final public void jsr_w ( BranchLabel lbl ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_jsr_w ; lbl . branchWide ( ) ; } public void l2d ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_l2d ; } public void l2f ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_l2f ; } public void l2i ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_l2i ; } public void ladd ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ladd ; } public void laload ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_laload ; } public void land ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_land ; } public void lastore ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:4> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lastore ; } public void lcmp ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:3> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lcmp ; } public void lconst_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lconst_0 ; } public void lconst_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lconst_1 ; } public void ldc ( float constant ) { this . countLabels = <NUM_LIT:0> ; int index = this . constantPool . literalIndex ( constant ) ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( index > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ldc_w ; writeUnsignedShort ( index ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ldc ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) index ; } } public void ldc ( int constant ) { this . countLabels = <NUM_LIT:0> ; int index = this . constantPool . literalIndex ( constant ) ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( index > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ldc_w ; writeUnsignedShort ( index ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ldc ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) index ; } } public void ldc ( String constant ) { this . countLabels = <NUM_LIT:0> ; int currentCodeStreamPosition = this . position ; char [ ] constantChars = constant . toCharArray ( ) ; int index = this . constantPool . literalIndexForLdc ( constantChars ) ; if ( index > <NUM_LIT:0> ) { ldcForIndex ( index ) ; } else { this . position = currentCodeStreamPosition ; int i = <NUM_LIT:0> ; int length = <NUM_LIT:0> ; int constantLength = constant . length ( ) ; byte [ ] utf8encoding = new byte [ Math . min ( constantLength + <NUM_LIT:100> , <NUM_LIT> ) ] ; int utf8encodingLength = <NUM_LIT:0> ; while ( ( length < <NUM_LIT> ) && ( i < constantLength ) ) { char current = constantChars [ i ] ; if ( length + <NUM_LIT:3> > ( utf8encodingLength = utf8encoding . length ) ) { System . arraycopy ( utf8encoding , <NUM_LIT:0> , utf8encoding = new byte [ Math . min ( utf8encodingLength + <NUM_LIT:100> , <NUM_LIT> ) ] , <NUM_LIT:0> , length ) ; } if ( ( current >= <NUM_LIT> ) && ( current <= <NUM_LIT> ) ) { utf8encoding [ length ++ ] = ( byte ) current ; } else { if ( current > <NUM_LIT> ) { utf8encoding [ length ++ ] = ( byte ) ( <NUM_LIT> | ( ( current > > <NUM_LIT:12> ) & <NUM_LIT> ) ) ; utf8encoding [ length ++ ] = ( byte ) ( <NUM_LIT> | ( ( current > > <NUM_LIT:6> ) & <NUM_LIT> ) ) ; utf8encoding [ length ++ ] = ( byte ) ( <NUM_LIT> | ( current & <NUM_LIT> ) ) ; } else { utf8encoding [ length ++ ] = ( byte ) ( <NUM_LIT> | ( ( current > > <NUM_LIT:6> ) & <NUM_LIT> ) ) ; utf8encoding [ length ++ ] = ( byte ) ( <NUM_LIT> | ( current & <NUM_LIT> ) ) ; } } i ++ ; } newStringContatenation ( ) ; dup ( ) ; char [ ] subChars = new char [ i ] ; System . arraycopy ( constantChars , <NUM_LIT:0> , subChars , <NUM_LIT:0> , i ) ; System . arraycopy ( utf8encoding , <NUM_LIT:0> , utf8encoding = new byte [ length ] , <NUM_LIT:0> , length ) ; index = this . constantPool . literalIndex ( subChars , utf8encoding ) ; ldcForIndex ( index ) ; invokeStringConcatenationStringConstructor ( ) ; while ( i < constantLength ) { length = <NUM_LIT:0> ; utf8encoding = new byte [ Math . min ( constantLength - i + <NUM_LIT:100> , <NUM_LIT> ) ] ; int startIndex = i ; while ( ( length < <NUM_LIT> ) && ( i < constantLength ) ) { char current = constantChars [ i ] ; if ( length + <NUM_LIT:3> > ( utf8encodingLength = utf8encoding . length ) ) { System . arraycopy ( utf8encoding , <NUM_LIT:0> , utf8encoding = new byte [ Math . min ( utf8encodingLength + <NUM_LIT:100> , <NUM_LIT> ) ] , <NUM_LIT:0> , length ) ; } if ( ( current >= <NUM_LIT> ) && ( current <= <NUM_LIT> ) ) { utf8encoding [ length ++ ] = ( byte ) current ; } else { if ( current > <NUM_LIT> ) { utf8encoding [ length ++ ] = ( byte ) ( <NUM_LIT> | ( ( current > > <NUM_LIT:12> ) & <NUM_LIT> ) ) ; utf8encoding [ length ++ ] = ( byte ) ( <NUM_LIT> | ( ( current > > <NUM_LIT:6> ) & <NUM_LIT> ) ) ; utf8encoding [ length ++ ] = ( byte ) ( <NUM_LIT> | ( current & <NUM_LIT> ) ) ; } else { utf8encoding [ length ++ ] = ( byte ) ( <NUM_LIT> | ( ( current > > <NUM_LIT:6> ) & <NUM_LIT> ) ) ; utf8encoding [ length ++ ] = ( byte ) ( <NUM_LIT> | ( current & <NUM_LIT> ) ) ; } } i ++ ; } int newCharLength = i - startIndex ; subChars = new char [ newCharLength ] ; System . arraycopy ( constantChars , startIndex , subChars , <NUM_LIT:0> , newCharLength ) ; System . arraycopy ( utf8encoding , <NUM_LIT:0> , utf8encoding = new byte [ length ] , <NUM_LIT:0> , length ) ; index = this . constantPool . literalIndex ( subChars , utf8encoding ) ; ldcForIndex ( index ) ; invokeStringConcatenationAppendForType ( TypeIds . T_JavaLangString ) ; } invokeStringConcatenationToString ( ) ; invokeStringIntern ( ) ; } } public void ldc ( TypeBinding typeBinding ) { this . countLabels = <NUM_LIT:0> ; int index = this . constantPool . literalIndexForType ( typeBinding ) ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( index > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ldc_w ; writeUnsignedShort ( index ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ldc ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) index ; } } public void ldc2_w ( double constant ) { this . countLabels = <NUM_LIT:0> ; int index = this . constantPool . literalIndex ( constant ) ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ldc2_w ; writeUnsignedShort ( index ) ; } public void ldc2_w ( long constant ) { this . countLabels = <NUM_LIT:0> ; int index = this . constantPool . literalIndex ( constant ) ; this . stackDepth += <NUM_LIT:2> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ldc2_w ; writeUnsignedShort ( index ) ; } public void ldcForIndex ( int index ) { this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) { this . stackMax = this . stackDepth ; } if ( index > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ldc_w ; writeUnsignedShort ( index ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ldc ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) index ; } } public void ldiv ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ldiv ; } public void lload ( int iArg ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . maxLocals <= iArg + <NUM_LIT:1> ) { this . maxLocals = iArg + <NUM_LIT:2> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( iArg > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_wide ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lload ; writeUnsignedShort ( iArg ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lload ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) iArg ; } } public void lload_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . maxLocals < <NUM_LIT:2> ) { this . maxLocals = <NUM_LIT:2> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lload_0 ; } public void lload_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . maxLocals < <NUM_LIT:3> ) { this . maxLocals = <NUM_LIT:3> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lload_1 ; } public void lload_2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . maxLocals < <NUM_LIT:4> ) { this . maxLocals = <NUM_LIT:4> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lload_2 ; } public void lload_3 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += <NUM_LIT:2> ; if ( this . maxLocals < <NUM_LIT:5> ) { this . maxLocals = <NUM_LIT:5> ; } if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lload_3 ; } public void lmul ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lmul ; } public void lneg ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lneg ; } public final void load ( LocalVariableBinding localBinding ) { load ( localBinding . type , localBinding . resolvedPosition ) ; } protected final void load ( TypeBinding typeBinding , int resolvedPosition ) { this . countLabels = <NUM_LIT:0> ; switch ( typeBinding . id ) { case TypeIds . T_int : case TypeIds . T_byte : case TypeIds . T_char : case TypeIds . T_boolean : case TypeIds . T_short : switch ( resolvedPosition ) { case <NUM_LIT:0> : iload_0 ( ) ; break ; case <NUM_LIT:1> : iload_1 ( ) ; break ; case <NUM_LIT:2> : iload_2 ( ) ; break ; case <NUM_LIT:3> : iload_3 ( ) ; break ; default : iload ( resolvedPosition ) ; } break ; case TypeIds . T_float : switch ( resolvedPosition ) { case <NUM_LIT:0> : fload_0 ( ) ; break ; case <NUM_LIT:1> : fload_1 ( ) ; break ; case <NUM_LIT:2> : fload_2 ( ) ; break ; case <NUM_LIT:3> : fload_3 ( ) ; break ; default : fload ( resolvedPosition ) ; } break ; case TypeIds . T_long : switch ( resolvedPosition ) { case <NUM_LIT:0> : lload_0 ( ) ; break ; case <NUM_LIT:1> : lload_1 ( ) ; break ; case <NUM_LIT:2> : lload_2 ( ) ; break ; case <NUM_LIT:3> : lload_3 ( ) ; break ; default : lload ( resolvedPosition ) ; } break ; case TypeIds . T_double : switch ( resolvedPosition ) { case <NUM_LIT:0> : dload_0 ( ) ; break ; case <NUM_LIT:1> : dload_1 ( ) ; break ; case <NUM_LIT:2> : dload_2 ( ) ; break ; case <NUM_LIT:3> : dload_3 ( ) ; break ; default : dload ( resolvedPosition ) ; } break ; default : switch ( resolvedPosition ) { case <NUM_LIT:0> : aload_0 ( ) ; break ; case <NUM_LIT:1> : aload_1 ( ) ; break ; case <NUM_LIT:2> : aload_2 ( ) ; break ; case <NUM_LIT:3> : aload_3 ( ) ; break ; default : aload ( resolvedPosition ) ; } } } public void lookupswitch ( CaseLabel defaultLabel , int [ ] keys , int [ ] sortedIndexes , CaseLabel [ ] casesLabel ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; int length = keys . length ; int pos = this . position ; defaultLabel . placeInstruction ( ) ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { casesLabel [ i ] . placeInstruction ( ) ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lookupswitch ; for ( int i = ( <NUM_LIT:3> - ( pos & <NUM_LIT:3> ) ) ; i > <NUM_LIT:0> ; i -- ) { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = <NUM_LIT:0> ; } defaultLabel . branch ( ) ; writeSignedWord ( length ) ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { writeSignedWord ( keys [ sortedIndexes [ i ] ] ) ; casesLabel [ sortedIndexes [ i ] ] . branch ( ) ; } } public void lor ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lor ; } public void lrem ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lrem ; } public void lreturn ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lreturn ; this . lastAbruptCompletion = this . position ; } public void lshl ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lshl ; } public void lshr ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lshr ; } public void lstore ( int iArg ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . maxLocals <= iArg + <NUM_LIT:1> ) { this . maxLocals = iArg + <NUM_LIT:2> ; } if ( iArg > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_wide ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lstore ; writeUnsignedShort ( iArg ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lstore ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) iArg ; } } public void lstore_0 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . maxLocals < <NUM_LIT:2> ) { this . maxLocals = <NUM_LIT:2> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lstore_0 ; } public void lstore_1 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . maxLocals < <NUM_LIT:3> ) { this . maxLocals = <NUM_LIT:3> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lstore_1 ; } public void lstore_2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . maxLocals < <NUM_LIT:4> ) { this . maxLocals = <NUM_LIT:4> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lstore_2 ; } public void lstore_3 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . maxLocals < <NUM_LIT:5> ) { this . maxLocals = <NUM_LIT:5> ; } if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lstore_3 ; } public void lsub ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lsub ; } public void lushr ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lushr ; } public void lxor ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_lxor ; } public void monitorenter ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_monitorenter ; } public void monitorexit ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_monitorexit ; } public void multianewarray ( TypeBinding typeBinding , int dimensions ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth += ( <NUM_LIT:1> - dimensions ) ; if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_multianewarray ; writeUnsignedShort ( this . constantPool . literalIndexForType ( typeBinding ) ) ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) dimensions ; } public void new_ ( TypeBinding typeBinding ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_new ; writeUnsignedShort ( this . constantPool . literalIndexForType ( typeBinding ) ) ; } public void newarray ( int array_Type ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_newarray ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) array_Type ; } public void newArray ( ArrayBinding arrayBinding ) { TypeBinding component = arrayBinding . elementsType ( ) ; switch ( component . id ) { case TypeIds . T_int : newarray ( ClassFileConstants . INT_ARRAY ) ; break ; case TypeIds . T_byte : newarray ( ClassFileConstants . BYTE_ARRAY ) ; break ; case TypeIds . T_boolean : newarray ( ClassFileConstants . BOOLEAN_ARRAY ) ; break ; case TypeIds . T_short : newarray ( ClassFileConstants . SHORT_ARRAY ) ; break ; case TypeIds . T_char : newarray ( ClassFileConstants . CHAR_ARRAY ) ; break ; case TypeIds . T_long : newarray ( ClassFileConstants . LONG_ARRAY ) ; break ; case TypeIds . T_float : newarray ( ClassFileConstants . FLOAT_ARRAY ) ; break ; case TypeIds . T_double : newarray ( ClassFileConstants . DOUBLE_ARRAY ) ; break ; default : anewarray ( component ) ; } } public void newJavaLangAssertionError ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_new ; writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangAssertionErrorConstantPoolName ) ) ; } public void newJavaLangError ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_new ; writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangErrorConstantPoolName ) ) ; } public void newNoClassDefFoundError ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_new ; writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangNoClassDefFoundErrorConstantPoolName ) ) ; } public void newStringContatenation ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) { this . stackMax = this . stackDepth ; } if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_new ; if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangStringBuilderConstantPoolName ) ) ; } else { writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangStringBufferConstantPoolName ) ) ; } } public void newWrapperFor ( int typeID ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset + <NUM_LIT:2> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_new ; switch ( typeID ) { case TypeIds . T_int : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangIntegerConstantPoolName ) ) ; break ; case TypeIds . T_boolean : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangBooleanConstantPoolName ) ) ; break ; case TypeIds . T_byte : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangByteConstantPoolName ) ) ; break ; case TypeIds . T_char : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangCharacterConstantPoolName ) ) ; break ; case TypeIds . T_float : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangFloatConstantPoolName ) ) ; break ; case TypeIds . T_double : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangDoubleConstantPoolName ) ) ; break ; case TypeIds . T_short : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangShortConstantPoolName ) ) ; break ; case TypeIds . T_long : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangLongConstantPoolName ) ) ; break ; case TypeIds . T_void : writeUnsignedShort ( this . constantPool . literalIndexForType ( ConstantPool . JavaLangVoidConstantPoolName ) ) ; } } public void nop ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_nop ; } public void optimizeBranch ( int oldPosition , BranchLabel lbl ) { for ( int i = <NUM_LIT:0> ; i < this . countLabels ; i ++ ) { BranchLabel label = this . labels [ i ] ; if ( oldPosition == label . position ) { label . position = this . position ; if ( label instanceof CaseLabel ) { int offset = this . position - ( ( CaseLabel ) label ) . instructionPosition ; int [ ] forwardRefs = label . forwardReferences ( ) ; for ( int j = <NUM_LIT:0> , length = label . forwardReferenceCount ( ) ; j < length ; j ++ ) { int forwardRef = forwardRefs [ j ] ; this . writeSignedWord ( forwardRef , offset ) ; } } else { int [ ] forwardRefs = label . forwardReferences ( ) ; for ( int j = <NUM_LIT:0> , length = label . forwardReferenceCount ( ) ; j < length ; j ++ ) { final int forwardRef = forwardRefs [ j ] ; this . writePosition ( lbl , forwardRef ) ; } } } } } public void pop ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_pop ; } public void pop2 ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:2> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_pop2 ; } public void pushExceptionOnStack ( TypeBinding binding ) { this . stackDepth = <NUM_LIT:1> ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; } public void pushOnStack ( TypeBinding binding ) { if ( ++ this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; } public void record ( LocalVariableBinding local ) { if ( ( this . generateAttributes & ( ClassFileConstants . ATTR_VARS | ClassFileConstants . ATTR_STACK_MAP_TABLE | ClassFileConstants . ATTR_STACK_MAP ) ) == <NUM_LIT:0> ) return ; if ( this . allLocalsCounter == this . locals . length ) { System . arraycopy ( this . locals , <NUM_LIT:0> , this . locals = new LocalVariableBinding [ this . allLocalsCounter + LOCALS_INCREMENT ] , <NUM_LIT:0> , this . allLocalsCounter ) ; } this . locals [ this . allLocalsCounter ++ ] = local ; local . initializationPCs = new int [ <NUM_LIT:4> ] ; local . initializationCount = <NUM_LIT:0> ; } public void recordExpressionType ( TypeBinding typeBinding ) { } public void recordPositionsFrom ( int startPC , int sourcePos ) { this . recordPositionsFrom ( startPC , sourcePos , false ) ; } public void recordPositionsFrom ( int startPC , int sourcePos , boolean widen ) { if ( ( this . generateAttributes & ClassFileConstants . ATTR_LINES ) == <NUM_LIT:0> || sourcePos == <NUM_LIT:0> || ( startPC == this . position && ! widen ) ) return ; if ( this . pcToSourceMapSize + <NUM_LIT:4> > this . pcToSourceMap . length ) { System . arraycopy ( this . pcToSourceMap , <NUM_LIT:0> , this . pcToSourceMap = new int [ this . pcToSourceMapSize << <NUM_LIT:1> ] , <NUM_LIT:0> , this . pcToSourceMapSize ) ; } if ( this . pcToSourceMapSize > <NUM_LIT:0> ) { int lineNumber ; int previousLineNumber = this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:1> ] ; if ( this . lineNumberStart == this . lineNumberEnd ) { lineNumber = this . lineNumberStart ; } else { int [ ] lineSeparatorPositions2 = this . lineSeparatorPositions ; int length = lineSeparatorPositions2 . length ; if ( previousLineNumber == <NUM_LIT:1> ) { if ( sourcePos < lineSeparatorPositions2 [ <NUM_LIT:0> ] ) { lineNumber = <NUM_LIT:1> ; if ( startPC < this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:2> ] ) { int insertionIndex = insertionIndex ( this . pcToSourceMap , this . pcToSourceMapSize , startPC ) ; if ( insertionIndex != - <NUM_LIT:1> ) { if ( ! ( ( insertionIndex > <NUM_LIT:1> ) && ( this . pcToSourceMap [ insertionIndex - <NUM_LIT:1> ] == lineNumber ) ) ) { if ( ( this . pcToSourceMapSize > <NUM_LIT:4> ) && ( this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:4> ] > startPC ) ) { System . arraycopy ( this . pcToSourceMap , insertionIndex , this . pcToSourceMap , insertionIndex + <NUM_LIT:2> , this . pcToSourceMapSize - <NUM_LIT:2> - insertionIndex ) ; this . pcToSourceMap [ insertionIndex ++ ] = startPC ; this . pcToSourceMap [ insertionIndex ] = lineNumber ; } else { this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:2> ] = startPC ; } } } } this . lastEntryPC = this . position ; return ; } else if ( length == <NUM_LIT:1> || sourcePos < lineSeparatorPositions2 [ <NUM_LIT:1> ] ) { lineNumber = <NUM_LIT:2> ; if ( startPC <= this . lastEntryPC ) { int insertionIndex = insertionIndex ( this . pcToSourceMap , this . pcToSourceMapSize , startPC ) ; if ( insertionIndex != - <NUM_LIT:1> ) { int existingEntryIndex = indexOfSameLineEntrySincePC ( startPC , lineNumber ) ; if ( existingEntryIndex != - <NUM_LIT:1> ) { this . pcToSourceMap [ existingEntryIndex ] = startPC ; } else if ( insertionIndex < <NUM_LIT:1> || this . pcToSourceMap [ insertionIndex - <NUM_LIT:1> ] != lineNumber ) { System . arraycopy ( this . pcToSourceMap , insertionIndex , this . pcToSourceMap , insertionIndex + <NUM_LIT:2> , this . pcToSourceMapSize - insertionIndex ) ; this . pcToSourceMap [ insertionIndex ++ ] = startPC ; this . pcToSourceMap [ insertionIndex ] = lineNumber ; this . pcToSourceMapSize += <NUM_LIT:2> ; } } else if ( this . position != this . lastEntryPC ) { if ( this . lastEntryPC == startPC || this . lastEntryPC == this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:2> ] ) { this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:1> ] = lineNumber ; } else { this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = this . lastEntryPC ; this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = lineNumber ; } } else if ( this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:1> ] < lineNumber && widen ) { this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:1> ] = lineNumber ; } } else { this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = startPC ; this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = lineNumber ; } this . lastEntryPC = this . position ; return ; } else { lineNumber = Util . getLineNumber ( sourcePos , this . lineSeparatorPositions , this . lineNumberStart - <NUM_LIT:1> , this . lineNumberEnd - <NUM_LIT:1> ) ; } } else if ( previousLineNumber < length ) { if ( lineSeparatorPositions2 [ previousLineNumber - <NUM_LIT:2> ] < sourcePos ) { if ( sourcePos < lineSeparatorPositions2 [ previousLineNumber - <NUM_LIT:1> ] ) { lineNumber = previousLineNumber ; if ( startPC < this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:2> ] ) { int insertionIndex = insertionIndex ( this . pcToSourceMap , this . pcToSourceMapSize , startPC ) ; if ( insertionIndex != - <NUM_LIT:1> ) { if ( ! ( ( insertionIndex > <NUM_LIT:1> ) && ( this . pcToSourceMap [ insertionIndex - <NUM_LIT:1> ] == lineNumber ) ) ) { if ( ( this . pcToSourceMapSize > <NUM_LIT:4> ) && ( this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:4> ] > startPC ) ) { System . arraycopy ( this . pcToSourceMap , insertionIndex , this . pcToSourceMap , insertionIndex + <NUM_LIT:2> , this . pcToSourceMapSize - <NUM_LIT:2> - insertionIndex ) ; this . pcToSourceMap [ insertionIndex ++ ] = startPC ; this . pcToSourceMap [ insertionIndex ] = lineNumber ; } else { this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:2> ] = startPC ; } } } } this . lastEntryPC = this . position ; return ; } else if ( sourcePos < lineSeparatorPositions2 [ previousLineNumber ] ) { lineNumber = previousLineNumber + <NUM_LIT:1> ; if ( startPC <= this . lastEntryPC ) { int insertionIndex = insertionIndex ( this . pcToSourceMap , this . pcToSourceMapSize , startPC ) ; if ( insertionIndex != - <NUM_LIT:1> ) { int existingEntryIndex = indexOfSameLineEntrySincePC ( startPC , lineNumber ) ; if ( existingEntryIndex != - <NUM_LIT:1> ) { this . pcToSourceMap [ existingEntryIndex ] = startPC ; } else if ( insertionIndex < <NUM_LIT:1> || this . pcToSourceMap [ insertionIndex - <NUM_LIT:1> ] != lineNumber ) { System . arraycopy ( this . pcToSourceMap , insertionIndex , this . pcToSourceMap , insertionIndex + <NUM_LIT:2> , this . pcToSourceMapSize - insertionIndex ) ; this . pcToSourceMap [ insertionIndex ++ ] = startPC ; this . pcToSourceMap [ insertionIndex ] = lineNumber ; this . pcToSourceMapSize += <NUM_LIT:2> ; } } else if ( this . position != this . lastEntryPC ) { if ( this . lastEntryPC == startPC || this . lastEntryPC == this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:2> ] ) { this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:1> ] = lineNumber ; } else { this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = this . lastEntryPC ; this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = lineNumber ; } } else if ( this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:1> ] < lineNumber && widen ) { this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:1> ] = lineNumber ; } } else { this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = startPC ; this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = lineNumber ; } this . lastEntryPC = this . position ; return ; } else { lineNumber = Util . getLineNumber ( sourcePos , this . lineSeparatorPositions , this . lineNumberStart - <NUM_LIT:1> , this . lineNumberEnd - <NUM_LIT:1> ) ; } } else { lineNumber = Util . getLineNumber ( sourcePos , this . lineSeparatorPositions , this . lineNumberStart - <NUM_LIT:1> , this . lineNumberEnd - <NUM_LIT:1> ) ; } } else if ( lineSeparatorPositions2 [ length - <NUM_LIT:1> ] < sourcePos ) { lineNumber = length + <NUM_LIT:1> ; if ( startPC <= this . lastEntryPC ) { int insertionIndex = insertionIndex ( this . pcToSourceMap , this . pcToSourceMapSize , startPC ) ; if ( insertionIndex != - <NUM_LIT:1> ) { int existingEntryIndex = indexOfSameLineEntrySincePC ( startPC , lineNumber ) ; if ( existingEntryIndex != - <NUM_LIT:1> ) { this . pcToSourceMap [ existingEntryIndex ] = startPC ; } else if ( insertionIndex < <NUM_LIT:1> || this . pcToSourceMap [ insertionIndex - <NUM_LIT:1> ] != lineNumber ) { System . arraycopy ( this . pcToSourceMap , insertionIndex , this . pcToSourceMap , insertionIndex + <NUM_LIT:2> , this . pcToSourceMapSize - insertionIndex ) ; this . pcToSourceMap [ insertionIndex ++ ] = startPC ; this . pcToSourceMap [ insertionIndex ] = lineNumber ; this . pcToSourceMapSize += <NUM_LIT:2> ; } } else if ( this . position != this . lastEntryPC ) { if ( this . lastEntryPC == startPC || this . lastEntryPC == this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:2> ] ) { this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:1> ] = lineNumber ; } else { this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = this . lastEntryPC ; this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = lineNumber ; } } else if ( this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:1> ] < lineNumber && widen ) { this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:1> ] = lineNumber ; } } else { this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = startPC ; this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = lineNumber ; } this . lastEntryPC = this . position ; return ; } else { lineNumber = Util . getLineNumber ( sourcePos , this . lineSeparatorPositions , this . lineNumberStart - <NUM_LIT:1> , this . lineNumberEnd - <NUM_LIT:1> ) ; } } if ( previousLineNumber != lineNumber ) { if ( startPC <= this . lastEntryPC ) { int insertionIndex = insertionIndex ( this . pcToSourceMap , this . pcToSourceMapSize , startPC ) ; if ( insertionIndex != - <NUM_LIT:1> ) { int existingEntryIndex = indexOfSameLineEntrySincePC ( startPC , lineNumber ) ; if ( existingEntryIndex != - <NUM_LIT:1> ) { this . pcToSourceMap [ existingEntryIndex ] = startPC ; } else if ( insertionIndex < <NUM_LIT:1> || this . pcToSourceMap [ insertionIndex - <NUM_LIT:1> ] != lineNumber ) { System . arraycopy ( this . pcToSourceMap , insertionIndex , this . pcToSourceMap , insertionIndex + <NUM_LIT:2> , this . pcToSourceMapSize - insertionIndex ) ; this . pcToSourceMap [ insertionIndex ++ ] = startPC ; this . pcToSourceMap [ insertionIndex ] = lineNumber ; this . pcToSourceMapSize += <NUM_LIT:2> ; } } else if ( this . position != this . lastEntryPC ) { if ( this . lastEntryPC == startPC || this . lastEntryPC == this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:2> ] ) { this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:1> ] = lineNumber ; } else { this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = this . lastEntryPC ; this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = lineNumber ; } } else if ( this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:1> ] < lineNumber && widen ) { this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:1> ] = lineNumber ; } } else { this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = startPC ; this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = lineNumber ; } } else { if ( startPC < this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:2> ] ) { int insertionIndex = insertionIndex ( this . pcToSourceMap , this . pcToSourceMapSize , startPC ) ; if ( insertionIndex != - <NUM_LIT:1> ) { if ( ! ( ( insertionIndex > <NUM_LIT:1> ) && ( this . pcToSourceMap [ insertionIndex - <NUM_LIT:1> ] == lineNumber ) ) ) { if ( ( this . pcToSourceMapSize > <NUM_LIT:4> ) && ( this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:4> ] > startPC ) ) { System . arraycopy ( this . pcToSourceMap , insertionIndex , this . pcToSourceMap , insertionIndex + <NUM_LIT:2> , this . pcToSourceMapSize - <NUM_LIT:2> - insertionIndex ) ; this . pcToSourceMap [ insertionIndex ++ ] = startPC ; this . pcToSourceMap [ insertionIndex ] = lineNumber ; } else { this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:2> ] = startPC ; } } } } } this . lastEntryPC = this . position ; } else { int lineNumber = <NUM_LIT:0> ; if ( this . lineNumberStart == this . lineNumberEnd ) { lineNumber = this . lineNumberStart ; } else { lineNumber = Util . getLineNumber ( sourcePos , this . lineSeparatorPositions , this . lineNumberStart - <NUM_LIT:1> , this . lineNumberEnd - <NUM_LIT:1> ) ; } this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = startPC ; this . pcToSourceMap [ this . pcToSourceMapSize ++ ] = lineNumber ; this . lastEntryPC = this . position ; } } public void registerExceptionHandler ( ExceptionLabel anExceptionLabel ) { int length ; if ( this . exceptionLabelsCounter == ( length = this . exceptionLabels . length ) ) { System . arraycopy ( this . exceptionLabels , <NUM_LIT:0> , this . exceptionLabels = new ExceptionLabel [ length + LABELS_INCREMENT ] , <NUM_LIT:0> , length ) ; } this . exceptionLabels [ this . exceptionLabelsCounter ++ ] = anExceptionLabel ; } public void removeNotDefinitelyAssignedVariables ( Scope scope , int initStateIndex ) { if ( ( this . generateAttributes & ( ClassFileConstants . ATTR_VARS | ClassFileConstants . ATTR_STACK_MAP_TABLE | ClassFileConstants . ATTR_STACK_MAP ) ) == <NUM_LIT:0> ) return ; for ( int i = <NUM_LIT:0> ; i < this . visibleLocalsCount ; i ++ ) { LocalVariableBinding localBinding = this . visibleLocals [ i ] ; if ( localBinding != null && ! isDefinitelyAssigned ( scope , initStateIndex , localBinding ) && localBinding . initializationCount > <NUM_LIT:0> ) { localBinding . recordInitializationEndPC ( this . position ) ; } } } public void removeUnusedPcToSourceMapEntries ( ) { if ( this . pcToSourceMapSize != <NUM_LIT:0> ) { while ( this . pcToSourceMapSize >= <NUM_LIT:2> && this . pcToSourceMap [ this . pcToSourceMapSize - <NUM_LIT:2> ] > this . position ) { this . pcToSourceMapSize -= <NUM_LIT:2> ; } } } public void removeVariable ( LocalVariableBinding localBinding ) { if ( localBinding == null ) return ; if ( localBinding . initializationCount > <NUM_LIT:0> ) { localBinding . recordInitializationEndPC ( this . position ) ; } for ( int i = this . visibleLocalsCount - <NUM_LIT:1> ; i >= <NUM_LIT:0> ; i -- ) { LocalVariableBinding visibleLocal = this . visibleLocals [ i ] ; if ( visibleLocal == localBinding ) { this . visibleLocals [ i ] = null ; return ; } } } public void reset ( AbstractMethodDeclaration referenceMethod , ClassFile targetClassFile ) { init ( targetClassFile ) ; this . methodDeclaration = referenceMethod ; int [ ] lineSeparatorPositions2 = this . lineSeparatorPositions ; if ( lineSeparatorPositions2 != null ) { int length = lineSeparatorPositions2 . length ; int lineSeparatorPositionsEnd = length - <NUM_LIT:1> ; if ( referenceMethod . isClinit ( ) || referenceMethod . isConstructor ( ) ) { this . lineNumberStart = <NUM_LIT:1> ; this . lineNumberEnd = length == <NUM_LIT:0> ? <NUM_LIT:1> : length ; } else { int start = Util . getLineNumber ( referenceMethod . bodyStart , lineSeparatorPositions2 , <NUM_LIT:0> , lineSeparatorPositionsEnd ) ; this . lineNumberStart = start ; if ( start > lineSeparatorPositionsEnd ) { this . lineNumberEnd = start ; } else { int end = Util . getLineNumber ( referenceMethod . bodyEnd , lineSeparatorPositions2 , start - <NUM_LIT:1> , lineSeparatorPositionsEnd ) ; if ( end >= lineSeparatorPositionsEnd ) { end = length ; } this . lineNumberEnd = end == <NUM_LIT:0> ? <NUM_LIT:1> : end ; } } } this . preserveUnusedLocals = referenceMethod . scope . compilerOptions ( ) . preserveAllLocalVariables ; initializeMaxLocals ( referenceMethod . binding ) ; } public void reset ( ClassFile givenClassFile ) { this . targetLevel = givenClassFile . targetJDK ; int produceAttributes = givenClassFile . produceAttributes ; this . generateAttributes = produceAttributes ; if ( ( produceAttributes & ClassFileConstants . ATTR_LINES ) != <NUM_LIT:0> ) { this . lineSeparatorPositions = givenClassFile . referenceBinding . scope . referenceCompilationUnit ( ) . compilationResult . getLineSeparatorPositions ( ) ; } else { this . lineSeparatorPositions = null ; } } public void resetForProblemClinit ( ClassFile targetClassFile ) { init ( targetClassFile ) ; initializeMaxLocals ( null ) ; } public void resetInWideMode ( ) { this . wideMode = true ; } public void resetForCodeGenUnusedLocals ( ) { } private final void resizeByteArray ( ) { int length = this . bCodeStream . length ; int requiredSize = length + length ; if ( this . classFileOffset >= requiredSize ) { requiredSize = this . classFileOffset + length ; } System . arraycopy ( this . bCodeStream , <NUM_LIT:0> , this . bCodeStream = new byte [ requiredSize ] , <NUM_LIT:0> , length ) ; } final public void ret ( int index ) { this . countLabels = <NUM_LIT:0> ; if ( index > <NUM_LIT:255> ) { if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_wide ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ret ; writeUnsignedShort ( index ) ; } else { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_ret ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) index ; } } public void return_ ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_return ; this . lastAbruptCompletion = this . position ; } public void saload ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_saload ; } public void sastore ( ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -= <NUM_LIT:3> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_sastore ; } public void sendOperator ( int operatorConstant , int type_ID ) { switch ( type_ID ) { case TypeIds . T_int : case TypeIds . T_boolean : case TypeIds . T_char : case TypeIds . T_byte : case TypeIds . T_short : switch ( operatorConstant ) { case OperatorIds . PLUS : iadd ( ) ; break ; case OperatorIds . MINUS : isub ( ) ; break ; case OperatorIds . MULTIPLY : imul ( ) ; break ; case OperatorIds . DIVIDE : idiv ( ) ; break ; case OperatorIds . REMAINDER : irem ( ) ; break ; case OperatorIds . LEFT_SHIFT : ishl ( ) ; break ; case OperatorIds . RIGHT_SHIFT : ishr ( ) ; break ; case OperatorIds . UNSIGNED_RIGHT_SHIFT : iushr ( ) ; break ; case OperatorIds . AND : iand ( ) ; break ; case OperatorIds . OR : ior ( ) ; break ; case OperatorIds . XOR : ixor ( ) ; break ; } break ; case TypeIds . T_long : switch ( operatorConstant ) { case OperatorIds . PLUS : ladd ( ) ; break ; case OperatorIds . MINUS : lsub ( ) ; break ; case OperatorIds . MULTIPLY : lmul ( ) ; break ; case OperatorIds . DIVIDE : ldiv ( ) ; break ; case OperatorIds . REMAINDER : lrem ( ) ; break ; case OperatorIds . LEFT_SHIFT : lshl ( ) ; break ; case OperatorIds . RIGHT_SHIFT : lshr ( ) ; break ; case OperatorIds . UNSIGNED_RIGHT_SHIFT : lushr ( ) ; break ; case OperatorIds . AND : land ( ) ; break ; case OperatorIds . OR : lor ( ) ; break ; case OperatorIds . XOR : lxor ( ) ; break ; } break ; case TypeIds . T_float : switch ( operatorConstant ) { case OperatorIds . PLUS : fadd ( ) ; break ; case OperatorIds . MINUS : fsub ( ) ; break ; case OperatorIds . MULTIPLY : fmul ( ) ; break ; case OperatorIds . DIVIDE : fdiv ( ) ; break ; case OperatorIds . REMAINDER : frem ( ) ; } break ; case TypeIds . T_double : switch ( operatorConstant ) { case OperatorIds . PLUS : dadd ( ) ; break ; case OperatorIds . MINUS : dsub ( ) ; break ; case OperatorIds . MULTIPLY : dmul ( ) ; break ; case OperatorIds . DIVIDE : ddiv ( ) ; break ; case OperatorIds . REMAINDER : drem ( ) ; } } } public void sipush ( int s ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth ++ ; if ( this . stackDepth > this . stackMax ) this . stackMax = this . stackDepth ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_sipush ; writeSignedShort ( s ) ; } public void store ( LocalVariableBinding localBinding , boolean valueRequired ) { int localPosition = localBinding . resolvedPosition ; switch ( localBinding . type . id ) { case TypeIds . T_int : case TypeIds . T_char : case TypeIds . T_byte : case TypeIds . T_short : case TypeIds . T_boolean : if ( valueRequired ) dup ( ) ; switch ( localPosition ) { case <NUM_LIT:0> : istore_0 ( ) ; break ; case <NUM_LIT:1> : istore_1 ( ) ; break ; case <NUM_LIT:2> : istore_2 ( ) ; break ; case <NUM_LIT:3> : istore_3 ( ) ; break ; default : istore ( localPosition ) ; } break ; case TypeIds . T_float : if ( valueRequired ) dup ( ) ; switch ( localPosition ) { case <NUM_LIT:0> : fstore_0 ( ) ; break ; case <NUM_LIT:1> : fstore_1 ( ) ; break ; case <NUM_LIT:2> : fstore_2 ( ) ; break ; case <NUM_LIT:3> : fstore_3 ( ) ; break ; default : fstore ( localPosition ) ; } break ; case TypeIds . T_double : if ( valueRequired ) dup2 ( ) ; switch ( localPosition ) { case <NUM_LIT:0> : dstore_0 ( ) ; break ; case <NUM_LIT:1> : dstore_1 ( ) ; break ; case <NUM_LIT:2> : dstore_2 ( ) ; break ; case <NUM_LIT:3> : dstore_3 ( ) ; break ; default : dstore ( localPosition ) ; } break ; case TypeIds . T_long : if ( valueRequired ) dup2 ( ) ; switch ( localPosition ) { case <NUM_LIT:0> : lstore_0 ( ) ; break ; case <NUM_LIT:1> : lstore_1 ( ) ; break ; case <NUM_LIT:2> : lstore_2 ( ) ; break ; case <NUM_LIT:3> : lstore_3 ( ) ; break ; default : lstore ( localPosition ) ; } break ; default : if ( valueRequired ) dup ( ) ; switch ( localPosition ) { case <NUM_LIT:0> : astore_0 ( ) ; break ; case <NUM_LIT:1> : astore_1 ( ) ; break ; case <NUM_LIT:2> : astore_2 ( ) ; break ; case <NUM_LIT:3> : astore_3 ( ) ; break ; default : astore ( localPosition ) ; } } } public void swap ( ) { this . countLabels = <NUM_LIT:0> ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_swap ; } public void tableswitch ( CaseLabel defaultLabel , int low , int high , int [ ] keys , int [ ] sortedIndexes , CaseLabel [ ] casesLabel ) { this . countLabels = <NUM_LIT:0> ; this . stackDepth -- ; int length = casesLabel . length ; int pos = this . position ; defaultLabel . placeInstruction ( ) ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) casesLabel [ i ] . placeInstruction ( ) ; if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = Opcodes . OPC_tableswitch ; for ( int i = ( <NUM_LIT:3> - ( pos & <NUM_LIT:3> ) ) ; i > <NUM_LIT:0> ; i -- ) { if ( this . classFileOffset >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position ++ ; this . bCodeStream [ this . classFileOffset ++ ] = <NUM_LIT:0> ; } defaultLabel . branch ( ) ; writeSignedWord ( low ) ; writeSignedWord ( high ) ; int i = low , j = low ; while ( true ) { int index ; int key = keys [ index = sortedIndexes [ j - low ] ] ; if ( key == i ) { casesLabel [ index ] . branch ( ) ; j ++ ; if ( i == high ) break ; } else { defaultLabel . branch ( ) ; } i ++ ; } } public void throwAnyException ( LocalVariableBinding anyExceptionVariable ) { this . load ( anyExceptionVariable ) ; athrow ( ) ; } public String toString ( ) { StringBuffer buffer = new StringBuffer ( "<STR_LIT>" ) ; buffer . append ( this . position ) ; buffer . append ( "<STR_LIT>" ) ; buffer . append ( this . stackDepth ) ; buffer . append ( "<STR_LIT>" ) ; buffer . append ( this . stackMax ) ; buffer . append ( "<STR_LIT>" ) ; buffer . append ( this . maxLocals ) ; buffer . append ( "<STR_LIT:)>" ) ; return buffer . toString ( ) ; } protected void writePosition ( BranchLabel label ) { int offset = label . position - this . position + <NUM_LIT:1> ; if ( Math . abs ( offset ) > <NUM_LIT> && ! this . wideMode ) { throw new AbortMethod ( CodeStream . RESTART_IN_WIDE_MODE , null ) ; } this . writeSignedShort ( offset ) ; int [ ] forwardRefs = label . forwardReferences ( ) ; for ( int i = <NUM_LIT:0> , max = label . forwardReferenceCount ( ) ; i < max ; i ++ ) { this . writePosition ( label , forwardRefs [ i ] ) ; } } protected void writePosition ( BranchLabel label , int forwardReference ) { final int offset = label . position - forwardReference + <NUM_LIT:1> ; if ( Math . abs ( offset ) > <NUM_LIT> && ! this . wideMode ) { throw new AbortMethod ( CodeStream . RESTART_IN_WIDE_MODE , null ) ; } if ( this . wideMode ) { if ( ( label . tagBits & BranchLabel . WIDE ) != <NUM_LIT:0> ) { this . writeSignedWord ( forwardReference , offset ) ; } else { this . writeSignedShort ( forwardReference , offset ) ; } } else { this . writeSignedShort ( forwardReference , offset ) ; } } private final void writeSignedShort ( int value ) { if ( this . classFileOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) ( value > > <NUM_LIT:8> ) ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) value ; } private final void writeSignedShort ( int pos , int value ) { int currentOffset = this . startingClassFileOffset + pos ; if ( currentOffset + <NUM_LIT:1> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . bCodeStream [ currentOffset ] = ( byte ) ( value > > <NUM_LIT:8> ) ; this . bCodeStream [ currentOffset + <NUM_LIT:1> ] = ( byte ) value ; } protected final void writeSignedWord ( int value ) { if ( this . classFileOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . position += <NUM_LIT:4> ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) ( ( value & <NUM_LIT> ) > > <NUM_LIT:24> ) ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) ( ( value & <NUM_LIT> ) > > <NUM_LIT:16> ) ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) ( ( value & <NUM_LIT> ) > > <NUM_LIT:8> ) ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) ( value & <NUM_LIT> ) ; } protected void writeSignedWord ( int pos , int value ) { int currentOffset = this . startingClassFileOffset + pos ; if ( currentOffset + <NUM_LIT:3> >= this . bCodeStream . length ) { resizeByteArray ( ) ; } this . bCodeStream [ currentOffset ++ ] = ( byte ) ( ( value & <NUM_LIT> ) > > <NUM_LIT:24> ) ; this . bCodeStream [ currentOffset ++ ] = ( byte ) ( ( value & <NUM_LIT> ) > > <NUM_LIT:16> ) ; this . bCodeStream [ currentOffset ++ ] = ( byte ) ( ( value & <NUM_LIT> ) > > <NUM_LIT:8> ) ; this . bCodeStream [ currentOffset ++ ] = ( byte ) ( value & <NUM_LIT> ) ; } private final void writeUnsignedShort ( int value ) { this . position += <NUM_LIT:2> ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) ( value > > > <NUM_LIT:8> ) ; this . bCodeStream [ this . classFileOffset ++ ] = ( byte ) value ; } protected void writeWidePosition ( BranchLabel label ) { int labelPos = label . position ; int offset = labelPos - this . position + <NUM_LIT:1> ; this . writeSignedWord ( offset ) ; int [ ] forwardRefs = label . forwardReferences ( ) ; for ( int i = <NUM_LIT:0> , max = label . forwardReferenceCount ( ) ; i < max ; i ++ ) { int forward = forwardRefs [ i ] ; offset = labelPos - forward + <NUM_LIT:1> ; this . writeSignedWord ( forward , offset ) ; } } } </s>
<s> package org . eclipse . jdt . internal . compiler . codegen ; public class ObjectCache { public Object keyTable [ ] ; public int valueTable [ ] ; int elementSize ; int threshold ; public ObjectCache ( ) { this ( <NUM_LIT> ) ; } public ObjectCache ( int initialCapacity ) { this . elementSize = <NUM_LIT:0> ; this . threshold = ( int ) ( initialCapacity * <NUM_LIT> ) ; this . keyTable = new Object [ initialCapacity ] ; this . valueTable = new int [ initialCapacity ] ; } public void clear ( ) { for ( int i = this . keyTable . length ; -- i >= <NUM_LIT:0> ; ) { this . keyTable [ i ] = null ; this . valueTable [ i ] = <NUM_LIT:0> ; } this . elementSize = <NUM_LIT:0> ; } public boolean containsKey ( Object key ) { int index = hashCode ( key ) , length = this . keyTable . length ; while ( this . keyTable [ index ] != null ) { if ( this . keyTable [ index ] == key ) return true ; if ( ++ index == length ) { index = <NUM_LIT:0> ; } } return false ; } public int get ( Object key ) { int index = hashCode ( key ) , length = this . keyTable . length ; while ( this . keyTable [ index ] != null ) { if ( this . keyTable [ index ] == key ) return this . valueTable [ index ] ; if ( ++ index == length ) { index = <NUM_LIT:0> ; } } return - <NUM_LIT:1> ; } public int hashCode ( Object key ) { return ( key . hashCode ( ) & <NUM_LIT> ) % this . keyTable . length ; } public int put ( Object key , int value ) { int index = hashCode ( key ) , length = this . keyTable . length ; while ( this . keyTable [ index ] != null ) { if ( this . keyTable [ index ] == key ) return this . valueTable [ index ] = value ; if ( ++ index == length ) { index = <NUM_LIT:0> ; } } this . keyTable [ index ] = key ; this . valueTable [ index ] = value ; if ( ++ this . elementSize > this . threshold ) rehash ( ) ; return value ; } private void rehash ( ) { ObjectCache newHashtable = new ObjectCache ( this . keyTable . length * <NUM_LIT:2> ) ; for ( int i = this . keyTable . length ; -- i >= <NUM_LIT:0> ; ) if ( this . keyTable [ i ] != null ) newHashtable . put ( this . keyTable [ i ] , this . valueTable [ i ] ) ; this . keyTable = newHashtable . keyTable ; this . valueTable = newHashtable . valueTable ; this . threshold = newHashtable . threshold ; } public int size ( ) { return this . elementSize ; } public String toString ( ) { int max = size ( ) ; StringBuffer buf = new StringBuffer ( ) ; buf . append ( "<STR_LIT:{>" ) ; for ( int i = <NUM_LIT:0> ; i < max ; ++ i ) { if ( this . keyTable [ i ] != null ) { buf . append ( this . keyTable [ i ] ) . append ( "<STR_LIT>" ) . append ( this . valueTable [ i ] ) ; } if ( i < max ) { buf . append ( "<STR_LIT:U+002CU+0020>" ) ; } } buf . append ( "<STR_LIT:}>" ) ; return buf . toString ( ) ; } } </s>
<s> package org . eclipse . jdt . internal . compiler . codegen ; public class FloatCache { private float keyTable [ ] ; private int valueTable [ ] ; private int elementSize ; public FloatCache ( ) { this ( <NUM_LIT> ) ; } public FloatCache ( int initialCapacity ) { this . elementSize = <NUM_LIT:0> ; this . keyTable = new float [ initialCapacity ] ; this . valueTable = new int [ initialCapacity ] ; } public void clear ( ) { for ( int i = this . keyTable . length ; -- i >= <NUM_LIT:0> ; ) { this . keyTable [ i ] = <NUM_LIT:0.0f> ; this . valueTable [ i ] = <NUM_LIT:0> ; } this . elementSize = <NUM_LIT:0> ; } public boolean containsKey ( float key ) { if ( key == <NUM_LIT:0.0f> ) { for ( int i = <NUM_LIT:0> , max = this . elementSize ; i < max ; i ++ ) { if ( this . keyTable [ i ] == <NUM_LIT:0.0f> ) { int value1 = Float . floatToIntBits ( key ) ; int value2 = Float . floatToIntBits ( this . keyTable [ i ] ) ; if ( value1 == - <NUM_LIT> && value2 == - <NUM_LIT> ) return true ; if ( value1 == <NUM_LIT:0> && value2 == <NUM_LIT:0> ) return true ; } } } else { for ( int i = <NUM_LIT:0> , max = this . elementSize ; i < max ; i ++ ) { if ( this . keyTable [ i ] == key ) { return true ; } } } return false ; } public int put ( float key , int value ) { if ( this . elementSize == this . keyTable . length ) { System . arraycopy ( this . keyTable , <NUM_LIT:0> , ( this . keyTable = new float [ this . elementSize * <NUM_LIT:2> ] ) , <NUM_LIT:0> , this . elementSize ) ; System . arraycopy ( this . valueTable , <NUM_LIT:0> , ( this . valueTable = new int [ this . elementSize * <NUM_LIT:2> ] ) , <NUM_LIT:0> , this . elementSize ) ; } this . keyTable [ this . elementSize ] = key ; this . valueTable [ this . elementSize ] = value ; this . elementSize ++ ; return value ; } public int putIfAbsent ( float key , int value ) { if ( key == <NUM_LIT:0.0f> ) { for ( int i = <NUM_LIT:0> , max = this . elementSize ; i < max ; i ++ ) { if ( this . keyTable [ i ] == <NUM_LIT:0.0f> ) { int value1 = Float . floatToIntBits ( key ) ; int value2 = Float . floatToIntBits ( this . keyTable [ i ] ) ; if ( value1 == - <NUM_LIT> && value2 == - <NUM_LIT> ) return this . valueTable [ i ] ; if ( value1 == <NUM_LIT:0> && value2 == <NUM_LIT:0> ) return this . valueTable [ i ] ; } } } else { for ( int i = <NUM_LIT:0> , max = this . elementSize ; i < max ; i ++ ) { if ( this . keyTable [ i ] == key ) { return this . valueTable [ i ] ; } } } if ( this . elementSize == this . keyTable . length ) { System . arraycopy ( this . keyTable , <NUM_LIT:0> , ( this . keyTable = new float [ this . elementSize * <NUM_LIT:2> ] ) , <NUM_LIT:0> , this . elementSize ) ; System . arraycopy ( this . valueTable , <NUM_LIT:0> , ( this . valueTable = new int [ this . elementSize * <NUM_LIT:2> ] ) , <NUM_LIT:0> , this . elementSize ) ; } this . keyTable [ this . elementSize ] = key ; this . valueTable [ this . elementSize ] = value ; this . elementSize ++ ; return - value ; } public String toString ( ) { int max = this . elementSize ; StringBuffer buf = new StringBuffer ( ) ; buf . append ( "<STR_LIT:{>" ) ; for ( int i = <NUM_LIT:0> ; i < max ; ++ i ) { if ( ( this . keyTable [ i ] != <NUM_LIT:0> ) || ( ( this . keyTable [ i ] == <NUM_LIT:0> ) && ( this . valueTable [ i ] != <NUM_LIT:0> ) ) ) { buf . append ( this . keyTable [ i ] ) . append ( "<STR_LIT>" ) . append ( this . valueTable [ i ] ) ; } if ( i < max ) { buf . append ( "<STR_LIT:U+002CU+0020>" ) ; } } buf . append ( "<STR_LIT:}>" ) ; return buf . toString ( ) ; } } </s>
<s> package org . eclipse . jdt . internal . compiler . codegen ; public interface AttributeNamesConstants { final char [ ] SyntheticName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] ConstantValueName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] LineNumberTableName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] LocalVariableTableName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] InnerClassName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] CodeName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] ExceptionsName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] SourceName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] DeprecatedName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] SignatureName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] LocalVariableTypeTableName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] EnclosingMethodName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] AnnotationDefaultName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] RuntimeInvisibleAnnotationsName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] RuntimeVisibleAnnotationsName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] RuntimeInvisibleParameterAnnotationsName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] RuntimeVisibleParameterAnnotationsName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] StackMapTableName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] InconsistentHierarchy = "<STR_LIT>" . toCharArray ( ) ; final char [ ] VarargsName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] StackMapName = "<STR_LIT>" . toCharArray ( ) ; final char [ ] MissingTypesName = "<STR_LIT>" . toCharArray ( ) ; } </s>
<s> package org . eclipse . jdt . internal . compiler . codegen ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . HashMap ; import java . util . HashSet ; import java . util . Iterator ; import java . util . Set ; import org . eclipse . jdt . core . compiler . CharOperation ; import org . eclipse . jdt . internal . compiler . ClassFile ; import org . eclipse . jdt . internal . compiler . ast . ASTNode ; import org . eclipse . jdt . internal . compiler . classfmt . ClassFileConstants ; import org . eclipse . jdt . internal . compiler . lookup . Binding ; import org . eclipse . jdt . internal . compiler . lookup . FieldBinding ; import org . eclipse . jdt . internal . compiler . lookup . LocalVariableBinding ; import org . eclipse . jdt . internal . compiler . lookup . MethodBinding ; import org . eclipse . jdt . internal . compiler . lookup . Scope ; import org . eclipse . jdt . internal . compiler . lookup . TypeBinding ; import org . eclipse . jdt . internal . compiler . lookup . TypeIds ; import org . eclipse . jdt . internal . compiler . problem . AbortMethod ; public class StackMapFrameCodeStream extends CodeStream { public static class ExceptionMarker implements Comparable { public char [ ] constantPoolName ; public int pc ; public ExceptionMarker ( int pc , char [ ] constantPoolName ) { this . pc = pc ; this . constantPoolName = constantPoolName ; } public int compareTo ( Object o ) { if ( o instanceof ExceptionMarker ) { return this . pc - ( ( ExceptionMarker ) o ) . pc ; } return <NUM_LIT:0> ; } public boolean equals ( Object obj ) { if ( obj instanceof ExceptionMarker ) { ExceptionMarker marker = ( ExceptionMarker ) obj ; return this . pc == marker . pc && CharOperation . equals ( this . constantPoolName , marker . constantPoolName ) ; } return false ; } public int hashCode ( ) { return this . pc + this . constantPoolName . hashCode ( ) ; } public String toString ( ) { StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( '<CHAR_LIT:(>' ) . append ( this . pc ) . append ( '<CHAR_LIT:U+002C>' ) . append ( this . constantPoolName ) . append ( '<CHAR_LIT:)>' ) ; return String . valueOf ( buffer ) ; } } public static class StackDepthMarker { public int pc ; public int delta ; public TypeBinding typeBinding ; public StackDepthMarker ( int pc , int delta , TypeBinding typeBinding ) { this . pc = pc ; this . typeBinding = typeBinding ; this . delta = delta ; } public StackDepthMarker ( int pc , int delta ) { this . pc = pc ; this . delta = delta ; } public String toString ( ) { StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( '<CHAR_LIT:(>' ) . append ( this . pc ) . append ( '<CHAR_LIT:U+002C>' ) . append ( this . delta ) ; if ( this . typeBinding != null ) { buffer . append ( '<CHAR_LIT:U+002C>' ) . append ( this . typeBinding . qualifiedPackageName ( ) ) . append ( this . typeBinding . qualifiedSourceName ( ) ) ; } buffer . append ( '<CHAR_LIT:)>' ) ; return String . valueOf ( buffer ) ; } } public static class StackMarker { public int pc ; public int destinationPC ; public VerificationTypeInfo [ ] infos ; public StackMarker ( int pc , int destinationPC ) { this . pc = pc ; this . destinationPC = destinationPC ; } public void setInfos ( VerificationTypeInfo [ ] infos ) { this . infos = infos ; } public String toString ( ) { StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( "<STR_LIT>" ) . append ( this . pc ) . append ( "<STR_LIT:U+0020toU+0020>" ) . append ( this . destinationPC ) ; if ( this . infos != null ) { for ( int i = <NUM_LIT:0> , max = this . infos . length ; i < max ; i ++ ) { if ( i > <NUM_LIT:0> ) buffer . append ( '<CHAR_LIT:U+002C>' ) ; buffer . append ( this . infos [ i ] ) ; } } buffer . append ( '<CHAR_LIT:]>' ) ; return String . valueOf ( buffer ) ; } } static class FramePosition { int counter ; } public int [ ] stateIndexes ; public int stateIndexesCounter ; private HashMap framePositions ; public Set exceptionMarkers ; public ArrayList stackDepthMarkers ; public ArrayList stackMarkers ; public StackMapFrameCodeStream ( ClassFile givenClassFile ) { super ( givenClassFile ) ; this . generateAttributes |= ClassFileConstants . ATTR_STACK_MAP ; } public void addDefinitelyAssignedVariables ( Scope scope , int initStateIndex ) { loop : for ( int i = <NUM_LIT:0> ; i < this . visibleLocalsCount ; i ++ ) { LocalVariableBinding localBinding = this . visibleLocals [ i ] ; if ( localBinding != null ) { boolean isDefinitelyAssigned = isDefinitelyAssigned ( scope , initStateIndex , localBinding ) ; if ( ! isDefinitelyAssigned ) { if ( this . stateIndexes != null ) { for ( int j = <NUM_LIT:0> , max = this . stateIndexesCounter ; j < max ; j ++ ) { if ( isDefinitelyAssigned ( scope , this . stateIndexes [ j ] , localBinding ) ) { if ( ( localBinding . initializationCount == <NUM_LIT:0> ) || ( localBinding . initializationPCs [ ( ( localBinding . initializationCount - <NUM_LIT:1> ) << <NUM_LIT:1> ) + <NUM_LIT:1> ] != - <NUM_LIT:1> ) ) { localBinding . recordInitializationStartPC ( this . position ) ; } continue loop ; } } } } else { if ( ( localBinding . initializationCount == <NUM_LIT:0> ) || ( localBinding . initializationPCs [ ( ( localBinding . initializationCount - <NUM_LIT:1> ) << <NUM_LIT:1> ) + <NUM_LIT:1> ] != - <NUM_LIT:1> ) ) { localBinding . recordInitializationStartPC ( this . position ) ; } } } } } public void addExceptionMarker ( int pc , TypeBinding typeBinding ) { if ( this . exceptionMarkers == null ) { this . exceptionMarkers = new HashSet ( ) ; } if ( typeBinding == null ) { this . exceptionMarkers . add ( new ExceptionMarker ( pc , ConstantPool . JavaLangThrowableConstantPoolName ) ) ; } else { switch ( typeBinding . id ) { case TypeIds . T_null : this . exceptionMarkers . add ( new ExceptionMarker ( pc , ConstantPool . JavaLangClassNotFoundExceptionConstantPoolName ) ) ; break ; case TypeIds . T_long : this . exceptionMarkers . add ( new ExceptionMarker ( pc , ConstantPool . JavaLangNoSuchFieldErrorConstantPoolName ) ) ; break ; default : this . exceptionMarkers . add ( new ExceptionMarker ( pc , typeBinding . constantPoolName ( ) ) ) ; } } } public void addFramePosition ( int pc ) { Integer newEntry = new Integer ( pc ) ; FramePosition value ; if ( ( value = ( FramePosition ) this . framePositions . get ( newEntry ) ) != null ) { value . counter ++ ; } else { this . framePositions . put ( newEntry , new FramePosition ( ) ) ; } } public void optimizeBranch ( int oldPosition , BranchLabel lbl ) { super . optimizeBranch ( oldPosition , lbl ) ; removeFramePosition ( oldPosition ) ; } public void removeFramePosition ( int pc ) { Integer entry = new Integer ( pc ) ; FramePosition value ; if ( ( value = ( FramePosition ) this . framePositions . get ( entry ) ) != null ) { value . counter -- ; if ( value . counter <= <NUM_LIT:0> ) { this . framePositions . remove ( entry ) ; } } } public void addVariable ( LocalVariableBinding localBinding ) { if ( localBinding . initializationPCs == null ) { record ( localBinding ) ; } localBinding . recordInitializationStartPC ( this . position ) ; } private void addStackMarker ( int pc , int destinationPC ) { if ( this . stackMarkers == null ) { this . stackMarkers = new ArrayList ( ) ; this . stackMarkers . add ( new StackMarker ( pc , destinationPC ) ) ; } else { int size = this . stackMarkers . size ( ) ; if ( size == <NUM_LIT:0> || ( ( StackMarker ) this . stackMarkers . get ( size - <NUM_LIT:1> ) ) . pc != this . position ) { this . stackMarkers . add ( new StackMarker ( pc , destinationPC ) ) ; } } } private void addStackDepthMarker ( int pc , int delta , TypeBinding typeBinding ) { if ( this . stackDepthMarkers == null ) { this . stackDepthMarkers = new ArrayList ( ) ; this . stackDepthMarkers . add ( new StackDepthMarker ( pc , delta , typeBinding ) ) ; } else { int size = this . stackDepthMarkers . size ( ) ; if ( size == <NUM_LIT:0> ) { this . stackDepthMarkers . add ( new StackDepthMarker ( pc , delta , typeBinding ) ) ; } else { StackDepthMarker stackDepthMarker = ( StackDepthMarker ) this . stackDepthMarkers . get ( size - <NUM_LIT:1> ) ; if ( stackDepthMarker . pc != this . position ) { this . stackDepthMarkers . add ( new StackDepthMarker ( pc , delta , typeBinding ) ) ; } else { this . stackDepthMarkers . set ( size - <NUM_LIT:1> , new StackDepthMarker ( pc , delta , typeBinding ) ) ; } } } } public void decrStackSize ( int offset ) { super . decrStackSize ( offset ) ; addStackDepthMarker ( this . position , - <NUM_LIT:1> , null ) ; } public void recordExpressionType ( TypeBinding typeBinding ) { addStackDepthMarker ( this . position , <NUM_LIT:0> , typeBinding ) ; } public void generateClassLiteralAccessForType ( TypeBinding accessedType , FieldBinding syntheticFieldBinding ) { if ( accessedType . isBaseType ( ) && accessedType != TypeBinding . NULL ) { getTYPE ( accessedType . id ) ; return ; } if ( this . targetLevel >= ClassFileConstants . JDK1_5 ) { this . ldc ( accessedType ) ; } else { BranchLabel endLabel = new BranchLabel ( this ) ; if ( syntheticFieldBinding != null ) { fieldAccess ( Opcodes . OPC_getstatic , syntheticFieldBinding , null ) ; dup ( ) ; ifnonnull ( endLabel ) ; pop ( ) ; } ExceptionLabel classNotFoundExceptionHandler = new ExceptionLabel ( this , TypeBinding . NULL ) ; classNotFoundExceptionHandler . placeStart ( ) ; this . ldc ( accessedType == TypeBinding . NULL ? "<STR_LIT>" : String . valueOf ( accessedType . constantPoolName ( ) ) . replace ( '<CHAR_LIT:/>' , '<CHAR_LIT:.>' ) ) ; invokeClassForName ( ) ; classNotFoundExceptionHandler . placeEnd ( ) ; if ( syntheticFieldBinding != null ) { dup ( ) ; fieldAccess ( Opcodes . OPC_putstatic , syntheticFieldBinding , null ) ; } int fromPC = this . position ; goto_ ( endLabel ) ; int savedStackDepth = this . stackDepth ; pushExceptionOnStack ( TypeBinding . NULL ) ; classNotFoundExceptionHandler . place ( ) ; newNoClassDefFoundError ( ) ; dup_x1 ( ) ; swap ( ) ; invokeThrowableGetMessage ( ) ; invokeNoClassDefFoundErrorStringConstructor ( ) ; athrow ( ) ; endLabel . place ( ) ; addStackMarker ( fromPC , this . position ) ; this . stackDepth = savedStackDepth ; } } public void generateOuterAccess ( Object [ ] mappingSequence , ASTNode invocationSite , Binding target , Scope scope ) { int currentPosition = this . position ; super . generateOuterAccess ( mappingSequence , invocationSite , target , scope ) ; if ( currentPosition == this . position ) { throw new AbortMethod ( scope . referenceCompilationUnit ( ) . compilationResult , null ) ; } } public ExceptionMarker [ ] getExceptionMarkers ( ) { Set exceptionMarkerSet = this . exceptionMarkers ; if ( this . exceptionMarkers == null ) return null ; int size = exceptionMarkerSet . size ( ) ; ExceptionMarker [ ] markers = new ExceptionMarker [ size ] ; int n = <NUM_LIT:0> ; for ( Iterator iterator = exceptionMarkerSet . iterator ( ) ; iterator . hasNext ( ) ; ) { markers [ n ++ ] = ( ExceptionMarker ) iterator . next ( ) ; } Arrays . sort ( markers ) ; return markers ; } public int [ ] getFramePositions ( ) { Set set = this . framePositions . keySet ( ) ; int size = set . size ( ) ; int [ ] positions = new int [ size ] ; int n = <NUM_LIT:0> ; for ( Iterator iterator = set . iterator ( ) ; iterator . hasNext ( ) ; ) { positions [ n ++ ] = ( ( Integer ) iterator . next ( ) ) . intValue ( ) ; } Arrays . sort ( positions ) ; return positions ; } public StackDepthMarker [ ] getStackDepthMarkers ( ) { if ( this . stackDepthMarkers == null ) return null ; int length = this . stackDepthMarkers . size ( ) ; if ( length == <NUM_LIT:0> ) return null ; StackDepthMarker [ ] result = new StackDepthMarker [ length ] ; this . stackDepthMarkers . toArray ( result ) ; return result ; } public StackMarker [ ] getStackMarkers ( ) { if ( this . stackMarkers == null ) return null ; int length = this . stackMarkers . size ( ) ; if ( length == <NUM_LIT:0> ) return null ; StackMarker [ ] result = new StackMarker [ length ] ; this . stackMarkers . toArray ( result ) ; return result ; } public boolean hasFramePositions ( ) { return this . framePositions . size ( ) != <NUM_LIT:0> ; } public void init ( ClassFile targetClassFile ) { super . init ( targetClassFile ) ; this . stateIndexesCounter = <NUM_LIT:0> ; if ( this . framePositions != null ) { this . framePositions . clear ( ) ; } if ( this . exceptionMarkers != null ) { this . exceptionMarkers . clear ( ) ; } if ( this . stackDepthMarkers != null ) { this . stackDepthMarkers . clear ( ) ; } if ( this . stackMarkers != null ) { this . stackMarkers . clear ( ) ; } } public void initializeMaxLocals ( MethodBinding methodBinding ) { super . initializeMaxLocals ( methodBinding ) ; if ( this . framePositions == null ) { this . framePositions = new HashMap ( ) ; } else { this . framePositions . clear ( ) ; } } public void popStateIndex ( ) { this . stateIndexesCounter -- ; } public void pushStateIndex ( int naturalExitMergeInitStateIndex ) { if ( this . stateIndexes == null ) { this . stateIndexes = new int [ <NUM_LIT:3> ] ; } int length = this . stateIndexes . length ; if ( length == this . stateIndexesCounter ) { System . arraycopy ( this . stateIndexes , <NUM_LIT:0> , ( this . stateIndexes = new int [ length * <NUM_LIT:2> ] ) , <NUM_LIT:0> , length ) ; } this . stateIndexes [ this . stateIndexesCounter ++ ] = naturalExitMergeInitStateIndex ; } public void removeNotDefinitelyAssignedVariables ( Scope scope , int initStateIndex ) { int index = this . visibleLocalsCount ; loop : for ( int i = <NUM_LIT:0> ; i < index ; i ++ ) { LocalVariableBinding localBinding = this . visibleLocals [ i ] ; if ( localBinding != null && localBinding . initializationCount > <NUM_LIT:0> ) { boolean isDefinitelyAssigned = isDefinitelyAssigned ( scope , initStateIndex , localBinding ) ; if ( ! isDefinitelyAssigned ) { if ( this . stateIndexes != null ) { for ( int j = <NUM_LIT:0> , max = this . stateIndexesCounter ; j < max ; j ++ ) { if ( isDefinitelyAssigned ( scope , this . stateIndexes [ j ] , localBinding ) ) { continue loop ; } } } localBinding . recordInitializationEndPC ( this . position ) ; } } } } public void reset ( ClassFile givenClassFile ) { super . reset ( givenClassFile ) ; this . stateIndexesCounter = <NUM_LIT:0> ; if ( this . framePositions != null ) { this . framePositions . clear ( ) ; } if ( this . exceptionMarkers != null ) { this . exceptionMarkers . clear ( ) ; } if ( this . stackDepthMarkers != null ) { this . stackDepthMarkers . clear ( ) ; } if ( this . stackMarkers != null ) { this . stackMarkers . clear ( ) ; } } protected void writePosition ( BranchLabel label ) { super . writePosition ( label ) ; addFramePosition ( label . position ) ; } protected void writePosition ( BranchLabel label , int forwardReference ) { super . writePosition ( label , forwardReference ) ; addFramePosition ( label . position ) ; } protected void writeSignedWord ( int pos , int value ) { super . writeSignedWord ( pos , value ) ; addFramePosition ( this . position ) ; } protected void writeWidePosition ( BranchLabel label ) { super . writeWidePosition ( label ) ; addFramePosition ( label . position ) ; } public void areturn ( ) { super . areturn ( ) ; addFramePosition ( this . position ) ; } public void ireturn ( ) { super . ireturn ( ) ; addFramePosition ( this . position ) ; } public void lreturn ( ) { super . lreturn ( ) ; addFramePosition ( this . position ) ; } public void freturn ( ) { super . freturn ( ) ; addFramePosition ( this . position ) ; } public void dreturn ( ) { super . dreturn ( ) ; addFramePosition ( this . position ) ; } public void return_ ( ) { super . return_ ( ) ; addFramePosition ( this . position ) ; } public void athrow ( ) { super . athrow ( ) ; addFramePosition ( this . position ) ; } public void pushOnStack ( TypeBinding binding ) { super . pushOnStack ( binding ) ; addStackDepthMarker ( this . position , <NUM_LIT:1> , binding ) ; } public void pushExceptionOnStack ( TypeBinding binding ) { super . pushExceptionOnStack ( binding ) ; addExceptionMarker ( this . position , binding ) ; } public void goto_ ( BranchLabel label ) { super . goto_ ( label ) ; addFramePosition ( this . position ) ; } public void goto_w ( BranchLabel label ) { super . goto_w ( label ) ; addFramePosition ( this . position ) ; } public void resetInWideMode ( ) { this . resetSecretLocals ( ) ; super . resetInWideMode ( ) ; } public void resetForCodeGenUnusedLocals ( ) { this . resetSecretLocals ( ) ; super . resetForCodeGenUnusedLocals ( ) ; } public void resetSecretLocals ( ) { for ( int i = <NUM_LIT:0> , max = this . locals . length ; i < max ; i ++ ) { LocalVariableBinding localVariableBinding = this . locals [ i ] ; if ( localVariableBinding != null && localVariableBinding . isSecret ( ) ) { localVariableBinding . resetInitializations ( ) ; } } } } </s>
<s> package org . eclipse . jdt . internal . compiler . codegen ; public class CachedIndexEntry { public char [ ] signature ; public int index ; public CachedIndexEntry ( char [ ] signature , int index ) { this . signature = signature ; this . index = index ; } } </s>
<s> package org . eclipse . jdt . internal . compiler . codegen ; import java . util . Arrays ; import org . eclipse . jdt . internal . compiler . classfmt . ClassFileConstants ; import org . eclipse . jdt . internal . compiler . lookup . LocalVariableBinding ; public class BranchLabel extends Label { private int [ ] forwardReferences = new int [ <NUM_LIT:10> ] ; private int forwardReferenceCount = <NUM_LIT:0> ; BranchLabel delegate ; public int tagBits ; public final static int WIDE = <NUM_LIT:1> ; public final static int USED = <NUM_LIT:2> ; public BranchLabel ( ) { } public BranchLabel ( CodeStream codeStream ) { super ( codeStream ) ; } void addForwardReference ( int pos ) { if ( this . delegate != null ) { this . delegate . addForwardReference ( pos ) ; return ; } final int count = this . forwardReferenceCount ; if ( count >= <NUM_LIT:1> ) { int previousValue = this . forwardReferences [ count - <NUM_LIT:1> ] ; if ( previousValue < pos ) { int length ; if ( count >= ( length = this . forwardReferences . length ) ) System . arraycopy ( this . forwardReferences , <NUM_LIT:0> , ( this . forwardReferences = new int [ <NUM_LIT:2> * length ] ) , <NUM_LIT:0> , length ) ; this . forwardReferences [ this . forwardReferenceCount ++ ] = pos ; } else if ( previousValue > pos ) { int [ ] refs = this . forwardReferences ; for ( int i = <NUM_LIT:0> , max = this . forwardReferenceCount ; i < max ; i ++ ) { if ( refs [ i ] == pos ) return ; } int length ; if ( count >= ( length = refs . length ) ) System . arraycopy ( refs , <NUM_LIT:0> , ( this . forwardReferences = new int [ <NUM_LIT:2> * length ] ) , <NUM_LIT:0> , length ) ; this . forwardReferences [ this . forwardReferenceCount ++ ] = pos ; Arrays . sort ( this . forwardReferences , <NUM_LIT:0> , this . forwardReferenceCount ) ; } } else { int length ; if ( count >= ( length = this . forwardReferences . length ) ) System . arraycopy ( this . forwardReferences , <NUM_LIT:0> , ( this . forwardReferences = new int [ <NUM_LIT:2> * length ] ) , <NUM_LIT:0> , length ) ; this . forwardReferences [ this . forwardReferenceCount ++ ] = pos ; } } public void becomeDelegateFor ( BranchLabel otherLabel ) { otherLabel . delegate = this ; final int otherCount = otherLabel . forwardReferenceCount ; if ( otherCount == <NUM_LIT:0> ) return ; int [ ] mergedForwardReferences = new int [ this . forwardReferenceCount + otherCount ] ; int indexInMerge = <NUM_LIT:0> ; int j = <NUM_LIT:0> ; int i = <NUM_LIT:0> ; int max = this . forwardReferenceCount ; int max2 = otherLabel . forwardReferenceCount ; loop1 : for ( ; i < max ; i ++ ) { final int value1 = this . forwardReferences [ i ] ; for ( ; j < max2 ; j ++ ) { final int value2 = otherLabel . forwardReferences [ j ] ; if ( value1 < value2 ) { mergedForwardReferences [ indexInMerge ++ ] = value1 ; continue loop1 ; } else if ( value1 == value2 ) { mergedForwardReferences [ indexInMerge ++ ] = value1 ; j ++ ; continue loop1 ; } else { mergedForwardReferences [ indexInMerge ++ ] = value2 ; } } mergedForwardReferences [ indexInMerge ++ ] = value1 ; } for ( ; j < max2 ; j ++ ) { mergedForwardReferences [ indexInMerge ++ ] = otherLabel . forwardReferences [ j ] ; } this . forwardReferences = mergedForwardReferences ; this . forwardReferenceCount = indexInMerge ; } void branch ( ) { this . tagBits |= BranchLabel . USED ; if ( this . delegate != null ) { this . delegate . branch ( ) ; return ; } if ( this . position == Label . POS_NOT_SET ) { addForwardReference ( this . codeStream . position ) ; this . codeStream . position += <NUM_LIT:2> ; this . codeStream . classFileOffset += <NUM_LIT:2> ; } else { this . codeStream . writePosition ( this ) ; } } void branchWide ( ) { this . tagBits |= BranchLabel . USED ; if ( this . delegate != null ) { this . delegate . branchWide ( ) ; return ; } if ( this . position == Label . POS_NOT_SET ) { addForwardReference ( this . codeStream . position ) ; this . tagBits |= BranchLabel . WIDE ; this . codeStream . position += <NUM_LIT:4> ; this . codeStream . classFileOffset += <NUM_LIT:4> ; } else { this . codeStream . writeWidePosition ( this ) ; } } public int forwardReferenceCount ( ) { if ( this . delegate != null ) this . delegate . forwardReferenceCount ( ) ; return this . forwardReferenceCount ; } public int [ ] forwardReferences ( ) { if ( this . delegate != null ) this . delegate . forwardReferences ( ) ; return this . forwardReferences ; } public void initialize ( CodeStream stream ) { this . codeStream = stream ; this . position = Label . POS_NOT_SET ; this . forwardReferenceCount = <NUM_LIT:0> ; this . delegate = null ; } public boolean isCaseLabel ( ) { return false ; } public boolean isStandardLabel ( ) { return true ; } public void place ( ) { if ( this . position == Label . POS_NOT_SET ) { this . position = this . codeStream . position ; this . codeStream . addLabel ( this ) ; int oldPosition = this . position ; boolean isOptimizedBranch = false ; if ( this . forwardReferenceCount != <NUM_LIT:0> ) { isOptimizedBranch = ( this . forwardReferences [ this . forwardReferenceCount - <NUM_LIT:1> ] + <NUM_LIT:2> == this . position ) && ( this . codeStream . bCodeStream [ this . codeStream . classFileOffset - <NUM_LIT:3> ] == Opcodes . OPC_goto ) ; if ( isOptimizedBranch ) { if ( this . codeStream . lastAbruptCompletion == this . position ) { this . codeStream . lastAbruptCompletion = - <NUM_LIT:1> ; } this . codeStream . position = ( this . position -= <NUM_LIT:3> ) ; this . codeStream . classFileOffset -= <NUM_LIT:3> ; this . forwardReferenceCount -- ; if ( this . codeStream . lastEntryPC == oldPosition ) { this . codeStream . lastEntryPC = this . position ; } if ( ( this . codeStream . generateAttributes & ( ClassFileConstants . ATTR_VARS | ClassFileConstants . ATTR_STACK_MAP_TABLE | ClassFileConstants . ATTR_STACK_MAP ) ) != <NUM_LIT:0> ) { LocalVariableBinding locals [ ] = this . codeStream . locals ; for ( int i = <NUM_LIT:0> , max = locals . length ; i < max ; i ++ ) { LocalVariableBinding local = locals [ i ] ; if ( ( local != null ) && ( local . initializationCount > <NUM_LIT:0> ) ) { if ( local . initializationPCs [ ( ( local . initializationCount - <NUM_LIT:1> ) << <NUM_LIT:1> ) + <NUM_LIT:1> ] == oldPosition ) { local . initializationPCs [ ( ( local . initializationCount - <NUM_LIT:1> ) << <NUM_LIT:1> ) + <NUM_LIT:1> ] = this . position ; } if ( local . initializationPCs [ ( local . initializationCount - <NUM_LIT:1> ) << <NUM_LIT:1> ] == oldPosition ) { local . initializationPCs [ ( local . initializationCount - <NUM_LIT:1> ) << <NUM_LIT:1> ] = this . position ; } } } } if ( ( this . codeStream . generateAttributes & ClassFileConstants . ATTR_LINES ) != <NUM_LIT:0> ) { this . codeStream . removeUnusedPcToSourceMapEntries ( ) ; } } } for ( int i = <NUM_LIT:0> ; i < this . forwardReferenceCount ; i ++ ) { this . codeStream . writePosition ( this , this . forwardReferences [ i ] ) ; } if ( isOptimizedBranch ) { this . codeStream . optimizeBranch ( oldPosition , this ) ; } } } public String toString ( ) { String basic = getClass ( ) . getName ( ) ; basic = basic . substring ( basic . lastIndexOf ( '<CHAR_LIT:.>' ) + <NUM_LIT:1> ) ; StringBuffer buffer = new StringBuffer ( basic ) ; buffer . append ( '<CHAR_LIT>' ) . append ( Integer . toHexString ( hashCode ( ) ) ) ; buffer . append ( "<STR_LIT>" ) . append ( this . position ) ; if ( this . delegate != null ) buffer . append ( "<STR_LIT>" ) . append ( this . delegate ) ; buffer . append ( "<STR_LIT>" ) ; for ( int i = <NUM_LIT:0> ; i < this . forwardReferenceCount - <NUM_LIT:1> ; i ++ ) buffer . append ( this . forwardReferences [ i ] + "<STR_LIT:U+002CU+0020>" ) ; if ( this . forwardReferenceCount >= <NUM_LIT:1> ) buffer . append ( this . forwardReferences [ this . forwardReferenceCount - <NUM_LIT:1> ] ) ; buffer . append ( "<STR_LIT>" ) ; return buffer . toString ( ) ; } } </s>
<s> package org . eclipse . jdt . internal . compiler . codegen ; import org . eclipse . jdt . internal . compiler . ast . UnionTypeReference ; import org . eclipse . jdt . internal . compiler . ast . TypeReference ; import org . eclipse . jdt . internal . compiler . lookup . TypeBinding ; public class MultiCatchExceptionLabel extends ExceptionLabel { ExceptionLabel [ ] exceptionLabels ; public MultiCatchExceptionLabel ( CodeStream codeStream , TypeBinding exceptionType ) { super ( codeStream , exceptionType ) ; } public void initialize ( UnionTypeReference typeReference ) { TypeReference [ ] typeReferences = typeReference . typeReferences ; int length = typeReferences . length ; this . exceptionLabels = new ExceptionLabel [ length ] ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { this . exceptionLabels [ i ] = new ExceptionLabel ( this . codeStream , typeReferences [ i ] . resolvedType ) ; } } public void place ( ) { for ( int i = <NUM_LIT:0> , max = this . exceptionLabels . length ; i < max ; i ++ ) { this . exceptionLabels [ i ] . place ( ) ; } } public void placeEnd ( ) { for ( int i = <NUM_LIT:0> , max = this . exceptionLabels . length ; i < max ; i ++ ) { this . exceptionLabels [ i ] . placeEnd ( ) ; } } public void placeStart ( ) { for ( int i = <NUM_LIT:0> , max = this . exceptionLabels . length ; i < max ; i ++ ) { this . exceptionLabels [ i ] . placeStart ( ) ; } } public int getCount ( ) { int temp = <NUM_LIT:0> ; for ( int i = <NUM_LIT:0> , max = this . exceptionLabels . length ; i < max ; i ++ ) { temp += this . exceptionLabels [ i ] . getCount ( ) ; } return temp ; } } </s>
<s> package org . eclipse . jdt . internal . compiler . codegen ; public class CaseLabel extends BranchLabel { public int instructionPosition = POS_NOT_SET ; public CaseLabel ( CodeStream codeStream ) { super ( codeStream ) ; } void branch ( ) { if ( this . position == POS_NOT_SET ) { addForwardReference ( this . codeStream . position ) ; this . codeStream . position += <NUM_LIT:4> ; this . codeStream . classFileOffset += <NUM_LIT:4> ; } else { this . codeStream . writeSignedWord ( this . position - this . instructionPosition ) ; } } void branchWide ( ) { branch ( ) ; } public boolean isCaseLabel ( ) { return true ; } public boolean isStandardLabel ( ) { return false ; } public void place ( ) { if ( ( this . tagBits & USED ) != <NUM_LIT:0> ) { this . position = this . codeStream . getPosition ( ) ; } else { this . position = this . codeStream . position ; } if ( this . instructionPosition != POS_NOT_SET ) { int offset = this . position - this . instructionPosition ; int [ ] forwardRefs = forwardReferences ( ) ; for ( int i = <NUM_LIT:0> , length = forwardReferenceCount ( ) ; i < length ; i ++ ) { this . codeStream . writeSignedWord ( forwardRefs [ i ] , offset ) ; } this . codeStream . addLabel ( this ) ; } } void placeInstruction ( ) { if ( this . instructionPosition == POS_NOT_SET ) { this . instructionPosition = this . codeStream . position ; } } } </s>
<s> package org . eclipse . jdt . internal . compiler . codegen ; public interface Opcodes { public static final byte OPC_nop = <NUM_LIT:0> ; public static final byte OPC_aconst_null = <NUM_LIT:1> ; public static final byte OPC_iconst_m1 = <NUM_LIT:2> ; public static final byte OPC_iconst_0 = <NUM_LIT:3> ; public static final byte OPC_iconst_1 = <NUM_LIT:4> ; public static final byte OPC_iconst_2 = <NUM_LIT:5> ; public static final byte OPC_iconst_3 = <NUM_LIT:6> ; public static final byte OPC_iconst_4 = <NUM_LIT:7> ; public static final byte OPC_iconst_5 = <NUM_LIT:8> ; public static final byte OPC_lconst_0 = <NUM_LIT:9> ; public static final byte OPC_lconst_1 = <NUM_LIT:10> ; public static final byte OPC_fconst_0 = <NUM_LIT:11> ; public static final byte OPC_fconst_1 = <NUM_LIT:12> ; public static final byte OPC_fconst_2 = <NUM_LIT> ; public static final byte OPC_dconst_0 = <NUM_LIT> ; public static final byte OPC_dconst_1 = <NUM_LIT:15> ; public static final byte OPC_bipush = <NUM_LIT:16> ; public static final byte OPC_sipush = <NUM_LIT> ; public static final byte OPC_ldc = <NUM_LIT> ; public static final byte OPC_ldc_w = <NUM_LIT> ; public static final byte OPC_ldc2_w = <NUM_LIT:20> ; public static final byte OPC_iload = <NUM_LIT> ; public static final byte OPC_lload = <NUM_LIT> ; public static final byte OPC_fload = <NUM_LIT> ; public static final byte OPC_dload = <NUM_LIT:24> ; public static final byte OPC_aload = <NUM_LIT> ; public static final byte OPC_iload_0 = <NUM_LIT> ; public static final byte OPC_iload_1 = <NUM_LIT> ; public static final byte OPC_iload_2 = <NUM_LIT> ; public static final byte OPC_iload_3 = <NUM_LIT> ; public static final byte OPC_lload_0 = <NUM_LIT:30> ; public static final byte OPC_lload_1 = <NUM_LIT:31> ; public static final byte OPC_lload_2 = <NUM_LIT:32> ; public static final byte OPC_lload_3 = <NUM_LIT> ; public static final byte OPC_fload_0 = <NUM_LIT> ; public static final byte OPC_fload_1 = <NUM_LIT> ; public static final byte OPC_fload_2 = <NUM_LIT> ; public static final byte OPC_fload_3 = <NUM_LIT> ; public static final byte OPC_dload_0 = <NUM_LIT> ; public static final byte OPC_dload_1 = <NUM_LIT> ; public static final byte OPC_dload_2 = <NUM_LIT> ; public static final byte OPC_dload_3 = <NUM_LIT> ; public static final byte OPC_aload_0 = <NUM_LIT> ; public static final byte OPC_aload_1 = <NUM_LIT> ; public static final byte OPC_aload_2 = <NUM_LIT> ; public static final byte OPC_aload_3 = <NUM_LIT> ; public static final byte OPC_iaload = <NUM_LIT> ; public static final byte OPC_laload = <NUM_LIT> ; public static final byte OPC_faload = <NUM_LIT> ; public static final byte OPC_daload = <NUM_LIT> ; public static final byte OPC_aaload = <NUM_LIT> ; public static final byte OPC_baload = <NUM_LIT> ; public static final byte OPC_caload = <NUM_LIT> ; public static final byte OPC_saload = <NUM_LIT> ; public static final byte OPC_istore = <NUM_LIT> ; public static final byte OPC_lstore = <NUM_LIT> ; public static final byte OPC_fstore = <NUM_LIT> ; public static final byte OPC_dstore = <NUM_LIT> ; public static final byte OPC_astore = <NUM_LIT> ; public static final byte OPC_istore_0 = <NUM_LIT> ; public static final byte OPC_istore_1 = <NUM_LIT> ; public static final byte OPC_istore_2 = <NUM_LIT> ; public static final byte OPC_istore_3 = <NUM_LIT> ; public static final byte OPC_lstore_0 = <NUM_LIT> ; public static final byte OPC_lstore_1 = <NUM_LIT> ; public static final byte OPC_lstore_2 = <NUM_LIT> ; public static final byte OPC_lstore_3 = <NUM_LIT> ; public static final byte OPC_fstore_0 = <NUM_LIT> ; public static final byte OPC_fstore_1 = <NUM_LIT> ; public static final byte OPC_fstore_2 = <NUM_LIT> ; public static final byte OPC_fstore_3 = <NUM_LIT> ; public static final byte OPC_dstore_0 = <NUM_LIT> ; public static final byte OPC_dstore_1 = <NUM_LIT> ; public static final byte OPC_dstore_2 = <NUM_LIT> ; public static final byte OPC_dstore_3 = <NUM_LIT> ; public static final byte OPC_astore_0 = <NUM_LIT> ; public static final byte OPC_astore_1 = <NUM_LIT> ; public static final byte OPC_astore_2 = <NUM_LIT> ; public static final byte OPC_astore_3 = <NUM_LIT> ; public static final byte OPC_iastore = <NUM_LIT> ; public static final byte OPC_lastore = <NUM_LIT> ; public static final byte OPC_fastore = <NUM_LIT> ; public static final byte OPC_dastore = <NUM_LIT> ; public static final byte OPC_aastore = <NUM_LIT> ; public static final byte OPC_bastore = <NUM_LIT> ; public static final byte OPC_castore = <NUM_LIT> ; public static final byte OPC_sastore = <NUM_LIT> ; public static final byte OPC_pop = <NUM_LIT> ; public static final byte OPC_pop2 = <NUM_LIT> ; public static final byte OPC_dup = <NUM_LIT> ; public static final byte OPC_dup_x1 = <NUM_LIT> ; public static final byte OPC_dup_x2 = <NUM_LIT> ; public static final byte OPC_dup2 = <NUM_LIT> ; public static final byte OPC_dup2_x1 = <NUM_LIT> ; public static final byte OPC_dup2_x2 = <NUM_LIT> ; public static final byte OPC_swap = <NUM_LIT> ; public static final byte OPC_iadd = <NUM_LIT> ; public static final byte OPC_ladd = <NUM_LIT> ; public static final byte OPC_fadd = <NUM_LIT> ; public static final byte OPC_dadd = <NUM_LIT> ; public static final byte OPC_isub = <NUM_LIT:100> ; public static final byte OPC_lsub = <NUM_LIT> ; public static final byte OPC_fsub = <NUM_LIT> ; public static final byte OPC_dsub = <NUM_LIT> ; public static final byte OPC_imul = <NUM_LIT> ; public static final byte OPC_lmul = <NUM_LIT> ; public static final byte OPC_fmul = <NUM_LIT> ; public static final byte OPC_dmul = <NUM_LIT> ; public static final byte OPC_idiv = <NUM_LIT> ; public static final byte OPC_ldiv = <NUM_LIT> ; public static final byte OPC_fdiv = <NUM_LIT> ; public static final byte OPC_ddiv = <NUM_LIT> ; public static final byte OPC_irem = <NUM_LIT> ; public static final byte OPC_lrem = <NUM_LIT> ; public static final byte OPC_frem = <NUM_LIT> ; public static final byte OPC_drem = <NUM_LIT> ; public static final byte OPC_ineg = <NUM_LIT> ; public static final byte OPC_lneg = <NUM_LIT> ; public static final byte OPC_fneg = <NUM_LIT> ; public static final byte OPC_dneg = <NUM_LIT> ; public static final byte OPC_ishl = <NUM_LIT> ; public static final byte OPC_lshl = <NUM_LIT> ; public static final byte OPC_ishr = <NUM_LIT> ; public static final byte OPC_lshr = <NUM_LIT> ; public static final byte OPC_iushr = <NUM_LIT> ; public static final byte OPC_lushr = <NUM_LIT> ; public static final byte OPC_iand = <NUM_LIT> ; public static final byte OPC_land = <NUM_LIT> ; public static final byte OPC_ior = ( byte ) <NUM_LIT> ; public static final byte OPC_lor = ( byte ) <NUM_LIT> ; public static final byte OPC_ixor = ( byte ) <NUM_LIT> ; public static final byte OPC_lxor = ( byte ) <NUM_LIT> ; public static final byte OPC_iinc = ( byte ) <NUM_LIT> ; public static final byte OPC_i2l = ( byte ) <NUM_LIT> ; public static final byte OPC_i2f = ( byte ) <NUM_LIT> ; public static final byte OPC_i2d = ( byte ) <NUM_LIT> ; public static final byte OPC_l2i = ( byte ) <NUM_LIT> ; public static final byte OPC_l2f = ( byte ) <NUM_LIT> ; public static final byte OPC_l2d = ( byte ) <NUM_LIT> ; public static final byte OPC_f2i = ( byte ) <NUM_LIT> ; public static final byte OPC_f2l = ( byte ) <NUM_LIT> ; public static final byte OPC_f2d = ( byte ) <NUM_LIT> ; public static final byte OPC_d2i = ( byte ) <NUM_LIT> ; public static final byte OPC_d2l = ( byte ) <NUM_LIT> ; public static final byte OPC_d2f = ( byte ) <NUM_LIT> ; public static final byte OPC_i2b = ( byte ) <NUM_LIT> ; public static final byte OPC_i2c = ( byte ) <NUM_LIT> ; public static final byte OPC_i2s = ( byte ) <NUM_LIT> ; public static final byte OPC_lcmp = ( byte ) <NUM_LIT> ; public static final byte OPC_fcmpl = ( byte ) <NUM_LIT> ; public static final byte OPC_fcmpg = ( byte ) <NUM_LIT> ; public static final byte OPC_dcmpl = ( byte ) <NUM_LIT> ; public static final byte OPC_dcmpg = ( byte ) <NUM_LIT> ; public static final byte OPC_ifeq = ( byte ) <NUM_LIT> ; public static final byte OPC_ifne = ( byte ) <NUM_LIT> ; public static final byte OPC_iflt = ( byte ) <NUM_LIT> ; public static final byte OPC_ifge = ( byte ) <NUM_LIT> ; public static final byte OPC_ifgt = ( byte ) <NUM_LIT> ; public static final byte OPC_ifle = ( byte ) <NUM_LIT> ; public static final byte OPC_if_icmpeq = ( byte ) <NUM_LIT> ; public static final byte OPC_if_icmpne = ( byte ) <NUM_LIT> ; public static final byte OPC_if_icmplt = ( byte ) <NUM_LIT> ; public static final byte OPC_if_icmpge = ( byte ) <NUM_LIT> ; public static final byte OPC_if_icmpgt = ( byte ) <NUM_LIT> ; public static final byte OPC_if_icmple = ( byte ) <NUM_LIT> ; public static final byte OPC_if_acmpeq = ( byte ) <NUM_LIT> ; public static final byte OPC_if_acmpne = ( byte ) <NUM_LIT> ; public static final byte OPC_goto = ( byte ) <NUM_LIT> ; public static final byte OPC_jsr = ( byte ) <NUM_LIT> ; public static final byte OPC_ret = ( byte ) <NUM_LIT> ; public static final byte OPC_tableswitch = ( byte ) <NUM_LIT> ; public static final byte OPC_lookupswitch = ( byte ) <NUM_LIT> ; public static final byte OPC_ireturn = ( byte ) <NUM_LIT> ; public static final byte OPC_lreturn = ( byte ) <NUM_LIT> ; public static final byte OPC_freturn = ( byte ) <NUM_LIT> ; public static final byte OPC_dreturn = ( byte ) <NUM_LIT> ; public static final byte OPC_areturn = ( byte ) <NUM_LIT> ; public static final byte OPC_return = ( byte ) <NUM_LIT> ; public static final byte OPC_getstatic = ( byte ) <NUM_LIT> ; public static final byte OPC_putstatic = ( byte ) <NUM_LIT> ; public static final byte OPC_getfield = ( byte ) <NUM_LIT> ; public static final byte OPC_putfield = ( byte ) <NUM_LIT> ; public static final byte OPC_invokevirtual = ( byte ) <NUM_LIT> ; public static final byte OPC_invokespecial = ( byte ) <NUM_LIT> ; public static final byte OPC_invokestatic = ( byte ) <NUM_LIT> ; public static final byte OPC_invokeinterface = ( byte ) <NUM_LIT> ; public static final byte OPC_new = ( byte ) <NUM_LIT> ; public static final byte OPC_newarray = ( byte ) <NUM_LIT> ; public static final byte OPC_anewarray = ( byte ) <NUM_LIT> ; public static final byte OPC_arraylength = ( byte ) <NUM_LIT> ; public static final byte OPC_athrow = ( byte ) <NUM_LIT> ; public static final byte OPC_checkcast = ( byte ) <NUM_LIT> ; public static final byte OPC_instanceof = ( byte ) <NUM_LIT> ; public static final byte OPC_monitorenter = ( byte ) <NUM_LIT> ; public static final byte OPC_monitorexit = ( byte ) <NUM_LIT> ; public static final byte OPC_wide = ( byte ) <NUM_LIT> ; public static final byte OPC_multianewarray = ( byte ) <NUM_LIT> ; public static final byte OPC_ifnull = ( byte ) <NUM_LIT> ; public static final byte OPC_ifnonnull = ( byte ) <NUM_LIT> ; public static final byte OPC_goto_w = ( byte ) <NUM_LIT> ; public static final byte OPC_jsr_w = ( byte ) <NUM_LIT> ; } </s>
<s> package org . eclipse . jdt . internal . compiler . codegen ; import org . eclipse . jdt . core . compiler . CharOperation ; import org . eclipse . jdt . internal . compiler . lookup . TypeBinding ; public class ExceptionLabel extends Label { public int ranges [ ] = { POS_NOT_SET , POS_NOT_SET } ; private int count = <NUM_LIT:0> ; public TypeBinding exceptionType ; public ExceptionLabel ( CodeStream codeStream , TypeBinding exceptionType ) { super ( codeStream ) ; this . exceptionType = exceptionType ; } public int getCount ( ) { return this . count ; } public void place ( ) { this . codeStream . registerExceptionHandler ( this ) ; this . position = this . codeStream . getPosition ( ) ; } public void placeEnd ( ) { int endPosition = this . codeStream . position ; if ( this . ranges [ this . count - <NUM_LIT:1> ] == endPosition ) { this . count -- ; } else { this . ranges [ this . count ++ ] = endPosition ; } } public void placeStart ( ) { int startPosition = this . codeStream . position ; if ( this . count > <NUM_LIT:0> && this . ranges [ this . count - <NUM_LIT:1> ] == startPosition ) { this . count -- ; return ; } int length ; if ( this . count == ( length = this . ranges . length ) ) { System . arraycopy ( this . ranges , <NUM_LIT:0> , this . ranges = new int [ length * <NUM_LIT:2> ] , <NUM_LIT:0> , length ) ; } this . ranges [ this . count ++ ] = startPosition ; } public String toString ( ) { String basic = getClass ( ) . getName ( ) ; basic = basic . substring ( basic . lastIndexOf ( '<CHAR_LIT:.>' ) + <NUM_LIT:1> ) ; StringBuffer buffer = new StringBuffer ( basic ) ; buffer . append ( '<CHAR_LIT>' ) . append ( Integer . toHexString ( hashCode ( ) ) ) ; buffer . append ( "<STR_LIT>" ) . append ( this . exceptionType == null ? CharOperation . NO_CHAR : this . exceptionType . readableName ( ) ) ; buffer . append ( "<STR_LIT>" ) . append ( this . position ) ; buffer . append ( "<STR_LIT>" ) ; if ( this . count == <NUM_LIT:0> ) { buffer . append ( "<STR_LIT:[]>" ) ; } else { for ( int i = <NUM_LIT:0> ; i < this . count ; i ++ ) { if ( ( i & <NUM_LIT:1> ) == <NUM_LIT:0> ) { buffer . append ( "<STR_LIT:[>" ) . append ( this . ranges [ i ] ) ; } else { buffer . append ( "<STR_LIT:U+002C>" ) . append ( this . ranges [ i ] ) . append ( "<STR_LIT:]>" ) ; } } if ( ( this . count & <NUM_LIT:1> ) == <NUM_LIT:1> ) { buffer . append ( "<STR_LIT>" ) ; } } buffer . append ( '<CHAR_LIT:)>' ) ; return buffer . toString ( ) ; } } </s>
<s> package org . eclipse . jdt . core . compiler ; import org . eclipse . jdt . core . compiler . batch . BatchCompiler ; public abstract class CompilationProgress { public abstract void begin ( int remainingWork ) ; public abstract void done ( ) ; public abstract boolean isCanceled ( ) ; public abstract void setTaskName ( String name ) ; public abstract void worked ( int workIncrement , int remainingWork ) ; } </s>
<s> package org . eclipse . jdt . core . compiler ; import org . eclipse . jdt . internal . compiler . problem . DefaultProblem ; public abstract class CategorizedProblem implements IProblem { public static final int CAT_UNSPECIFIED = <NUM_LIT:0> ; public static final int CAT_BUILDPATH = <NUM_LIT:10> ; public static final int CAT_SYNTAX = <NUM_LIT:20> ; public static final int CAT_IMPORT = <NUM_LIT:30> ; public static final int CAT_TYPE = <NUM_LIT> ; public static final int CAT_MEMBER = <NUM_LIT> ; public static final int CAT_INTERNAL = <NUM_LIT> ; public static final int CAT_JAVADOC = <NUM_LIT> ; public static final int CAT_CODE_STYLE = <NUM_LIT> ; public static final int CAT_POTENTIAL_PROGRAMMING_PROBLEM = <NUM_LIT> ; public static final int CAT_NAME_SHADOWING_CONFLICT = <NUM_LIT:100> ; public static final int CAT_DEPRECATION = <NUM_LIT> ; public static final int CAT_UNNECESSARY_CODE = <NUM_LIT> ; public static final int CAT_UNCHECKED_RAW = <NUM_LIT> ; public static final int CAT_NLS = <NUM_LIT> ; public static final int CAT_RESTRICTION = <NUM_LIT> ; public abstract int getCategoryID ( ) ; public abstract String getMarkerType ( ) ; public String [ ] getExtraMarkerAttributeNames ( ) { return CharOperation . NO_STRINGS ; } public Object [ ] getExtraMarkerAttributeValues ( ) { return DefaultProblem . EMPTY_VALUES ; } } </s>
<s> package org . eclipse . jdt . core . compiler ; import org . eclipse . jdt . internal . compiler . lookup . ProblemReasons ; public interface IProblem { String [ ] getArguments ( ) ; int getID ( ) ; String getMessage ( ) ; char [ ] getOriginatingFileName ( ) ; int getSourceEnd ( ) ; int getSourceLineNumber ( ) ; int getSourceStart ( ) ; boolean isError ( ) ; boolean isWarning ( ) ; void setSourceEnd ( int sourceEnd ) ; void setSourceLineNumber ( int lineNumber ) ; void setSourceStart ( int sourceStart ) ; int TypeRelated = <NUM_LIT> ; int FieldRelated = <NUM_LIT> ; int MethodRelated = <NUM_LIT> ; int ConstructorRelated = <NUM_LIT> ; int ImportRelated = <NUM_LIT> ; int Internal = <NUM_LIT> ; int Syntax = <NUM_LIT> ; int Javadoc = <NUM_LIT> ; int IgnoreCategoriesMask = <NUM_LIT> ; int Unclassified = <NUM_LIT:0> ; int ObjectHasNoSuperclass = TypeRelated + <NUM_LIT:1> ; int UndefinedType = TypeRelated + <NUM_LIT:2> ; int NotVisibleType = TypeRelated + <NUM_LIT:3> ; int AmbiguousType = TypeRelated + <NUM_LIT:4> ; int UsingDeprecatedType = TypeRelated + <NUM_LIT:5> ; int InternalTypeNameProvided = TypeRelated + <NUM_LIT:6> ; int UnusedPrivateType = Internal + TypeRelated + <NUM_LIT:7> ; int IncompatibleTypesInEqualityOperator = TypeRelated + <NUM_LIT:15> ; int IncompatibleTypesInConditionalOperator = TypeRelated + <NUM_LIT:16> ; int TypeMismatch = TypeRelated + <NUM_LIT> ; int IndirectAccessToStaticType = Internal + TypeRelated + <NUM_LIT> ; int MissingEnclosingInstanceForConstructorCall = TypeRelated + <NUM_LIT:20> ; int MissingEnclosingInstance = TypeRelated + <NUM_LIT> ; int IncorrectEnclosingInstanceReference = TypeRelated + <NUM_LIT> ; int IllegalEnclosingInstanceSpecification = TypeRelated + <NUM_LIT> ; int CannotDefineStaticInitializerInLocalType = Internal + <NUM_LIT:24> ; int OuterLocalMustBeFinal = Internal + <NUM_LIT> ; int CannotDefineInterfaceInLocalType = Internal + <NUM_LIT> ; int IllegalPrimitiveOrArrayTypeForEnclosingInstance = TypeRelated + <NUM_LIT> ; int EnclosingInstanceInConstructorCall = Internal + <NUM_LIT> ; int AnonymousClassCannotExtendFinalClass = TypeRelated + <NUM_LIT> ; int CannotDefineAnnotationInLocalType = Internal + <NUM_LIT:30> ; int CannotDefineEnumInLocalType = Internal + <NUM_LIT:31> ; int NonStaticContextForEnumMemberType = Internal + <NUM_LIT:32> ; int TypeHidingType = TypeRelated + <NUM_LIT> ; int UndefinedName = Internal + FieldRelated + <NUM_LIT> ; int UninitializedLocalVariable = Internal + <NUM_LIT> ; int VariableTypeCannotBeVoid = Internal + <NUM_LIT> ; int VariableTypeCannotBeVoidArray = Internal + <NUM_LIT> ; int CannotAllocateVoidArray = Internal + <NUM_LIT> ; int RedefinedLocal = Internal + <NUM_LIT> ; int RedefinedArgument = Internal + <NUM_LIT> ; int DuplicateFinalLocalInitialization = Internal + <NUM_LIT> ; int NonBlankFinalLocalAssignment = Internal + <NUM_LIT> ; int ParameterAssignment = Internal + <NUM_LIT> ; int FinalOuterLocalAssignment = Internal + <NUM_LIT> ; int LocalVariableIsNeverUsed = Internal + <NUM_LIT> ; int ArgumentIsNeverUsed = Internal + <NUM_LIT> ; int BytecodeExceeds64KLimit = Internal + <NUM_LIT> ; int BytecodeExceeds64KLimitForClinit = Internal + <NUM_LIT> ; int TooManyArgumentSlots = Internal + <NUM_LIT> ; int TooManyLocalVariableSlots = Internal + <NUM_LIT> ; int TooManySyntheticArgumentSlots = Internal + <NUM_LIT> ; int TooManyArrayDimensions = Internal + <NUM_LIT> ; int BytecodeExceeds64KLimitForConstructor = Internal + <NUM_LIT> ; int UndefinedField = FieldRelated + <NUM_LIT> ; int NotVisibleField = FieldRelated + <NUM_LIT> ; int AmbiguousField = FieldRelated + <NUM_LIT> ; int UsingDeprecatedField = FieldRelated + <NUM_LIT> ; int NonStaticFieldFromStaticInvocation = FieldRelated + <NUM_LIT> ; int ReferenceToForwardField = FieldRelated + Internal + <NUM_LIT> ; int NonStaticAccessToStaticField = Internal + FieldRelated + <NUM_LIT> ; int UnusedPrivateField = Internal + FieldRelated + <NUM_LIT> ; int IndirectAccessToStaticField = Internal + FieldRelated + <NUM_LIT> ; int UnqualifiedFieldAccess = Internal + FieldRelated + <NUM_LIT> ; int FinalFieldAssignment = FieldRelated + <NUM_LIT> ; int UninitializedBlankFinalField = FieldRelated + <NUM_LIT> ; int DuplicateBlankFinalFieldInitialization = FieldRelated + <NUM_LIT> ; int UnresolvedVariable = FieldRelated + <NUM_LIT> ; int LocalVariableHidingLocalVariable = Internal + <NUM_LIT> ; int LocalVariableHidingField = Internal + FieldRelated + <NUM_LIT> ; int FieldHidingLocalVariable = Internal + FieldRelated + <NUM_LIT> ; int FieldHidingField = Internal + FieldRelated + <NUM_LIT> ; int ArgumentHidingLocalVariable = Internal + <NUM_LIT> ; int ArgumentHidingField = Internal + <NUM_LIT> ; int MissingSerialVersion = Internal + <NUM_LIT> ; int UndefinedMethod = MethodRelated + <NUM_LIT:100> ; int NotVisibleMethod = MethodRelated + <NUM_LIT> ; int AmbiguousMethod = MethodRelated + <NUM_LIT> ; int UsingDeprecatedMethod = MethodRelated + <NUM_LIT> ; int DirectInvocationOfAbstractMethod = MethodRelated + <NUM_LIT> ; int VoidMethodReturnsValue = MethodRelated + <NUM_LIT> ; int MethodReturnsVoid = MethodRelated + <NUM_LIT> ; int MethodRequiresBody = Internal + MethodRelated + <NUM_LIT> ; int ShouldReturnValue = Internal + MethodRelated + <NUM_LIT> ; int MethodButWithConstructorName = MethodRelated + <NUM_LIT> ; int MissingReturnType = TypeRelated + <NUM_LIT> ; int BodyForNativeMethod = Internal + MethodRelated + <NUM_LIT> ; int BodyForAbstractMethod = Internal + MethodRelated + <NUM_LIT> ; int NoMessageSendOnBaseType = MethodRelated + <NUM_LIT> ; int ParameterMismatch = MethodRelated + <NUM_LIT> ; int NoMessageSendOnArrayType = MethodRelated + <NUM_LIT> ; int NonStaticAccessToStaticMethod = Internal + MethodRelated + <NUM_LIT> ; int UnusedPrivateMethod = Internal + MethodRelated + <NUM_LIT> ; int IndirectAccessToStaticMethod = Internal + MethodRelated + <NUM_LIT> ; int MissingTypeInMethod = MethodRelated + <NUM_LIT> ; int MethodCanBeStatic = Internal + MethodRelated + <NUM_LIT> ; int MethodCanBePotentiallyStatic = Internal + MethodRelated + <NUM_LIT> ; int MissingTypeInConstructor = ConstructorRelated + <NUM_LIT> ; int UndefinedConstructor = ConstructorRelated + <NUM_LIT> ; int NotVisibleConstructor = ConstructorRelated + <NUM_LIT> ; int AmbiguousConstructor = ConstructorRelated + <NUM_LIT> ; int UsingDeprecatedConstructor = ConstructorRelated + <NUM_LIT> ; int UnusedPrivateConstructor = Internal + MethodRelated + <NUM_LIT> ; int InstanceFieldDuringConstructorInvocation = ConstructorRelated + <NUM_LIT> ; int InstanceMethodDuringConstructorInvocation = ConstructorRelated + <NUM_LIT> ; int RecursiveConstructorInvocation = ConstructorRelated + <NUM_LIT> ; int ThisSuperDuringConstructorInvocation = ConstructorRelated + <NUM_LIT> ; int InvalidExplicitConstructorCall = ConstructorRelated + Syntax + <NUM_LIT> ; int UndefinedConstructorInDefaultConstructor = ConstructorRelated + <NUM_LIT> ; int NotVisibleConstructorInDefaultConstructor = ConstructorRelated + <NUM_LIT> ; int AmbiguousConstructorInDefaultConstructor = ConstructorRelated + <NUM_LIT> ; int UndefinedConstructorInImplicitConstructorCall = ConstructorRelated + <NUM_LIT> ; int NotVisibleConstructorInImplicitConstructorCall = ConstructorRelated + <NUM_LIT> ; int AmbiguousConstructorInImplicitConstructorCall = ConstructorRelated + <NUM_LIT> ; int UnhandledExceptionInDefaultConstructor = TypeRelated + <NUM_LIT> ; int UnhandledExceptionInImplicitConstructorCall = TypeRelated + <NUM_LIT> ; int UnusedObjectAllocation = Internal + <NUM_LIT> ; int DeadCode = Internal + <NUM_LIT> ; int ArrayReferenceRequired = Internal + <NUM_LIT> ; int NoImplicitStringConversionForCharArrayExpression = Internal + <NUM_LIT> ; int StringConstantIsExceedingUtf8Limit = Internal + <NUM_LIT> ; int NonConstantExpression = Internal + <NUM_LIT> ; int NumericValueOutOfRange = Internal + <NUM_LIT> ; int IllegalCast = TypeRelated + <NUM_LIT> ; int InvalidClassInstantiation = TypeRelated + <NUM_LIT> ; int CannotDefineDimensionExpressionsWithInit = Internal + <NUM_LIT> ; int MustDefineEitherDimensionExpressionsOrInitializer = Internal + <NUM_LIT> ; int InvalidOperator = Internal + <NUM_LIT> ; int CodeCannotBeReached = Internal + <NUM_LIT> ; int CannotReturnInInitializer = Internal + <NUM_LIT> ; int InitializerMustCompleteNormally = Internal + <NUM_LIT> ; int InvalidVoidExpression = Internal + <NUM_LIT> ; int MaskedCatch = TypeRelated + <NUM_LIT> ; int DuplicateDefaultCase = Internal + <NUM_LIT> ; int UnreachableCatch = TypeRelated + MethodRelated + <NUM_LIT> ; int UnhandledException = TypeRelated + <NUM_LIT> ; int IncorrectSwitchType = TypeRelated + <NUM_LIT> ; int DuplicateCase = FieldRelated + <NUM_LIT> ; int DuplicateLabel = Internal + <NUM_LIT> ; int InvalidBreak = Internal + <NUM_LIT> ; int InvalidContinue = Internal + <NUM_LIT> ; int UndefinedLabel = Internal + <NUM_LIT> ; int InvalidTypeToSynchronized = Internal + <NUM_LIT> ; int InvalidNullToSynchronized = Internal + <NUM_LIT> ; int CannotThrowNull = Internal + <NUM_LIT> ; int AssignmentHasNoEffect = Internal + <NUM_LIT> ; int PossibleAccidentalBooleanAssignment = Internal + <NUM_LIT> ; int SuperfluousSemicolon = Internal + <NUM_LIT> ; int UnnecessaryCast = Internal + TypeRelated + <NUM_LIT> ; int UnnecessaryArgumentCast = Internal + TypeRelated + <NUM_LIT> ; int UnnecessaryInstanceof = Internal + TypeRelated + <NUM_LIT> ; int FinallyMustCompleteNormally = Internal + <NUM_LIT> ; int UnusedMethodDeclaredThrownException = Internal + <NUM_LIT> ; int UnusedConstructorDeclaredThrownException = Internal + <NUM_LIT> ; int InvalidCatchBlockSequence = Internal + TypeRelated + <NUM_LIT> ; int EmptyControlFlowStatement = Internal + TypeRelated + <NUM_LIT> ; int UnnecessaryElse = Internal + <NUM_LIT> ; int NeedToEmulateFieldReadAccess = FieldRelated + <NUM_LIT> ; int NeedToEmulateFieldWriteAccess = FieldRelated + <NUM_LIT> ; int NeedToEmulateMethodAccess = MethodRelated + <NUM_LIT> ; int NeedToEmulateConstructorAccess = MethodRelated + <NUM_LIT> ; int FallthroughCase = Internal + <NUM_LIT> ; int InheritedMethodHidesEnclosingName = MethodRelated + <NUM_LIT> ; int InheritedFieldHidesEnclosingName = FieldRelated + <NUM_LIT> ; int InheritedTypeHidesEnclosingName = TypeRelated + <NUM_LIT> ; int IllegalUsageOfQualifiedTypeReference = Internal + Syntax + <NUM_LIT> ; int UnusedLabel = Internal + <NUM_LIT> ; int ThisInStaticContext = Internal + <NUM_LIT> ; int StaticMethodRequested = Internal + MethodRelated + <NUM_LIT> ; int IllegalDimension = Internal + <NUM_LIT> ; int InvalidTypeExpression = Internal + <NUM_LIT> ; int ParsingError = Syntax + Internal + <NUM_LIT> ; int ParsingErrorNoSuggestion = Syntax + Internal + <NUM_LIT> ; int InvalidUnaryExpression = Syntax + Internal + <NUM_LIT> ; int InterfaceCannotHaveConstructors = Syntax + Internal + <NUM_LIT> ; int ArrayConstantsOnlyInArrayInitializers = Syntax + Internal + <NUM_LIT> ; int ParsingErrorOnKeyword = Syntax + Internal + <NUM_LIT> ; int ParsingErrorOnKeywordNoSuggestion = Syntax + Internal + <NUM_LIT> ; int ComparingIdentical = Internal + <NUM_LIT> ; int UnmatchedBracket = Syntax + Internal + <NUM_LIT> ; int NoFieldOnBaseType = FieldRelated + <NUM_LIT> ; int InvalidExpressionAsStatement = Syntax + Internal + <NUM_LIT> ; int ExpressionShouldBeAVariable = Syntax + Internal + <NUM_LIT> ; int MissingSemiColon = Syntax + Internal + <NUM_LIT> ; int InvalidParenthesizedExpression = Syntax + Internal + <NUM_LIT> ; int ParsingErrorInsertTokenBefore = Syntax + Internal + <NUM_LIT> ; int ParsingErrorInsertTokenAfter = Syntax + Internal + <NUM_LIT> ; int ParsingErrorDeleteToken = Syntax + Internal + <NUM_LIT> ; int ParsingErrorDeleteTokens = Syntax + Internal + <NUM_LIT> ; int ParsingErrorMergeTokens = Syntax + Internal + <NUM_LIT> ; int ParsingErrorInvalidToken = Syntax + Internal + <NUM_LIT> ; int ParsingErrorMisplacedConstruct = Syntax + Internal + <NUM_LIT> ; int ParsingErrorReplaceTokens = Syntax + Internal + <NUM_LIT> ; int ParsingErrorNoSuggestionForTokens = Syntax + Internal + <NUM_LIT> ; int ParsingErrorUnexpectedEOF = Syntax + Internal + <NUM_LIT> ; int ParsingErrorInsertToComplete = Syntax + Internal + <NUM_LIT> ; int ParsingErrorInsertToCompleteScope = Syntax + Internal + <NUM_LIT> ; int ParsingErrorInsertToCompletePhrase = Syntax + Internal + <NUM_LIT> ; int EndOfSource = Syntax + Internal + <NUM_LIT> ; int InvalidHexa = Syntax + Internal + <NUM_LIT> ; int InvalidOctal = Syntax + Internal + <NUM_LIT> ; int InvalidCharacterConstant = Syntax + Internal + <NUM_LIT> ; int InvalidEscape = Syntax + Internal + <NUM_LIT> ; int InvalidInput = Syntax + Internal + <NUM_LIT:255> ; int InvalidUnicodeEscape = Syntax + Internal + <NUM_LIT> ; int InvalidFloat = Syntax + Internal + <NUM_LIT> ; int NullSourceString = Syntax + Internal + <NUM_LIT> ; int UnterminatedString = Syntax + Internal + <NUM_LIT> ; int UnterminatedComment = Syntax + Internal + <NUM_LIT> ; int NonExternalizedStringLiteral = Internal + <NUM_LIT> ; int InvalidDigit = Syntax + Internal + <NUM_LIT> ; int InvalidLowSurrogate = Syntax + Internal + <NUM_LIT> ; int InvalidHighSurrogate = Syntax + Internal + <NUM_LIT> ; int UnnecessaryNLSTag = Internal + <NUM_LIT> ; int InvalidBinary = Syntax + Internal + <NUM_LIT> ; int BinaryLiteralNotBelow17 = Syntax + Internal + <NUM_LIT> ; int IllegalUnderscorePosition = Syntax + Internal + <NUM_LIT> ; int UnderscoresInLiteralsNotBelow17 = Syntax + Internal + <NUM_LIT> ; int IllegalHexaLiteral = Syntax + Internal + <NUM_LIT> ; int DiscouragedReference = TypeRelated + <NUM_LIT> ; int InterfaceCannotHaveInitializers = TypeRelated + <NUM_LIT> ; int DuplicateModifierForType = TypeRelated + <NUM_LIT> ; int IllegalModifierForClass = TypeRelated + <NUM_LIT> ; int IllegalModifierForInterface = TypeRelated + <NUM_LIT> ; int IllegalModifierForMemberClass = TypeRelated + <NUM_LIT> ; int IllegalModifierForMemberInterface = TypeRelated + <NUM_LIT> ; int IllegalModifierForLocalClass = TypeRelated + <NUM_LIT> ; int ForbiddenReference = TypeRelated + <NUM_LIT> ; int IllegalModifierCombinationFinalAbstractForClass = TypeRelated + <NUM_LIT> ; int IllegalVisibilityModifierForInterfaceMemberType = TypeRelated + <NUM_LIT> ; int IllegalVisibilityModifierCombinationForMemberType = TypeRelated + <NUM_LIT> ; int IllegalStaticModifierForMemberType = TypeRelated + <NUM_LIT> ; int SuperclassMustBeAClass = TypeRelated + <NUM_LIT> ; int ClassExtendFinalClass = TypeRelated + <NUM_LIT> ; int DuplicateSuperInterface = TypeRelated + <NUM_LIT> ; int SuperInterfaceMustBeAnInterface = TypeRelated + <NUM_LIT> ; int HierarchyCircularitySelfReference = TypeRelated + <NUM_LIT> ; int HierarchyCircularity = TypeRelated + <NUM_LIT> ; int HidingEnclosingType = TypeRelated + <NUM_LIT> ; int DuplicateNestedType = TypeRelated + <NUM_LIT> ; int CannotThrowType = TypeRelated + <NUM_LIT> ; int PackageCollidesWithType = TypeRelated + <NUM_LIT> ; int TypeCollidesWithPackage = TypeRelated + <NUM_LIT> ; int DuplicateTypes = TypeRelated + <NUM_LIT> ; int IsClassPathCorrect = TypeRelated + <NUM_LIT> ; int PublicClassMustMatchFileName = TypeRelated + <NUM_LIT> ; int MustSpecifyPackage = Internal + <NUM_LIT> ; int HierarchyHasProblems = TypeRelated + <NUM_LIT> ; int PackageIsNotExpectedPackage = Internal + <NUM_LIT> ; int ObjectCannotHaveSuperTypes = Internal + <NUM_LIT> ; int ObjectMustBeClass = Internal + <NUM_LIT> ; int RedundantSuperinterface = TypeRelated + <NUM_LIT> ; int ShouldImplementHashcode = TypeRelated + <NUM_LIT> ; int AbstractMethodsInConcreteClass = TypeRelated + <NUM_LIT> ; int SuperclassNotFound = TypeRelated + <NUM_LIT> + ProblemReasons . NotFound ; int SuperclassNotVisible = TypeRelated + <NUM_LIT> + ProblemReasons . NotVisible ; int SuperclassAmbiguous = TypeRelated + <NUM_LIT> + ProblemReasons . Ambiguous ; int SuperclassInternalNameProvided = TypeRelated + <NUM_LIT> + ProblemReasons . InternalNameProvided ; int SuperclassInheritedNameHidesEnclosingName = TypeRelated + <NUM_LIT> + ProblemReasons . InheritedNameHidesEnclosingName ; int InterfaceNotFound = TypeRelated + <NUM_LIT> + ProblemReasons . NotFound ; int InterfaceNotVisible = TypeRelated + <NUM_LIT> + ProblemReasons . NotVisible ; int InterfaceAmbiguous = TypeRelated + <NUM_LIT> + ProblemReasons . Ambiguous ; int InterfaceInternalNameProvided = TypeRelated + <NUM_LIT> + ProblemReasons . InternalNameProvided ; int InterfaceInheritedNameHidesEnclosingName = TypeRelated + <NUM_LIT> + ProblemReasons . InheritedNameHidesEnclosingName ; int DuplicateField = FieldRelated + <NUM_LIT> ; int DuplicateModifierForField = FieldRelated + <NUM_LIT> ; int IllegalModifierForField = FieldRelated + <NUM_LIT> ; int IllegalModifierForInterfaceField = FieldRelated + <NUM_LIT> ; int IllegalVisibilityModifierCombinationForField = FieldRelated + <NUM_LIT> ; int IllegalModifierCombinationFinalVolatileForField = FieldRelated + <NUM_LIT> ; int UnexpectedStaticModifierForField = FieldRelated + <NUM_LIT> ; int FieldTypeNotFound = FieldRelated + <NUM_LIT> + ProblemReasons . NotFound ; int FieldTypeNotVisible = FieldRelated + <NUM_LIT> + ProblemReasons . NotVisible ; int FieldTypeAmbiguous = FieldRelated + <NUM_LIT> + ProblemReasons . Ambiguous ; int FieldTypeInternalNameProvided = FieldRelated + <NUM_LIT> + ProblemReasons . InternalNameProvided ; int FieldTypeInheritedNameHidesEnclosingName = FieldRelated + <NUM_LIT> + ProblemReasons . InheritedNameHidesEnclosingName ; int DuplicateMethod = MethodRelated + <NUM_LIT> ; int IllegalModifierForArgument = MethodRelated + <NUM_LIT> ; int DuplicateModifierForMethod = MethodRelated + <NUM_LIT> ; int IllegalModifierForMethod = MethodRelated + <NUM_LIT> ; int IllegalModifierForInterfaceMethod = MethodRelated + <NUM_LIT> ; int IllegalVisibilityModifierCombinationForMethod = MethodRelated + <NUM_LIT> ; int UnexpectedStaticModifierForMethod = MethodRelated + <NUM_LIT> ; int IllegalAbstractModifierCombinationForMethod = MethodRelated + <NUM_LIT> ; int AbstractMethodInAbstractClass = MethodRelated + <NUM_LIT> ; int ArgumentTypeCannotBeVoid = MethodRelated + <NUM_LIT> ; int ArgumentTypeCannotBeVoidArray = MethodRelated + <NUM_LIT> ; int ReturnTypeCannotBeVoidArray = MethodRelated + <NUM_LIT> ; int NativeMethodsCannotBeStrictfp = MethodRelated + <NUM_LIT> ; int DuplicateModifierForArgument = MethodRelated + <NUM_LIT> ; int IllegalModifierForConstructor = MethodRelated + <NUM_LIT> ; int ArgumentTypeNotFound = MethodRelated + <NUM_LIT> + ProblemReasons . NotFound ; int ArgumentTypeNotVisible = MethodRelated + <NUM_LIT> + ProblemReasons . NotVisible ; int ArgumentTypeAmbiguous = MethodRelated + <NUM_LIT> + ProblemReasons . Ambiguous ; int ArgumentTypeInternalNameProvided = MethodRelated + <NUM_LIT> + ProblemReasons . InternalNameProvided ; int ArgumentTypeInheritedNameHidesEnclosingName = MethodRelated + <NUM_LIT> + ProblemReasons . InheritedNameHidesEnclosingName ; int ExceptionTypeNotFound = MethodRelated + <NUM_LIT> + ProblemReasons . NotFound ; int ExceptionTypeNotVisible = MethodRelated + <NUM_LIT> + ProblemReasons . NotVisible ; int ExceptionTypeAmbiguous = MethodRelated + <NUM_LIT> + ProblemReasons . Ambiguous ; int ExceptionTypeInternalNameProvided = MethodRelated + <NUM_LIT> + ProblemReasons . InternalNameProvided ; int ExceptionTypeInheritedNameHidesEnclosingName = MethodRelated + <NUM_LIT> + ProblemReasons . InheritedNameHidesEnclosingName ; int ReturnTypeNotFound = MethodRelated + <NUM_LIT> + ProblemReasons . NotFound ; int ReturnTypeNotVisible = MethodRelated + <NUM_LIT> + ProblemReasons . NotVisible ; int ReturnTypeAmbiguous = MethodRelated + <NUM_LIT> + ProblemReasons . Ambiguous ; int ReturnTypeInternalNameProvided = MethodRelated + <NUM_LIT> + ProblemReasons . InternalNameProvided ; int ReturnTypeInheritedNameHidesEnclosingName = MethodRelated + <NUM_LIT> + ProblemReasons . InheritedNameHidesEnclosingName ; int ConflictingImport = ImportRelated + <NUM_LIT> ; int DuplicateImport = ImportRelated + <NUM_LIT> ; int CannotImportPackage = ImportRelated + <NUM_LIT> ; int UnusedImport = ImportRelated + <NUM_LIT> ; int ImportNotFound = ImportRelated + <NUM_LIT> + ProblemReasons . NotFound ; int ImportNotVisible = ImportRelated + <NUM_LIT> + ProblemReasons . NotVisible ; int ImportAmbiguous = ImportRelated + <NUM_LIT> + ProblemReasons . Ambiguous ; int ImportInternalNameProvided = ImportRelated + <NUM_LIT> + ProblemReasons . InternalNameProvided ; int ImportInheritedNameHidesEnclosingName = ImportRelated + <NUM_LIT> + ProblemReasons . InheritedNameHidesEnclosingName ; int InvalidTypeForStaticImport = ImportRelated + <NUM_LIT> ; int DuplicateModifierForVariable = MethodRelated + <NUM_LIT> ; int IllegalModifierForVariable = MethodRelated + <NUM_LIT> ; int LocalVariableCannotBeNull = Internal + <NUM_LIT> ; int LocalVariableCanOnlyBeNull = Internal + <NUM_LIT> ; int LocalVariableMayBeNull = Internal + <NUM_LIT> ; int AbstractMethodMustBeImplemented = MethodRelated + <NUM_LIT> ; int FinalMethodCannotBeOverridden = MethodRelated + <NUM_LIT> ; int IncompatibleExceptionInThrowsClause = MethodRelated + <NUM_LIT> ; int IncompatibleExceptionInInheritedMethodThrowsClause = MethodRelated + <NUM_LIT> ; int IncompatibleReturnType = MethodRelated + <NUM_LIT> ; int InheritedMethodReducesVisibility = MethodRelated + <NUM_LIT> ; int CannotOverrideAStaticMethodWithAnInstanceMethod = MethodRelated + <NUM_LIT> ; int CannotHideAnInstanceMethodWithAStaticMethod = MethodRelated + <NUM_LIT> ; int StaticInheritedMethodConflicts = MethodRelated + <NUM_LIT> ; int MethodReducesVisibility = MethodRelated + <NUM_LIT> ; int OverridingNonVisibleMethod = MethodRelated + <NUM_LIT> ; int AbstractMethodCannotBeOverridden = MethodRelated + <NUM_LIT> ; int OverridingDeprecatedMethod = MethodRelated + <NUM_LIT> ; int IncompatibleReturnTypeForNonInheritedInterfaceMethod = MethodRelated + <NUM_LIT> ; int IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod = MethodRelated + <NUM_LIT> ; int IllegalVararg = MethodRelated + <NUM_LIT> ; int OverridingMethodWithoutSuperInvocation = MethodRelated + <NUM_LIT> ; int MissingSynchronizedModifierInInheritedMethod = MethodRelated + <NUM_LIT> ; int AbstractMethodMustBeImplementedOverConcreteMethod = MethodRelated + <NUM_LIT> ; int InheritedIncompatibleReturnType = MethodRelated + <NUM_LIT> ; int CodeSnippetMissingClass = Internal + <NUM_LIT> ; int CodeSnippetMissingMethod = Internal + <NUM_LIT> ; int CannotUseSuperInCodeSnippet = Internal + <NUM_LIT> ; int TooManyConstantsInConstantPool = Internal + <NUM_LIT> ; int TooManyBytesForStringConstant = Internal + <NUM_LIT> ; int TooManyFields = Internal + <NUM_LIT> ; int TooManyMethods = Internal + <NUM_LIT> ; int TooManyParametersForSyntheticMethod = Internal + <NUM_LIT> ; int UseAssertAsAnIdentifier = Internal + <NUM_LIT> ; int UseEnumAsAnIdentifier = Internal + <NUM_LIT> ; int EnumConstantsCannotBeSurroundedByParenthesis = Syntax + Internal + <NUM_LIT> ; int Task = Internal + <NUM_LIT> ; int NullLocalVariableReference = Internal + <NUM_LIT> ; int PotentialNullLocalVariableReference = Internal + <NUM_LIT> ; int RedundantNullCheckOnNullLocalVariable = Internal + <NUM_LIT> ; int NullLocalVariableComparisonYieldsFalse = Internal + <NUM_LIT> ; int RedundantLocalVariableNullAssignment = Internal + <NUM_LIT> ; int NullLocalVariableInstanceofYieldsFalse = Internal + <NUM_LIT> ; int RedundantNullCheckOnNonNullLocalVariable = Internal + <NUM_LIT> ; int NonNullLocalVariableComparisonYieldsFalse = Internal + <NUM_LIT> ; int UndocumentedEmptyBlock = Internal + <NUM_LIT> ; int JavadocInvalidSeeUrlReference = Javadoc + Internal + <NUM_LIT> ; int JavadocMissingTagDescription = Javadoc + Internal + <NUM_LIT> ; int JavadocDuplicateTag = Javadoc + Internal + <NUM_LIT> ; int JavadocHiddenReference = Javadoc + Internal + <NUM_LIT> ; int JavadocInvalidMemberTypeQualification = Javadoc + Internal + <NUM_LIT> ; int JavadocMissingIdentifier = Javadoc + Internal + <NUM_LIT> ; int JavadocNonStaticTypeFromStaticInvocation = Javadoc + Internal + <NUM_LIT> ; int JavadocInvalidParamTagTypeParameter = Javadoc + Internal + <NUM_LIT> ; int JavadocUnexpectedTag = Javadoc + Internal + <NUM_LIT> ; int JavadocMissingParamTag = Javadoc + Internal + <NUM_LIT> ; int JavadocMissingParamName = Javadoc + Internal + <NUM_LIT> ; int JavadocDuplicateParamName = Javadoc + Internal + <NUM_LIT> ; int JavadocInvalidParamName = Javadoc + Internal + <NUM_LIT> ; int JavadocMissingReturnTag = Javadoc + Internal + <NUM_LIT> ; int JavadocDuplicateReturnTag = Javadoc + Internal + <NUM_LIT> ; int JavadocMissingThrowsTag = Javadoc + Internal + <NUM_LIT> ; int JavadocMissingThrowsClassName = Javadoc + Internal + <NUM_LIT> ; int JavadocInvalidThrowsClass = Javadoc + Internal + <NUM_LIT> ; int JavadocDuplicateThrowsClassName = Javadoc + Internal + <NUM_LIT> ; int JavadocInvalidThrowsClassName = Javadoc + Internal + <NUM_LIT> ; int JavadocMissingSeeReference = Javadoc + Internal + <NUM_LIT> ; int JavadocInvalidSeeReference = Javadoc + Internal + <NUM_LIT> ; int JavadocInvalidSeeHref = Javadoc + Internal + <NUM_LIT> ; int JavadocInvalidSeeArgs = Javadoc + Internal + <NUM_LIT> ; int JavadocMissing = Javadoc + Internal + <NUM_LIT> ; int JavadocInvalidTag = Javadoc + Internal + <NUM_LIT> ; int JavadocUndefinedField = Javadoc + Internal + <NUM_LIT> ; int JavadocNotVisibleField = Javadoc + Internal + <NUM_LIT> ; int JavadocAmbiguousField = Javadoc + Internal + <NUM_LIT> ; int JavadocUsingDeprecatedField = Javadoc + Internal + <NUM_LIT> ; int JavadocUndefinedConstructor = Javadoc + Internal + <NUM_LIT> ; int JavadocNotVisibleConstructor = Javadoc + Internal + <NUM_LIT> ; int JavadocAmbiguousConstructor = Javadoc + Internal + <NUM_LIT> ; int JavadocUsingDeprecatedConstructor = Javadoc + Internal + <NUM_LIT> ; int JavadocUndefinedMethod = Javadoc + Internal + <NUM_LIT> ; int JavadocNotVisibleMethod = Javadoc + Internal + <NUM_LIT> ; int JavadocAmbiguousMethod = Javadoc + Internal + <NUM_LIT> ; int JavadocUsingDeprecatedMethod = Javadoc + Internal + <NUM_LIT> ; int JavadocNoMessageSendOnBaseType = Javadoc + Internal + <NUM_LIT> ; int JavadocParameterMismatch = Javadoc + Internal + <NUM_LIT> ; int JavadocNoMessageSendOnArrayType = Javadoc + Internal + <NUM_LIT> ; int JavadocUndefinedType = Javadoc + Internal + <NUM_LIT> ; int JavadocNotVisibleType = Javadoc + Internal + <NUM_LIT> ; int JavadocAmbiguousType = Javadoc + Internal + <NUM_LIT> ; int JavadocUsingDeprecatedType = Javadoc + Internal + <NUM_LIT> ; int JavadocInternalTypeNameProvided = Javadoc + Internal + <NUM_LIT> ; int JavadocInheritedMethodHidesEnclosingName = Javadoc + Internal + <NUM_LIT> ; int JavadocInheritedFieldHidesEnclosingName = Javadoc + Internal + <NUM_LIT> ; int JavadocInheritedNameHidesEnclosingTypeName = Javadoc + Internal + <NUM_LIT> ; int JavadocAmbiguousMethodReference = Javadoc + Internal + <NUM_LIT> ; int JavadocUnterminatedInlineTag = Javadoc + Internal + <NUM_LIT> ; int JavadocMalformedSeeReference = Javadoc + Internal + <NUM_LIT> ; int JavadocMessagePrefix = Internal + <NUM_LIT> ; int JavadocMissingHashCharacter = Javadoc + Internal + <NUM_LIT> ; int JavadocEmptyReturnTag = Javadoc + Internal + <NUM_LIT> ; int JavadocInvalidValueReference = Javadoc + Internal + <NUM_LIT> ; int JavadocUnexpectedText = Javadoc + Internal + <NUM_LIT> ; int JavadocInvalidParamTagName = Javadoc + Internal + <NUM_LIT> ; int DuplicateTypeVariable = Internal + <NUM_LIT> ; int IllegalTypeVariableSuperReference = Internal + <NUM_LIT> ; int NonStaticTypeFromStaticInvocation = Internal + <NUM_LIT> ; int ObjectCannotBeGeneric = Internal + <NUM_LIT> ; int NonGenericType = TypeRelated + <NUM_LIT> ; int IncorrectArityForParameterizedType = TypeRelated + <NUM_LIT> ; int TypeArgumentMismatch = TypeRelated + <NUM_LIT> ; int DuplicateMethodErasure = TypeRelated + <NUM_LIT> ; int ReferenceToForwardTypeVariable = TypeRelated + <NUM_LIT> ; int BoundMustBeAnInterface = TypeRelated + <NUM_LIT> ; int UnsafeRawConstructorInvocation = TypeRelated + <NUM_LIT> ; int UnsafeRawMethodInvocation = TypeRelated + <NUM_LIT> ; int UnsafeTypeConversion = TypeRelated + <NUM_LIT> ; int InvalidTypeVariableExceptionType = TypeRelated + <NUM_LIT> ; int InvalidParameterizedExceptionType = TypeRelated + <NUM_LIT> ; int IllegalGenericArray = TypeRelated + <NUM_LIT> ; int UnsafeRawFieldAssignment = TypeRelated + <NUM_LIT> ; int FinalBoundForTypeVariable = TypeRelated + <NUM_LIT> ; int UndefinedTypeVariable = Internal + <NUM_LIT> ; int SuperInterfacesCollide = TypeRelated + <NUM_LIT> ; int WildcardConstructorInvocation = TypeRelated + <NUM_LIT> ; int WildcardMethodInvocation = TypeRelated + <NUM_LIT> ; int WildcardFieldAssignment = TypeRelated + <NUM_LIT> ; int GenericMethodTypeArgumentMismatch = TypeRelated + <NUM_LIT> ; int GenericConstructorTypeArgumentMismatch = TypeRelated + <NUM_LIT> ; int UnsafeGenericCast = TypeRelated + <NUM_LIT> ; int IllegalInstanceofParameterizedType = Internal + <NUM_LIT> ; int IllegalInstanceofTypeParameter = Internal + <NUM_LIT> ; int NonGenericMethod = TypeRelated + <NUM_LIT> ; int IncorrectArityForParameterizedMethod = TypeRelated + <NUM_LIT> ; int ParameterizedMethodArgumentTypeMismatch = TypeRelated + <NUM_LIT> ; int NonGenericConstructor = TypeRelated + <NUM_LIT> ; int IncorrectArityForParameterizedConstructor = TypeRelated + <NUM_LIT> ; int ParameterizedConstructorArgumentTypeMismatch = TypeRelated + <NUM_LIT> ; int TypeArgumentsForRawGenericMethod = TypeRelated + <NUM_LIT> ; int TypeArgumentsForRawGenericConstructor = TypeRelated + <NUM_LIT> ; int SuperTypeUsingWildcard = TypeRelated + <NUM_LIT> ; int GenericTypeCannotExtendThrowable = TypeRelated + <NUM_LIT> ; int IllegalClassLiteralForTypeVariable = TypeRelated + <NUM_LIT> ; int UnsafeReturnTypeOverride = MethodRelated + <NUM_LIT> ; int MethodNameClash = MethodRelated + <NUM_LIT> ; int RawMemberTypeCannotBeParameterized = TypeRelated + <NUM_LIT> ; int MissingArgumentsForParameterizedMemberType = TypeRelated + <NUM_LIT> ; int StaticMemberOfParameterizedType = TypeRelated + <NUM_LIT> ; int BoundHasConflictingArguments = TypeRelated + <NUM_LIT> ; int DuplicateParameterizedMethods = MethodRelated + <NUM_LIT> ; int IllegalQualifiedParameterizedTypeAllocation = TypeRelated + <NUM_LIT> ; int DuplicateBounds = TypeRelated + <NUM_LIT> ; int BoundCannotBeArray = TypeRelated + <NUM_LIT> ; int UnsafeRawGenericConstructorInvocation = TypeRelated + <NUM_LIT> ; int UnsafeRawGenericMethodInvocation = TypeRelated + <NUM_LIT> ; int TypeParameterHidingType = TypeRelated + <NUM_LIT> ; int RawTypeReference = TypeRelated + <NUM_LIT> ; int NoAdditionalBoundAfterTypeVariable = TypeRelated + <NUM_LIT> ; int UnsafeGenericArrayForVarargs = MethodRelated + <NUM_LIT> ; int IllegalAccessFromTypeVariable = TypeRelated + <NUM_LIT> ; int TypeHidingTypeParameterFromType = TypeRelated + <NUM_LIT> ; int TypeHidingTypeParameterFromMethod = TypeRelated + <NUM_LIT> ; int InvalidUsageOfWildcard = Syntax + Internal + <NUM_LIT> ; int UnusedTypeArgumentsForMethodInvocation = MethodRelated + <NUM_LIT> ; int IncompatibleTypesInForeach = TypeRelated + <NUM_LIT> ; int InvalidTypeForCollection = Internal + <NUM_LIT> ; int InvalidTypeForCollectionTarget14 = Internal + <NUM_LIT> ; int DuplicateInheritedMethods = MethodRelated + <NUM_LIT> ; int MethodNameClashHidden = MethodRelated + <NUM_LIT> ; int InvalidUsageOfTypeParameters = Syntax + Internal + <NUM_LIT> ; int InvalidUsageOfStaticImports = Syntax + Internal + <NUM_LIT> ; int InvalidUsageOfForeachStatements = Syntax + Internal + <NUM_LIT> ; int InvalidUsageOfTypeArguments = Syntax + Internal + <NUM_LIT> ; int InvalidUsageOfEnumDeclarations = Syntax + Internal + <NUM_LIT> ; int InvalidUsageOfVarargs = Syntax + Internal + <NUM_LIT> ; int InvalidUsageOfAnnotations = Syntax + Internal + <NUM_LIT> ; int InvalidUsageOfAnnotationDeclarations = Syntax + Internal + <NUM_LIT> ; int InvalidUsageOfTypeParametersForAnnotationDeclaration = Syntax + Internal + <NUM_LIT> ; int InvalidUsageOfTypeParametersForEnumDeclaration = Syntax + Internal + <NUM_LIT> ; int IllegalModifierForAnnotationMethod = MethodRelated + <NUM_LIT> ; int IllegalExtendedDimensions = MethodRelated + <NUM_LIT> ; int InvalidFileNameForPackageAnnotations = Syntax + Internal + <NUM_LIT> ; int IllegalModifierForAnnotationType = TypeRelated + <NUM_LIT> ; int IllegalModifierForAnnotationMemberType = TypeRelated + <NUM_LIT> ; int InvalidAnnotationMemberType = TypeRelated + <NUM_LIT> ; int AnnotationCircularitySelfReference = TypeRelated + <NUM_LIT> ; int AnnotationCircularity = TypeRelated + <NUM_LIT> ; int DuplicateAnnotation = TypeRelated + <NUM_LIT> ; int MissingValueForAnnotationMember = TypeRelated + <NUM_LIT> ; int DuplicateAnnotationMember = Internal + <NUM_LIT> ; int UndefinedAnnotationMember = MethodRelated + <NUM_LIT> ; int AnnotationValueMustBeClassLiteral = Internal + <NUM_LIT> ; int AnnotationValueMustBeConstant = Internal + <NUM_LIT> ; int AnnotationFieldNeedConstantInitialization = Internal + <NUM_LIT> ; int IllegalModifierForAnnotationField = Internal + <NUM_LIT> ; int AnnotationCannotOverrideMethod = MethodRelated + <NUM_LIT> ; int AnnotationMembersCannotHaveParameters = Syntax + Internal + <NUM_LIT> ; int AnnotationMembersCannotHaveTypeParameters = Syntax + Internal + <NUM_LIT> ; int AnnotationTypeDeclarationCannotHaveSuperclass = Syntax + Internal + <NUM_LIT> ; int AnnotationTypeDeclarationCannotHaveSuperinterfaces = Syntax + Internal + <NUM_LIT> ; int DuplicateTargetInTargetAnnotation = Internal + <NUM_LIT> ; int DisallowedTargetForAnnotation = TypeRelated + <NUM_LIT> ; int MethodMustOverride = MethodRelated + <NUM_LIT> ; int AnnotationTypeDeclarationCannotHaveConstructor = Syntax + Internal + <NUM_LIT> ; int AnnotationValueMustBeAnnotation = Internal + <NUM_LIT> ; int AnnotationTypeUsedAsSuperInterface = TypeRelated + <NUM_LIT> ; int MissingOverrideAnnotation = MethodRelated + <NUM_LIT> ; int FieldMissingDeprecatedAnnotation = Internal + <NUM_LIT> ; int MethodMissingDeprecatedAnnotation = Internal + <NUM_LIT> ; int TypeMissingDeprecatedAnnotation = Internal + <NUM_LIT> ; int UnhandledWarningToken = Internal + <NUM_LIT> ; int AnnotationValueMustBeArrayInitializer = Internal + <NUM_LIT> ; int AnnotationValueMustBeAnEnumConstant = Internal + <NUM_LIT> ; int MethodMustOverrideOrImplement = MethodRelated + <NUM_LIT> ; int UnusedWarningToken = Internal + <NUM_LIT> ; int MissingOverrideAnnotationForInterfaceMethodImplementation = MethodRelated + <NUM_LIT> ; int UnusedTypeArgumentsForConstructorInvocation = MethodRelated + <NUM_LIT> ; int CorruptedSignature = Internal + <NUM_LIT> ; int InvalidEncoding = Internal + <NUM_LIT> ; int CannotReadSource = Internal + <NUM_LIT> ; int BoxingConversion = Internal + <NUM_LIT> ; int UnboxingConversion = Internal + <NUM_LIT> ; int IllegalModifierForEnum = TypeRelated + <NUM_LIT> ; int IllegalModifierForEnumConstant = FieldRelated + <NUM_LIT> ; int IllegalModifierForLocalEnum = TypeRelated + <NUM_LIT> ; int IllegalModifierForMemberEnum = TypeRelated + <NUM_LIT> ; int CannotDeclareEnumSpecialMethod = MethodRelated + <NUM_LIT> ; int IllegalQualifiedEnumConstantLabel = FieldRelated + <NUM_LIT> ; int CannotExtendEnum = TypeRelated + <NUM_LIT> ; int CannotInvokeSuperConstructorInEnum = MethodRelated + <NUM_LIT> ; int EnumAbstractMethodMustBeImplemented = MethodRelated + <NUM_LIT> ; int EnumSwitchCannotTargetField = FieldRelated + <NUM_LIT> ; int IllegalModifierForEnumConstructor = MethodRelated + <NUM_LIT> ; int MissingEnumConstantCase = FieldRelated + <NUM_LIT> ; int EnumStaticFieldInInInitializerContext = FieldRelated + <NUM_LIT> ; int EnumConstantMustImplementAbstractMethod = MethodRelated + <NUM_LIT> ; int EnumConstantCannotDefineAbstractMethod = MethodRelated + <NUM_LIT> ; int AbstractMethodInEnum = MethodRelated + <NUM_LIT> ; int MissingEnumDefaultCase = Internal + <NUM_LIT> ; int MissingDefaultCase = Internal + <NUM_LIT> ; int MissingEnumConstantCaseDespiteDefault = FieldRelated + <NUM_LIT> ; int UninitializedLocalVariableHintMissingDefault = Internal + <NUM_LIT> ; int UninitializedBlankFinalFieldHintMissingDefault = FieldRelated + <NUM_LIT> ; int ShouldReturnValueHintMissingDefault = MethodRelated + <NUM_LIT> ; int IllegalExtendedDimensionsForVarArgs = Syntax + Internal + <NUM_LIT> ; int MethodVarargsArgumentNeedCast = MethodRelated + <NUM_LIT> ; int ConstructorVarargsArgumentNeedCast = ConstructorRelated + <NUM_LIT> ; int VarargsConflict = MethodRelated + <NUM_LIT> ; int SafeVarargsOnFixedArityMethod = MethodRelated + <NUM_LIT> ; int SafeVarargsOnNonFinalInstanceMethod = MethodRelated + <NUM_LIT> ; int PotentialHeapPollutionFromVararg = MethodRelated + <NUM_LIT> ; int VarargsElementTypeNotVisible = MethodRelated + <NUM_LIT> ; int VarargsElementTypeNotVisibleForConstructor = ConstructorRelated + <NUM_LIT> ; int JavadocGenericMethodTypeArgumentMismatch = Javadoc + Internal + <NUM_LIT> ; int JavadocNonGenericMethod = Javadoc + Internal + <NUM_LIT> ; int JavadocIncorrectArityForParameterizedMethod = Javadoc + Internal + <NUM_LIT> ; int JavadocParameterizedMethodArgumentTypeMismatch = Javadoc + Internal + <NUM_LIT> ; int JavadocTypeArgumentsForRawGenericMethod = Javadoc + Internal + <NUM_LIT> ; int JavadocGenericConstructorTypeArgumentMismatch = Javadoc + Internal + <NUM_LIT> ; int JavadocNonGenericConstructor = Javadoc + Internal + <NUM_LIT> ; int JavadocIncorrectArityForParameterizedConstructor = Javadoc + Internal + <NUM_LIT> ; int JavadocParameterizedConstructorArgumentTypeMismatch = Javadoc + Internal + <NUM_LIT> ; int JavadocTypeArgumentsForRawGenericConstructor = Javadoc + Internal + <NUM_LIT> ; int AssignmentToMultiCatchParameter = Internal + <NUM_LIT> ; int ResourceHasToImplementAutoCloseable = TypeRelated + <NUM_LIT> ; int AssignmentToResource = Internal + <NUM_LIT> ; int InvalidUnionTypeReferenceSequence = Internal + TypeRelated + <NUM_LIT> ; int AutoManagedResourceNotBelow17 = Syntax + Internal + <NUM_LIT> ; int MultiCatchNotBelow17 = Syntax + Internal + <NUM_LIT> ; int PolymorphicMethodNotBelow17 = MethodRelated + <NUM_LIT> ; int IncorrectSwitchType17 = TypeRelated + <NUM_LIT> ; int CannotInferElidedTypes = TypeRelated + <NUM_LIT> ; int CannotUseDiamondWithExplicitTypeArguments = TypeRelated + <NUM_LIT> ; int CannotUseDiamondWithAnonymousClasses = TypeRelated + <NUM_LIT> ; int SwitchOnStringsNotBelow17 = TypeRelated + <NUM_LIT> ; int UnhandledExceptionOnAutoClose = TypeRelated + <NUM_LIT> ; int DiamondNotBelow17 = TypeRelated + <NUM_LIT> ; int RedundantSpecificationOfTypeArguments = TypeRelated + <NUM_LIT> ; int PotentiallyUnclosedCloseable = Internal + <NUM_LIT> ; int PotentiallyUnclosedCloseableAtExit = Internal + <NUM_LIT> ; int UnclosedCloseable = Internal + <NUM_LIT> ; int UnclosedCloseableAtExit = Internal + <NUM_LIT> ; int ExplicitlyClosedAutoCloseable = Internal + <NUM_LIT> ; int SwitchOnEnumNotBelow15 = TypeRelated + <NUM_LIT> ; int RequiredNonNullButProvidedNull = TypeRelated + <NUM_LIT> ; int RequiredNonNullButProvidedPotentialNull = TypeRelated + <NUM_LIT> ; int RequiredNonNullButProvidedUnknown = TypeRelated + <NUM_LIT> ; int MissingNonNullByDefaultAnnotationOnPackage = Internal + <NUM_LIT> ; int IllegalReturnNullityRedefinition = MethodRelated + <NUM_LIT> ; int IllegalRedefinitionToNonNullParameter = MethodRelated + <NUM_LIT> ; int IllegalDefinitionToNonNullParameter = MethodRelated + <NUM_LIT> ; int ParameterLackingNonNullAnnotation = MethodRelated + <NUM_LIT> ; int ParameterLackingNullableAnnotation = MethodRelated + <NUM_LIT> ; int PotentialNullMessageSendReference = Internal + <NUM_LIT> ; int RedundantNullCheckOnNonNullMessageSend = Internal + <NUM_LIT> ; int CannotImplementIncompatibleNullness = Internal + <NUM_LIT> ; int RedundantNullAnnotation = MethodRelated + <NUM_LIT> ; int IllegalAnnotationForBaseType = TypeRelated + <NUM_LIT> ; int RedundantNullDefaultAnnotation = Internal + <NUM_LIT> ; int RedundantNullDefaultAnnotationPackage = Internal + <NUM_LIT> ; int RedundantNullDefaultAnnotationType = Internal + <NUM_LIT> ; int RedundantNullDefaultAnnotationMethod = Internal + <NUM_LIT> ; int ContradictoryNullAnnotations = Internal + <NUM_LIT> ; int MissingNonNullByDefaultAnnotationOnType = Internal + <NUM_LIT> ; int RedundantNullCheckOnSpecdNonNullLocalVariable = Internal + <NUM_LIT> ; int SpecdNonNullLocalVariableComparisonYieldsFalse = Internal + <NUM_LIT> ; int RequiredNonNullButProvidedSpecdNullable = Internal + <NUM_LIT> ; int ExternalProblemNotFixable = <NUM_LIT> ; int ExternalProblemFixable = <NUM_LIT> ; } </s>
<s> package org . eclipse . jdt . core . compiler ; public class InvalidInputException extends Exception { private static final long serialVersionUID = <NUM_LIT> ; public InvalidInputException ( ) { super ( ) ; } public InvalidInputException ( String message ) { super ( message ) ; } } </s>
<s> package org . eclipse . jdt . core . compiler ; import org . eclipse . jdt . internal . compiler . parser . ScannerHelper ; public final class CharOperation { public static final char [ ] NO_CHAR = new char [ <NUM_LIT:0> ] ; public static final char [ ] [ ] NO_CHAR_CHAR = new char [ <NUM_LIT:0> ] [ ] ; public static final String [ ] NO_STRINGS = new String [ <NUM_LIT:0> ] ; public static final char [ ] append ( char [ ] array , char suffix ) { if ( array == null ) return new char [ ] { suffix } ; int length = array . length ; System . arraycopy ( array , <NUM_LIT:0> , array = new char [ length + <NUM_LIT:1> ] , <NUM_LIT:0> , length ) ; array [ length ] = suffix ; return array ; } public static final char [ ] append ( char [ ] target , int index , char [ ] array , int start , int end ) { int targetLength = target . length ; int subLength = end - start ; int newTargetLength = subLength + index ; if ( newTargetLength > targetLength ) { System . arraycopy ( target , <NUM_LIT:0> , target = new char [ newTargetLength * <NUM_LIT:2> ] , <NUM_LIT:0> , index ) ; } System . arraycopy ( array , start , target , index , subLength ) ; return target ; } public static final char [ ] [ ] arrayConcat ( char [ ] [ ] first , char [ ] [ ] second ) { if ( first == null ) return second ; if ( second == null ) return first ; int length1 = first . length ; int length2 = second . length ; char [ ] [ ] result = new char [ length1 + length2 ] [ ] ; System . arraycopy ( first , <NUM_LIT:0> , result , <NUM_LIT:0> , length1 ) ; System . arraycopy ( second , <NUM_LIT:0> , result , length1 , length2 ) ; return result ; } public static final boolean camelCaseMatch ( char [ ] pattern , char [ ] name ) { if ( pattern == null ) return true ; if ( name == null ) return false ; return camelCaseMatch ( pattern , <NUM_LIT:0> , pattern . length , name , <NUM_LIT:0> , name . length , false ) ; } public static final boolean camelCaseMatch ( char [ ] pattern , char [ ] name , boolean samePartCount ) { if ( pattern == null ) return true ; if ( name == null ) return false ; return camelCaseMatch ( pattern , <NUM_LIT:0> , pattern . length , name , <NUM_LIT:0> , name . length , samePartCount ) ; } public static final boolean camelCaseMatch ( char [ ] pattern , int patternStart , int patternEnd , char [ ] name , int nameStart , int nameEnd ) { return camelCaseMatch ( pattern , patternStart , patternEnd , name , nameStart , nameEnd , false ) ; } public static final boolean camelCaseMatch ( char [ ] pattern , int patternStart , int patternEnd , char [ ] name , int nameStart , int nameEnd , boolean samePartCount ) { if ( name == null ) return false ; if ( pattern == null ) return true ; if ( patternEnd < <NUM_LIT:0> ) patternEnd = pattern . length ; if ( nameEnd < <NUM_LIT:0> ) nameEnd = name . length ; if ( patternEnd <= patternStart ) return nameEnd <= nameStart ; if ( nameEnd <= nameStart ) return false ; if ( name [ nameStart ] != pattern [ patternStart ] ) { return false ; } char patternChar , nameChar ; int iPattern = patternStart ; int iName = nameStart ; while ( true ) { iPattern ++ ; iName ++ ; if ( iPattern == patternEnd ) { if ( ! samePartCount || iName == nameEnd ) return true ; while ( true ) { if ( iName == nameEnd ) { return true ; } nameChar = name [ iName ] ; if ( nameChar < ScannerHelper . MAX_OBVIOUS ) { if ( ( ScannerHelper . OBVIOUS_IDENT_CHAR_NATURES [ nameChar ] & ScannerHelper . C_UPPER_LETTER ) != <NUM_LIT:0> ) { return false ; } } else if ( ! Character . isJavaIdentifierPart ( nameChar ) || Character . isUpperCase ( nameChar ) ) { return false ; } iName ++ ; } } if ( iName == nameEnd ) { return false ; } if ( ( patternChar = pattern [ iPattern ] ) == name [ iName ] ) { continue ; } if ( patternChar < ScannerHelper . MAX_OBVIOUS ) { if ( ( ScannerHelper . OBVIOUS_IDENT_CHAR_NATURES [ patternChar ] & ( ScannerHelper . C_UPPER_LETTER | ScannerHelper . C_DIGIT ) ) == <NUM_LIT:0> ) { return false ; } } else if ( Character . isJavaIdentifierPart ( patternChar ) && ! Character . isUpperCase ( patternChar ) && ! Character . isDigit ( patternChar ) ) { return false ; } while ( true ) { if ( iName == nameEnd ) { return false ; } nameChar = name [ iName ] ; if ( nameChar < ScannerHelper . MAX_OBVIOUS ) { int charNature = ScannerHelper . OBVIOUS_IDENT_CHAR_NATURES [ nameChar ] ; if ( ( charNature & ( ScannerHelper . C_LOWER_LETTER | ScannerHelper . C_SPECIAL ) ) != <NUM_LIT:0> ) { iName ++ ; } else if ( ( charNature & ScannerHelper . C_DIGIT ) != <NUM_LIT:0> ) { if ( patternChar == nameChar ) break ; iName ++ ; } else if ( patternChar != nameChar ) { return false ; } else { break ; } } else if ( Character . isJavaIdentifierPart ( nameChar ) && ! Character . isUpperCase ( nameChar ) ) { iName ++ ; } else if ( Character . isDigit ( nameChar ) ) { if ( patternChar == nameChar ) break ; iName ++ ; } else if ( patternChar != nameChar ) { return false ; } else { break ; } } } } public static String [ ] charArrayToStringArray ( char [ ] [ ] charArrays ) { if ( charArrays == null ) return null ; int length = charArrays . length ; if ( length == <NUM_LIT:0> ) return NO_STRINGS ; String [ ] strings = new String [ length ] ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) strings [ i ] = new String ( charArrays [ i ] ) ; return strings ; } public static String charToString ( char [ ] charArray ) { if ( charArray == null ) return null ; return new String ( charArray ) ; } public static final char [ ] [ ] arrayConcat ( char [ ] [ ] first , char [ ] second ) { if ( second == null ) return first ; if ( first == null ) return new char [ ] [ ] { second } ; int length = first . length ; char [ ] [ ] result = new char [ length + <NUM_LIT:1> ] [ ] ; System . arraycopy ( first , <NUM_LIT:0> , result , <NUM_LIT:0> , length ) ; result [ length ] = second ; return result ; } public static final int compareTo ( char [ ] array1 , char [ ] array2 ) { int length1 = array1 . length ; int length2 = array2 . length ; int min = Math . min ( length1 , length2 ) ; for ( int i = <NUM_LIT:0> ; i < min ; i ++ ) { if ( array1 [ i ] != array2 [ i ] ) { return array1 [ i ] - array2 [ i ] ; } } return length1 - length2 ; } public static final int compareTo ( char [ ] array1 , char [ ] array2 , int start , int end ) { int length1 = array1 . length ; int length2 = array2 . length ; int min = Math . min ( length1 , length2 ) ; min = Math . min ( min , end ) ; for ( int i = start ; i < min ; i ++ ) { if ( array1 [ i ] != array2 [ i ] ) { return array1 [ i ] - array2 [ i ] ; } } return length1 - length2 ; } public static final int compareWith ( char [ ] array , char [ ] prefix ) { int arrayLength = array . length ; int prefixLength = prefix . length ; int min = Math . min ( arrayLength , prefixLength ) ; int i = <NUM_LIT:0> ; while ( min -- != <NUM_LIT:0> ) { char c1 = array [ i ] ; char c2 = prefix [ i ++ ] ; if ( c1 != c2 ) return c1 - c2 ; } if ( prefixLength == i ) return <NUM_LIT:0> ; return - <NUM_LIT:1> ; } public static final char [ ] concat ( char [ ] first , char [ ] second ) { if ( first == null ) return second ; if ( second == null ) return first ; int length1 = first . length ; int length2 = second . length ; char [ ] result = new char [ length1 + length2 ] ; System . arraycopy ( first , <NUM_LIT:0> , result , <NUM_LIT:0> , length1 ) ; System . arraycopy ( second , <NUM_LIT:0> , result , length1 , length2 ) ; return result ; } public static final char [ ] concat ( char [ ] first , char [ ] second , char [ ] third ) { if ( first == null ) return concat ( second , third ) ; if ( second == null ) return concat ( first , third ) ; if ( third == null ) return concat ( first , second ) ; int length1 = first . length ; int length2 = second . length ; int length3 = third . length ; char [ ] result = new char [ length1 + length2 + length3 ] ; System . arraycopy ( first , <NUM_LIT:0> , result , <NUM_LIT:0> , length1 ) ; System . arraycopy ( second , <NUM_LIT:0> , result , length1 , length2 ) ; System . arraycopy ( third , <NUM_LIT:0> , result , length1 + length2 , length3 ) ; return result ; } public static final char [ ] concat ( char [ ] first , char [ ] second , char separator ) { if ( first == null ) return second ; if ( second == null ) return first ; int length1 = first . length ; if ( length1 == <NUM_LIT:0> ) return second ; int length2 = second . length ; if ( length2 == <NUM_LIT:0> ) return first ; char [ ] result = new char [ length1 + length2 + <NUM_LIT:1> ] ; System . arraycopy ( first , <NUM_LIT:0> , result , <NUM_LIT:0> , length1 ) ; result [ length1 ] = separator ; System . arraycopy ( second , <NUM_LIT:0> , result , length1 + <NUM_LIT:1> , length2 ) ; return result ; } public static final char [ ] concat ( char [ ] first , char sep1 , char [ ] second , char sep2 , char [ ] third ) { if ( first == null ) return concat ( second , third , sep2 ) ; if ( second == null ) return concat ( first , third , sep1 ) ; if ( third == null ) return concat ( first , second , sep1 ) ; int length1 = first . length ; int length2 = second . length ; int length3 = third . length ; char [ ] result = new char [ length1 + length2 + length3 + <NUM_LIT:2> ] ; System . arraycopy ( first , <NUM_LIT:0> , result , <NUM_LIT:0> , length1 ) ; result [ length1 ] = sep1 ; System . arraycopy ( second , <NUM_LIT:0> , result , length1 + <NUM_LIT:1> , length2 ) ; result [ length1 + length2 + <NUM_LIT:1> ] = sep2 ; System . arraycopy ( third , <NUM_LIT:0> , result , length1 + length2 + <NUM_LIT:2> , length3 ) ; return result ; } public static final char [ ] concat ( char prefix , char [ ] array , char suffix ) { if ( array == null ) return new char [ ] { prefix , suffix } ; int length = array . length ; char [ ] result = new char [ length + <NUM_LIT:2> ] ; result [ <NUM_LIT:0> ] = prefix ; System . arraycopy ( array , <NUM_LIT:0> , result , <NUM_LIT:1> , length ) ; result [ length + <NUM_LIT:1> ] = suffix ; return result ; } public static final char [ ] concatWith ( char [ ] name , char [ ] [ ] array , char separator ) { int nameLength = name == null ? <NUM_LIT:0> : name . length ; if ( nameLength == <NUM_LIT:0> ) return concatWith ( array , separator ) ; int length = array == null ? <NUM_LIT:0> : array . length ; if ( length == <NUM_LIT:0> ) return name ; int size = nameLength ; int index = length ; while ( -- index >= <NUM_LIT:0> ) if ( array [ index ] . length > <NUM_LIT:0> ) size += array [ index ] . length + <NUM_LIT:1> ; char [ ] result = new char [ size ] ; index = size ; for ( int i = length - <NUM_LIT:1> ; i >= <NUM_LIT:0> ; i -- ) { int subLength = array [ i ] . length ; if ( subLength > <NUM_LIT:0> ) { index -= subLength ; System . arraycopy ( array [ i ] , <NUM_LIT:0> , result , index , subLength ) ; result [ -- index ] = separator ; } } System . arraycopy ( name , <NUM_LIT:0> , result , <NUM_LIT:0> , nameLength ) ; return result ; } public static final char [ ] concatWith ( char [ ] [ ] array , char [ ] name , char separator ) { int nameLength = name == null ? <NUM_LIT:0> : name . length ; if ( nameLength == <NUM_LIT:0> ) return concatWith ( array , separator ) ; int length = array == null ? <NUM_LIT:0> : array . length ; if ( length == <NUM_LIT:0> ) return name ; int size = nameLength ; int index = length ; while ( -- index >= <NUM_LIT:0> ) if ( array [ index ] . length > <NUM_LIT:0> ) size += array [ index ] . length + <NUM_LIT:1> ; char [ ] result = new char [ size ] ; index = <NUM_LIT:0> ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { int subLength = array [ i ] . length ; if ( subLength > <NUM_LIT:0> ) { System . arraycopy ( array [ i ] , <NUM_LIT:0> , result , index , subLength ) ; index += subLength ; result [ index ++ ] = separator ; } } System . arraycopy ( name , <NUM_LIT:0> , result , index , nameLength ) ; return result ; } public static final char [ ] concatWith ( char [ ] [ ] array , char separator ) { int length = array == null ? <NUM_LIT:0> : array . length ; if ( length == <NUM_LIT:0> ) return CharOperation . NO_CHAR ; int size = length - <NUM_LIT:1> ; int index = length ; while ( -- index >= <NUM_LIT:0> ) { if ( array [ index ] . length == <NUM_LIT:0> ) size -- ; else size += array [ index ] . length ; } if ( size <= <NUM_LIT:0> ) return CharOperation . NO_CHAR ; char [ ] result = new char [ size ] ; index = length ; while ( -- index >= <NUM_LIT:0> ) { length = array [ index ] . length ; if ( length > <NUM_LIT:0> ) { System . arraycopy ( array [ index ] , <NUM_LIT:0> , result , ( size -= length ) , length ) ; if ( -- size >= <NUM_LIT:0> ) result [ size ] = separator ; } } return result ; } public static final boolean contains ( char character , char [ ] [ ] array ) { for ( int i = array . length ; -- i >= <NUM_LIT:0> ; ) { char [ ] subarray = array [ i ] ; for ( int j = subarray . length ; -- j >= <NUM_LIT:0> ; ) if ( subarray [ j ] == character ) return true ; } return false ; } public static final boolean contains ( char character , char [ ] array ) { for ( int i = array . length ; -- i >= <NUM_LIT:0> ; ) if ( array [ i ] == character ) return true ; return false ; } public static final boolean contains ( char [ ] characters , char [ ] array ) { for ( int i = array . length ; -- i >= <NUM_LIT:0> ; ) for ( int j = characters . length ; -- j >= <NUM_LIT:0> ; ) if ( array [ i ] == characters [ j ] ) return true ; return false ; } public static final char [ ] [ ] deepCopy ( char [ ] [ ] toCopy ) { int toCopyLength = toCopy . length ; char [ ] [ ] result = new char [ toCopyLength ] [ ] ; for ( int i = <NUM_LIT:0> ; i < toCopyLength ; i ++ ) { char [ ] toElement = toCopy [ i ] ; int toElementLength = toElement . length ; char [ ] resultElement = new char [ toElementLength ] ; System . arraycopy ( toElement , <NUM_LIT:0> , resultElement , <NUM_LIT:0> , toElementLength ) ; result [ i ] = resultElement ; } return result ; } public static final boolean endsWith ( char [ ] array , char [ ] toBeFound ) { int i = toBeFound . length ; int j = array . length - i ; if ( j < <NUM_LIT:0> ) return false ; while ( -- i >= <NUM_LIT:0> ) if ( toBeFound [ i ] != array [ i + j ] ) return false ; return true ; } public static final boolean equals ( char [ ] [ ] first , char [ ] [ ] second ) { if ( first == second ) return true ; if ( first == null || second == null ) return false ; if ( first . length != second . length ) return false ; for ( int i = first . length ; -- i >= <NUM_LIT:0> ; ) if ( ! equals ( first [ i ] , second [ i ] ) ) return false ; return true ; } public static final boolean equals ( char [ ] [ ] first , char [ ] [ ] second , boolean isCaseSensitive ) { if ( isCaseSensitive ) { return equals ( first , second ) ; } if ( first == second ) return true ; if ( first == null || second == null ) return false ; if ( first . length != second . length ) return false ; for ( int i = first . length ; -- i >= <NUM_LIT:0> ; ) if ( ! equals ( first [ i ] , second [ i ] , false ) ) return false ; return true ; } public static final boolean equals ( char [ ] first , char [ ] second ) { if ( first == second ) return true ; if ( first == null || second == null ) return false ; if ( first . length != second . length ) return false ; for ( int i = first . length ; -- i >= <NUM_LIT:0> ; ) if ( first [ i ] != second [ i ] ) return false ; return true ; } public static final boolean equals ( char [ ] first , char [ ] second , int secondStart , int secondEnd ) { return equals ( first , second , secondStart , secondEnd , true ) ; } public static final boolean equals ( char [ ] first , char [ ] second , int secondStart , int secondEnd , boolean isCaseSensitive ) { if ( first == second ) return true ; if ( first == null || second == null ) return false ; if ( first . length != secondEnd - secondStart ) return false ; if ( isCaseSensitive ) { for ( int i = first . length ; -- i >= <NUM_LIT:0> ; ) if ( first [ i ] != second [ i + secondStart ] ) return false ; } else { for ( int i = first . length ; -- i >= <NUM_LIT:0> ; ) if ( ScannerHelper . toLowerCase ( first [ i ] ) != ScannerHelper . toLowerCase ( second [ i + secondStart ] ) ) return false ; } return true ; } public static final boolean equals ( char [ ] first , char [ ] second , boolean isCaseSensitive ) { if ( isCaseSensitive ) { return equals ( first , second ) ; } if ( first == second ) return true ; if ( first == null || second == null ) return false ; if ( first . length != second . length ) return false ; for ( int i = first . length ; -- i >= <NUM_LIT:0> ; ) if ( ScannerHelper . toLowerCase ( first [ i ] ) != ScannerHelper . toLowerCase ( second [ i ] ) ) return false ; return true ; } public static final boolean fragmentEquals ( char [ ] fragment , char [ ] name , int startIndex , boolean isCaseSensitive ) { int max = fragment . length ; if ( name . length < max + startIndex ) return false ; if ( isCaseSensitive ) { for ( int i = max ; -- i >= <NUM_LIT:0> ; ) if ( fragment [ i ] != name [ i + startIndex ] ) return false ; return true ; } for ( int i = max ; -- i >= <NUM_LIT:0> ; ) if ( ScannerHelper . toLowerCase ( fragment [ i ] ) != ScannerHelper . toLowerCase ( name [ i + startIndex ] ) ) return false ; return true ; } public static final int hashCode ( char [ ] array ) { int length = array . length ; int hash = length == <NUM_LIT:0> ? <NUM_LIT:31> : array [ <NUM_LIT:0> ] ; if ( length < <NUM_LIT:8> ) { for ( int i = length ; -- i > <NUM_LIT:0> ; ) hash = ( hash * <NUM_LIT:31> ) + array [ i ] ; } else { for ( int i = length - <NUM_LIT:1> , last = i > <NUM_LIT:16> ? i - <NUM_LIT:16> : <NUM_LIT:0> ; i > last ; i -= <NUM_LIT:2> ) hash = ( hash * <NUM_LIT:31> ) + array [ i ] ; } return hash & <NUM_LIT> ; } public static boolean isWhitespace ( char c ) { return c < ScannerHelper . MAX_OBVIOUS && ( ( ScannerHelper . OBVIOUS_IDENT_CHAR_NATURES [ c ] & ScannerHelper . C_JLS_SPACE ) != <NUM_LIT:0> ) ; } public static final int indexOf ( char toBeFound , char [ ] array ) { return indexOf ( toBeFound , array , <NUM_LIT:0> ) ; } public static final int indexOf ( char [ ] toBeFound , char [ ] array , boolean isCaseSensitive ) { return indexOf ( toBeFound , array , isCaseSensitive , <NUM_LIT:0> ) ; } public static final int indexOf ( final char [ ] toBeFound , final char [ ] array , final boolean isCaseSensitive , final int start ) { return indexOf ( toBeFound , array , isCaseSensitive , start , array . length ) ; } public static final int indexOf ( final char [ ] toBeFound , final char [ ] array , final boolean isCaseSensitive , final int start , final int end ) { final int arrayLength = end ; final int toBeFoundLength = toBeFound . length ; if ( toBeFoundLength > arrayLength || start < <NUM_LIT:0> ) return - <NUM_LIT:1> ; if ( toBeFoundLength == <NUM_LIT:0> ) return <NUM_LIT:0> ; if ( toBeFoundLength == arrayLength ) { if ( isCaseSensitive ) { for ( int i = start ; i < arrayLength ; i ++ ) { if ( array [ i ] != toBeFound [ i ] ) return - <NUM_LIT:1> ; } return <NUM_LIT:0> ; } else { for ( int i = start ; i < arrayLength ; i ++ ) { if ( ScannerHelper . toLowerCase ( array [ i ] ) != ScannerHelper . toLowerCase ( toBeFound [ i ] ) ) return - <NUM_LIT:1> ; } return <NUM_LIT:0> ; } } if ( isCaseSensitive ) { arrayLoop : for ( int i = start , max = arrayLength - toBeFoundLength + <NUM_LIT:1> ; i < max ; i ++ ) { if ( array [ i ] == toBeFound [ <NUM_LIT:0> ] ) { for ( int j = <NUM_LIT:1> ; j < toBeFoundLength ; j ++ ) { if ( array [ i + j ] != toBeFound [ j ] ) continue arrayLoop ; } return i ; } } } else { arrayLoop : for ( int i = start , max = arrayLength - toBeFoundLength + <NUM_LIT:1> ; i < max ; i ++ ) { if ( ScannerHelper . toLowerCase ( array [ i ] ) == ScannerHelper . toLowerCase ( toBeFound [ <NUM_LIT:0> ] ) ) { for ( int j = <NUM_LIT:1> ; j < toBeFoundLength ; j ++ ) { if ( ScannerHelper . toLowerCase ( array [ i + j ] ) != ScannerHelper . toLowerCase ( toBeFound [ j ] ) ) continue arrayLoop ; } return i ; } } } return - <NUM_LIT:1> ; } public static final int indexOf ( char toBeFound , char [ ] array , int start ) { for ( int i = start ; i < array . length ; i ++ ) if ( toBeFound == array [ i ] ) return i ; return - <NUM_LIT:1> ; } public static final int indexOf ( char toBeFound , char [ ] array , int start , int end ) { for ( int i = start ; i < end ; i ++ ) if ( toBeFound == array [ i ] ) return i ; return - <NUM_LIT:1> ; } public static final int lastIndexOf ( char toBeFound , char [ ] array ) { for ( int i = array . length ; -- i >= <NUM_LIT:0> ; ) if ( toBeFound == array [ i ] ) return i ; return - <NUM_LIT:1> ; } public static final int lastIndexOf ( char toBeFound , char [ ] array , int startIndex ) { for ( int i = array . length ; -- i >= startIndex ; ) if ( toBeFound == array [ i ] ) return i ; return - <NUM_LIT:1> ; } public static final int lastIndexOf ( char toBeFound , char [ ] array , int startIndex , int endIndex ) { for ( int i = endIndex ; -- i >= startIndex ; ) if ( toBeFound == array [ i ] ) return i ; return - <NUM_LIT:1> ; } final static public char [ ] lastSegment ( char [ ] array , char separator ) { int pos = lastIndexOf ( separator , array ) ; if ( pos < <NUM_LIT:0> ) return array ; return subarray ( array , pos + <NUM_LIT:1> , array . length ) ; } public static final boolean match ( char [ ] pattern , char [ ] name , boolean isCaseSensitive ) { if ( name == null ) return false ; if ( pattern == null ) return true ; return match ( pattern , <NUM_LIT:0> , pattern . length , name , <NUM_LIT:0> , name . length , isCaseSensitive ) ; } public static final boolean match ( char [ ] pattern , int patternStart , int patternEnd , char [ ] name , int nameStart , int nameEnd , boolean isCaseSensitive ) { if ( name == null ) return false ; if ( pattern == null ) return true ; int iPattern = patternStart ; int iName = nameStart ; if ( patternEnd < <NUM_LIT:0> ) patternEnd = pattern . length ; if ( nameEnd < <NUM_LIT:0> ) nameEnd = name . length ; char patternChar = <NUM_LIT:0> ; while ( true ) { if ( iPattern == patternEnd ) { if ( iName == nameEnd ) return true ; return false ; } if ( ( patternChar = pattern [ iPattern ] ) == '<CHAR_LIT>' ) { break ; } if ( iName == nameEnd ) { return false ; } if ( patternChar != ( isCaseSensitive ? name [ iName ] : ScannerHelper . toLowerCase ( name [ iName ] ) ) && patternChar != '<CHAR_LIT>' ) { return false ; } iName ++ ; iPattern ++ ; } int segmentStart ; if ( patternChar == '<CHAR_LIT>' ) { segmentStart = ++ iPattern ; } else { segmentStart = <NUM_LIT:0> ; } int prefixStart = iName ; checkSegment : while ( iName < nameEnd ) { if ( iPattern == patternEnd ) { iPattern = segmentStart ; iName = ++ prefixStart ; continue checkSegment ; } if ( ( patternChar = pattern [ iPattern ] ) == '<CHAR_LIT>' ) { segmentStart = ++ iPattern ; if ( segmentStart == patternEnd ) { return true ; } prefixStart = iName ; continue checkSegment ; } if ( ( isCaseSensitive ? name [ iName ] : ScannerHelper . toLowerCase ( name [ iName ] ) ) != patternChar && patternChar != '<CHAR_LIT>' ) { iPattern = segmentStart ; iName = ++ prefixStart ; continue checkSegment ; } iName ++ ; iPattern ++ ; } return ( segmentStart == patternEnd ) || ( iName == nameEnd && iPattern == patternEnd ) || ( iPattern == patternEnd - <NUM_LIT:1> && pattern [ iPattern ] == '<CHAR_LIT>' ) ; } public static final boolean pathMatch ( char [ ] pattern , char [ ] filepath , boolean isCaseSensitive , char pathSeparator ) { if ( filepath == null ) return false ; if ( pattern == null ) return true ; int pSegmentStart = pattern [ <NUM_LIT:0> ] == pathSeparator ? <NUM_LIT:1> : <NUM_LIT:0> ; int pLength = pattern . length ; int pSegmentEnd = CharOperation . indexOf ( pathSeparator , pattern , pSegmentStart + <NUM_LIT:1> ) ; if ( pSegmentEnd < <NUM_LIT:0> ) pSegmentEnd = pLength ; boolean freeTrailingDoubleStar = pattern [ pLength - <NUM_LIT:1> ] == pathSeparator ; int fSegmentStart , fLength = filepath . length ; if ( filepath [ <NUM_LIT:0> ] != pathSeparator ) { fSegmentStart = <NUM_LIT:0> ; } else { fSegmentStart = <NUM_LIT:1> ; } if ( fSegmentStart != pSegmentStart ) { return false ; } int fSegmentEnd = CharOperation . indexOf ( pathSeparator , filepath , fSegmentStart + <NUM_LIT:1> ) ; if ( fSegmentEnd < <NUM_LIT:0> ) fSegmentEnd = fLength ; while ( pSegmentStart < pLength && ! ( pSegmentEnd == pLength && freeTrailingDoubleStar || ( pSegmentEnd == pSegmentStart + <NUM_LIT:2> && pattern [ pSegmentStart ] == '<CHAR_LIT>' && pattern [ pSegmentStart + <NUM_LIT:1> ] == '<CHAR_LIT>' ) ) ) { if ( fSegmentStart >= fLength ) return false ; if ( ! CharOperation . match ( pattern , pSegmentStart , pSegmentEnd , filepath , fSegmentStart , fSegmentEnd , isCaseSensitive ) ) { return false ; } pSegmentEnd = CharOperation . indexOf ( pathSeparator , pattern , pSegmentStart = pSegmentEnd + <NUM_LIT:1> ) ; if ( pSegmentEnd < <NUM_LIT:0> ) pSegmentEnd = pLength ; fSegmentEnd = CharOperation . indexOf ( pathSeparator , filepath , fSegmentStart = fSegmentEnd + <NUM_LIT:1> ) ; if ( fSegmentEnd < <NUM_LIT:0> ) fSegmentEnd = fLength ; } int pSegmentRestart ; if ( ( pSegmentStart >= pLength && freeTrailingDoubleStar ) || ( pSegmentEnd == pSegmentStart + <NUM_LIT:2> && pattern [ pSegmentStart ] == '<CHAR_LIT>' && pattern [ pSegmentStart + <NUM_LIT:1> ] == '<CHAR_LIT>' ) ) { pSegmentEnd = CharOperation . indexOf ( pathSeparator , pattern , pSegmentStart = pSegmentEnd + <NUM_LIT:1> ) ; if ( pSegmentEnd < <NUM_LIT:0> ) pSegmentEnd = pLength ; pSegmentRestart = pSegmentStart ; } else { if ( pSegmentStart >= pLength ) return fSegmentStart >= fLength ; pSegmentRestart = <NUM_LIT:0> ; } int fSegmentRestart = fSegmentStart ; checkSegment : while ( fSegmentStart < fLength ) { if ( pSegmentStart >= pLength ) { if ( freeTrailingDoubleStar ) return true ; pSegmentEnd = CharOperation . indexOf ( pathSeparator , pattern , pSegmentStart = pSegmentRestart ) ; if ( pSegmentEnd < <NUM_LIT:0> ) pSegmentEnd = pLength ; fSegmentRestart = CharOperation . indexOf ( pathSeparator , filepath , fSegmentRestart + <NUM_LIT:1> ) ; if ( fSegmentRestart < <NUM_LIT:0> ) { fSegmentRestart = fLength ; } else { fSegmentRestart ++ ; } fSegmentEnd = CharOperation . indexOf ( pathSeparator , filepath , fSegmentStart = fSegmentRestart ) ; if ( fSegmentEnd < <NUM_LIT:0> ) fSegmentEnd = fLength ; continue checkSegment ; } if ( pSegmentEnd == pSegmentStart + <NUM_LIT:2> && pattern [ pSegmentStart ] == '<CHAR_LIT>' && pattern [ pSegmentStart + <NUM_LIT:1> ] == '<CHAR_LIT>' ) { pSegmentEnd = CharOperation . indexOf ( pathSeparator , pattern , pSegmentStart = pSegmentEnd + <NUM_LIT:1> ) ; if ( pSegmentEnd < <NUM_LIT:0> ) pSegmentEnd = pLength ; pSegmentRestart = pSegmentStart ; fSegmentRestart = fSegmentStart ; if ( pSegmentStart >= pLength ) return true ; continue checkSegment ; } if ( ! CharOperation . match ( pattern , pSegmentStart , pSegmentEnd , filepath , fSegmentStart , fSegmentEnd , isCaseSensitive ) ) { pSegmentEnd = CharOperation . indexOf ( pathSeparator , pattern , pSegmentStart = pSegmentRestart ) ; if ( pSegmentEnd < <NUM_LIT:0> ) pSegmentEnd = pLength ; fSegmentRestart = CharOperation . indexOf ( pathSeparator , filepath , fSegmentRestart + <NUM_LIT:1> ) ; if ( fSegmentRestart < <NUM_LIT:0> ) { fSegmentRestart = fLength ; } else { fSegmentRestart ++ ; } fSegmentEnd = CharOperation . indexOf ( pathSeparator , filepath , fSegmentStart = fSegmentRestart ) ; if ( fSegmentEnd < <NUM_LIT:0> ) fSegmentEnd = fLength ; continue checkSegment ; } pSegmentEnd = CharOperation . indexOf ( pathSeparator , pattern , pSegmentStart = pSegmentEnd + <NUM_LIT:1> ) ; if ( pSegmentEnd < <NUM_LIT:0> ) pSegmentEnd = pLength ; fSegmentEnd = CharOperation . indexOf ( pathSeparator , filepath , fSegmentStart = fSegmentEnd + <NUM_LIT:1> ) ; if ( fSegmentEnd < <NUM_LIT:0> ) fSegmentEnd = fLength ; } return ( pSegmentRestart >= pSegmentEnd ) || ( fSegmentStart >= fLength && pSegmentStart >= pLength ) || ( pSegmentStart == pLength - <NUM_LIT:2> && pattern [ pSegmentStart ] == '<CHAR_LIT>' && pattern [ pSegmentStart + <NUM_LIT:1> ] == '<CHAR_LIT>' ) || ( pSegmentStart == pLength && freeTrailingDoubleStar ) ; } public static final int occurencesOf ( char toBeFound , char [ ] array ) { int count = <NUM_LIT:0> ; for ( int i = <NUM_LIT:0> ; i < array . length ; i ++ ) if ( toBeFound == array [ i ] ) count ++ ; return count ; } public static final int occurencesOf ( char toBeFound , char [ ] array , int start ) { int count = <NUM_LIT:0> ; for ( int i = start ; i < array . length ; i ++ ) if ( toBeFound == array [ i ] ) count ++ ; return count ; } public static final int parseInt ( char [ ] array , int start , int length ) throws NumberFormatException { if ( length == <NUM_LIT:1> ) { int result = array [ start ] - '<CHAR_LIT:0>' ; if ( result < <NUM_LIT:0> || result > <NUM_LIT:9> ) { throw new NumberFormatException ( "<STR_LIT>" ) ; } return result ; } else { return Integer . parseInt ( new String ( array , start , length ) ) ; } } public static final boolean prefixEquals ( char [ ] prefix , char [ ] name ) { int max = prefix . length ; if ( name . length < max ) return false ; for ( int i = max ; -- i >= <NUM_LIT:0> ; ) if ( prefix [ i ] != name [ i ] ) return false ; return true ; } public static final boolean prefixEquals ( char [ ] prefix , char [ ] name , boolean isCaseSensitive ) { return prefixEquals ( prefix , name , isCaseSensitive , <NUM_LIT:0> ) ; } public static final boolean prefixEquals ( char [ ] prefix , char [ ] name , boolean isCaseSensitive , int startIndex ) { int max = prefix . length ; if ( name . length - startIndex < max ) return false ; if ( isCaseSensitive ) { for ( int i = max ; -- i >= <NUM_LIT:0> ; ) if ( prefix [ i ] != name [ startIndex + i ] ) return false ; return true ; } for ( int i = max ; -- i >= <NUM_LIT:0> ; ) if ( ScannerHelper . toLowerCase ( prefix [ i ] ) != ScannerHelper . toLowerCase ( name [ startIndex + i ] ) ) return false ; return true ; } public static final char [ ] remove ( char [ ] array , char toBeRemoved ) { if ( array == null ) return null ; int length = array . length ; if ( length == <NUM_LIT:0> ) return array ; char [ ] result = null ; int count = <NUM_LIT:0> ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { char c = array [ i ] ; if ( c == toBeRemoved ) { if ( result == null ) { result = new char [ length ] ; System . arraycopy ( array , <NUM_LIT:0> , result , <NUM_LIT:0> , i ) ; count = i ; } } else if ( result != null ) { result [ count ++ ] = c ; } } if ( result == null ) return array ; System . arraycopy ( result , <NUM_LIT:0> , result = new char [ count ] , <NUM_LIT:0> , count ) ; return result ; } public static final void replace ( char [ ] array , char toBeReplaced , char replacementChar ) { if ( toBeReplaced != replacementChar ) { for ( int i = <NUM_LIT:0> , max = array . length ; i < max ; i ++ ) { if ( array [ i ] == toBeReplaced ) array [ i ] = replacementChar ; } } } public static final void replace ( char [ ] array , char [ ] toBeReplaced , char replacementChar ) { replace ( array , toBeReplaced , replacementChar , <NUM_LIT:0> , array . length ) ; } public static final void replace ( char [ ] array , char [ ] toBeReplaced , char replacementChar , int start , int end ) { for ( int i = end ; -- i >= start ; ) for ( int j = toBeReplaced . length ; -- j >= <NUM_LIT:0> ; ) if ( array [ i ] == toBeReplaced [ j ] ) array [ i ] = replacementChar ; } public static final char [ ] replace ( char [ ] array , char [ ] toBeReplaced , char [ ] replacementChars ) { int max = array . length ; int replacedLength = toBeReplaced . length ; int replacementLength = replacementChars . length ; int [ ] starts = new int [ <NUM_LIT:5> ] ; int occurrenceCount = <NUM_LIT:0> ; if ( ! equals ( toBeReplaced , replacementChars ) ) { next : for ( int i = <NUM_LIT:0> ; i < max ; ) { int index = indexOf ( toBeReplaced , array , true , i ) ; if ( index == - <NUM_LIT:1> ) { i ++ ; continue next ; } if ( occurrenceCount == starts . length ) { System . arraycopy ( starts , <NUM_LIT:0> , starts = new int [ occurrenceCount * <NUM_LIT:2> ] , <NUM_LIT:0> , occurrenceCount ) ; } starts [ occurrenceCount ++ ] = index ; i = index + replacedLength ; } } if ( occurrenceCount == <NUM_LIT:0> ) return array ; char [ ] result = new char [ max + occurrenceCount * ( replacementLength - replacedLength ) ] ; int inStart = <NUM_LIT:0> , outStart = <NUM_LIT:0> ; for ( int i = <NUM_LIT:0> ; i < occurrenceCount ; i ++ ) { int offset = starts [ i ] - inStart ; System . arraycopy ( array , inStart , result , outStart , offset ) ; inStart += offset ; outStart += offset ; System . arraycopy ( replacementChars , <NUM_LIT:0> , result , outStart , replacementLength ) ; inStart += replacedLength ; outStart += replacementLength ; } System . arraycopy ( array , inStart , result , outStart , max - inStart ) ; return result ; } public static final char [ ] replaceOnCopy ( char [ ] array , char toBeReplaced , char replacementChar ) { char [ ] result = null ; for ( int i = <NUM_LIT:0> , length = array . length ; i < length ; i ++ ) { char c = array [ i ] ; if ( c == toBeReplaced ) { if ( result == null ) { result = new char [ length ] ; System . arraycopy ( array , <NUM_LIT:0> , result , <NUM_LIT:0> , i ) ; } result [ i ] = replacementChar ; } else if ( result != null ) { result [ i ] = c ; } } if ( result == null ) return array ; return result ; } public static final char [ ] [ ] splitAndTrimOn ( char divider , char [ ] array ) { int length = array == null ? <NUM_LIT:0> : array . length ; if ( length == <NUM_LIT:0> ) return NO_CHAR_CHAR ; int wordCount = <NUM_LIT:1> ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) if ( array [ i ] == divider ) wordCount ++ ; char [ ] [ ] split = new char [ wordCount ] [ ] ; int last = <NUM_LIT:0> , currentWord = <NUM_LIT:0> ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { if ( array [ i ] == divider ) { int start = last , end = i - <NUM_LIT:1> ; while ( start < i && array [ start ] == '<CHAR_LIT:U+0020>' ) start ++ ; while ( end > start && array [ end ] == '<CHAR_LIT:U+0020>' ) end -- ; split [ currentWord ] = new char [ end - start + <NUM_LIT:1> ] ; System . arraycopy ( array , start , split [ currentWord ++ ] , <NUM_LIT:0> , end - start + <NUM_LIT:1> ) ; last = i + <NUM_LIT:1> ; } } int start = last , end = length - <NUM_LIT:1> ; while ( start < length && array [ start ] == '<CHAR_LIT:U+0020>' ) start ++ ; while ( end > start && array [ end ] == '<CHAR_LIT:U+0020>' ) end -- ; split [ currentWord ] = new char [ end - start + <NUM_LIT:1> ] ; System . arraycopy ( array , start , split [ currentWord ++ ] , <NUM_LIT:0> , end - start + <NUM_LIT:1> ) ; return split ; } public static final char [ ] [ ] splitOn ( char divider , char [ ] array ) { int length = array == null ? <NUM_LIT:0> : array . length ; if ( length == <NUM_LIT:0> ) return NO_CHAR_CHAR ; int wordCount = <NUM_LIT:1> ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) if ( array [ i ] == divider ) wordCount ++ ; char [ ] [ ] split = new char [ wordCount ] [ ] ; int last = <NUM_LIT:0> , currentWord = <NUM_LIT:0> ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { if ( array [ i ] == divider ) { split [ currentWord ] = new char [ i - last ] ; System . arraycopy ( array , last , split [ currentWord ++ ] , <NUM_LIT:0> , i - last ) ; last = i + <NUM_LIT:1> ; } } split [ currentWord ] = new char [ length - last ] ; System . arraycopy ( array , last , split [ currentWord ] , <NUM_LIT:0> , length - last ) ; return split ; } public static final char [ ] [ ] splitOn ( char divider , char [ ] array , int start , int end ) { int length = array == null ? <NUM_LIT:0> : array . length ; if ( length == <NUM_LIT:0> || start > end ) return NO_CHAR_CHAR ; int wordCount = <NUM_LIT:1> ; for ( int i = start ; i < end ; i ++ ) if ( array [ i ] == divider ) wordCount ++ ; char [ ] [ ] split = new char [ wordCount ] [ ] ; int last = start , currentWord = <NUM_LIT:0> ; for ( int i = start ; i < end ; i ++ ) { if ( array [ i ] == divider ) { split [ currentWord ] = new char [ i - last ] ; System . arraycopy ( array , last , split [ currentWord ++ ] , <NUM_LIT:0> , i - last ) ; last = i + <NUM_LIT:1> ; } } split [ currentWord ] = new char [ end - last ] ; System . arraycopy ( array , last , split [ currentWord ] , <NUM_LIT:0> , end - last ) ; return split ; } public static final char [ ] [ ] subarray ( char [ ] [ ] array , int start , int end ) { if ( end == - <NUM_LIT:1> ) end = array . length ; if ( start > end ) return null ; if ( start < <NUM_LIT:0> ) return null ; if ( end > array . length ) return null ; char [ ] [ ] result = new char [ end - start ] [ ] ; System . arraycopy ( array , start , result , <NUM_LIT:0> , end - start ) ; return result ; } public static final char [ ] subarray ( char [ ] array , int start , int end ) { if ( end == - <NUM_LIT:1> ) end = array . length ; if ( start > end ) return null ; if ( start < <NUM_LIT:0> ) return null ; if ( end > array . length ) return null ; char [ ] result = new char [ end - start ] ; System . arraycopy ( array , start , result , <NUM_LIT:0> , end - start ) ; return result ; } final static public char [ ] toLowerCase ( char [ ] chars ) { if ( chars == null ) return null ; int length = chars . length ; char [ ] lowerChars = null ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { char c = chars [ i ] ; char lc = ScannerHelper . toLowerCase ( c ) ; if ( ( c != lc ) || ( lowerChars != null ) ) { if ( lowerChars == null ) { System . arraycopy ( chars , <NUM_LIT:0> , lowerChars = new char [ length ] , <NUM_LIT:0> , i ) ; } lowerChars [ i ] = lc ; } } return lowerChars == null ? chars : lowerChars ; } final static public char [ ] toUpperCase ( char [ ] chars ) { if ( chars == null ) return null ; int length = chars . length ; char [ ] upperChars = null ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { char c = chars [ i ] ; char lc = ScannerHelper . toUpperCase ( c ) ; if ( ( c != lc ) || ( upperChars != null ) ) { if ( upperChars == null ) { System . arraycopy ( chars , <NUM_LIT:0> , upperChars = new char [ length ] , <NUM_LIT:0> , i ) ; } upperChars [ i ] = lc ; } } return upperChars == null ? chars : upperChars ; } final static public char [ ] trim ( char [ ] chars ) { if ( chars == null ) return null ; int start = <NUM_LIT:0> , length = chars . length , end = length - <NUM_LIT:1> ; while ( start < length && chars [ start ] == '<CHAR_LIT:U+0020>' ) { start ++ ; } while ( end > start && chars [ end ] == '<CHAR_LIT:U+0020>' ) { end -- ; } if ( start != <NUM_LIT:0> || end != length - <NUM_LIT:1> ) { return subarray ( chars , start , end + <NUM_LIT:1> ) ; } return chars ; } final static public String toString ( char [ ] [ ] array ) { char [ ] result = concatWith ( array , '<CHAR_LIT:.>' ) ; return new String ( result ) ; } final static public String [ ] toStrings ( char [ ] [ ] array ) { if ( array == null ) return NO_STRINGS ; int length = array . length ; if ( length == <NUM_LIT:0> ) return NO_STRINGS ; String [ ] result = new String [ length ] ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) result [ i ] = new String ( array [ i ] ) ; return result ; } } </s>
<s> package org . eclipse . jdt . core ; import java . io . IOException ; import java . util . Enumeration ; import java . util . zip . ZipEntry ; import java . util . zip . ZipException ; import java . util . zip . ZipFile ; import org . apache . tools . ant . BuildException ; import org . apache . tools . ant . Task ; import org . eclipse . jdt . core . util . IClassFileReader ; import org . eclipse . jdt . core . util . ICodeAttribute ; import org . eclipse . jdt . core . util . IMethodInfo ; import org . eclipse . jdt . internal . antadapter . AntAdapterMessages ; public final class CheckDebugAttributes extends Task { private String file ; private String property ; public void execute ( ) throws BuildException { if ( this . file == null ) { throw new BuildException ( AntAdapterMessages . getString ( "<STR_LIT>" ) ) ; } if ( this . property == null ) { throw new BuildException ( AntAdapterMessages . getString ( "<STR_LIT>" ) ) ; } try { boolean hasDebugAttributes = false ; if ( org . eclipse . jdt . internal . compiler . util . Util . isClassFileName ( this . file ) ) { IClassFileReader classFileReader = ToolFactory . createDefaultClassFileReader ( this . file , IClassFileReader . ALL ) ; hasDebugAttributes = checkClassFile ( classFileReader ) ; } else { ZipFile jarFile = null ; try { jarFile = new ZipFile ( this . file ) ; } catch ( ZipException e ) { throw new BuildException ( AntAdapterMessages . getString ( "<STR_LIT>" ) ) ; } for ( Enumeration entries = jarFile . entries ( ) ; ! hasDebugAttributes && entries . hasMoreElements ( ) ; ) { ZipEntry entry = ( ZipEntry ) entries . nextElement ( ) ; if ( org . eclipse . jdt . internal . compiler . util . Util . isClassFileName ( entry . getName ( ) ) ) { IClassFileReader classFileReader = ToolFactory . createDefaultClassFileReader ( this . file , entry . getName ( ) , IClassFileReader . ALL ) ; hasDebugAttributes = checkClassFile ( classFileReader ) ; } } } if ( hasDebugAttributes ) { getProject ( ) . setUserProperty ( this . property , "<STR_LIT>" ) ; } } catch ( IOException e ) { throw new BuildException ( AntAdapterMessages . getString ( "<STR_LIT>" ) + this . file ) ; } } private boolean checkClassFile ( IClassFileReader classFileReader ) { IMethodInfo [ ] methodInfos = classFileReader . getMethodInfos ( ) ; for ( int i = <NUM_LIT:0> , max = methodInfos . length ; i < max ; i ++ ) { ICodeAttribute codeAttribute = methodInfos [ i ] . getCodeAttribute ( ) ; if ( codeAttribute != null && codeAttribute . getLineNumberAttribute ( ) != null ) { return true ; } } return false ; } public void setFile ( String value ) { this . file = value ; } public void setProperty ( String value ) { this . property = value ; } } </s>
<s> package org . eclipse . jdt . core ; import java . io . IOException ; import org . apache . tools . ant . BuildException ; import org . apache . tools . ant . Task ; import org . eclipse . jdt . core . index . JavaIndexer ; import org . eclipse . jdt . internal . antadapter . AntAdapterMessages ; public class BuildJarIndex extends Task { private String jarPath ; private String indexPath ; public void execute ( ) throws BuildException { if ( this . jarPath == null ) { throw new BuildException ( AntAdapterMessages . getString ( "<STR_LIT>" ) ) ; } if ( this . indexPath == null ) { throw new BuildException ( AntAdapterMessages . getString ( "<STR_LIT>" ) ) ; } try { JavaIndexer . generateIndexForJar ( this . jarPath , this . indexPath ) ; } catch ( IOException e ) { throw new BuildException ( AntAdapterMessages . getString ( "<STR_LIT>" , e . getLocalizedMessage ( ) ) ) ; } } public void setJarPath ( String path ) { this . jarPath = path ; } public void setIndexPath ( String path ) { this . indexPath = path ; } } </s>
<s> package org . eclipse . jdt . core ; import java . io . File ; import java . io . IOException ; import java . io . PrintWriter ; import java . lang . reflect . Constructor ; import java . lang . reflect . InvocationTargetException ; import java . lang . reflect . Method ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . Comparator ; import java . util . HashMap ; import java . util . List ; import java . util . Map ; import org . apache . tools . ant . BuildException ; import org . apache . tools . ant . Project ; import org . apache . tools . ant . taskdefs . Javac ; import org . apache . tools . ant . taskdefs . compilers . DefaultCompilerAdapter ; import org . apache . tools . ant . types . Commandline ; import org . apache . tools . ant . types . Path ; import org . apache . tools . ant . types . Commandline . Argument ; import org . apache . tools . ant . util . JavaEnvUtils ; import org . eclipse . jdt . core . compiler . CharOperation ; import org . eclipse . jdt . internal . antadapter . AntAdapterMessages ; import org . eclipse . jdt . internal . compiler . impl . CompilerOptions ; import org . eclipse . jdt . internal . compiler . util . SuffixConstants ; import org . eclipse . jdt . internal . compiler . util . Util ; public class JDTCompilerAdapter extends DefaultCompilerAdapter { private static final char [ ] SEPARATOR_CHARS = new char [ ] { '<CHAR_LIT:/>' , '<STR_LIT:\\>' } ; private static final char [ ] ADAPTER_PREFIX = "<STR_LIT>" . toCharArray ( ) ; private static final char [ ] ADAPTER_ENCODING = "<STR_LIT>" . toCharArray ( ) ; private static final char [ ] ADAPTER_ACCESS = "<STR_LIT>" . toCharArray ( ) ; private static String compilerClass = "<STR_LIT>" ; String logFileName ; Map customDefaultOptions ; private Map fileEncodings = null ; private Map dirEncodings = null ; private List accessRules = null ; public boolean execute ( ) throws BuildException { this . attributes . log ( AntAdapterMessages . getString ( "<STR_LIT>" ) , Project . MSG_VERBOSE ) ; Commandline cmd = setupJavacCommand ( ) ; try { Class c = Class . forName ( compilerClass ) ; Constructor batchCompilerConstructor = c . getConstructor ( new Class [ ] { PrintWriter . class , PrintWriter . class , Boolean . TYPE , Map . class } ) ; Object batchCompilerInstance = batchCompilerConstructor . newInstance ( new Object [ ] { new PrintWriter ( System . out ) , new PrintWriter ( System . err ) , Boolean . TRUE , this . customDefaultOptions } ) ; Method compile = c . getMethod ( "<STR_LIT>" , new Class [ ] { String [ ] . class } ) ; Object result = compile . invoke ( batchCompilerInstance , new Object [ ] { cmd . getArguments ( ) } ) ; final boolean resultValue = ( ( Boolean ) result ) . booleanValue ( ) ; if ( ! resultValue && this . logFileName != null ) { this . attributes . log ( AntAdapterMessages . getString ( "<STR_LIT>" , this . logFileName ) ) ; } return resultValue ; } catch ( ClassNotFoundException cnfe ) { throw new BuildException ( AntAdapterMessages . getString ( "<STR_LIT>" ) ) ; } catch ( Exception ex ) { throw new BuildException ( ex ) ; } } protected Commandline setupJavacCommand ( ) throws BuildException { Commandline cmd = new Commandline ( ) ; this . customDefaultOptions = new CompilerOptions ( ) . getMap ( ) ; Class javacClass = Javac . class ; String [ ] compilerArgs = processCompilerArguments ( javacClass ) ; cmd . createArgument ( ) . setValue ( "<STR_LIT>" ) ; if ( this . bootclasspath != null ) { cmd . createArgument ( ) . setValue ( "<STR_LIT>" ) ; if ( this . bootclasspath . size ( ) != <NUM_LIT:0> ) { cmd . createArgument ( ) . setPath ( this . bootclasspath ) ; } else { cmd . createArgument ( ) . setValue ( Util . EMPTY_STRING ) ; } } if ( this . extdirs != null ) { cmd . createArgument ( ) . setValue ( "<STR_LIT>" ) ; cmd . createArgument ( ) . setPath ( this . extdirs ) ; } Path classpath = new Path ( this . project ) ; classpath . append ( getCompileClasspath ( ) ) ; cmd . createArgument ( ) . setValue ( "<STR_LIT>" ) ; createClasspathArgument ( cmd , classpath ) ; Path sourcepath = null ; Method getSourcepathMethod = null ; try { getSourcepathMethod = javacClass . getMethod ( "<STR_LIT>" , null ) ; } catch ( NoSuchMethodException e ) { } Path compileSourcePath = null ; if ( getSourcepathMethod != null ) { try { compileSourcePath = ( Path ) getSourcepathMethod . invoke ( this . attributes , null ) ; } catch ( IllegalAccessException e ) { } catch ( InvocationTargetException e ) { } } if ( compileSourcePath != null ) { sourcepath = compileSourcePath ; } else { sourcepath = this . src ; } cmd . createArgument ( ) . setValue ( "<STR_LIT>" ) ; createClasspathArgument ( cmd , sourcepath ) ; final String javaVersion = JavaEnvUtils . getJavaVersion ( ) ; String memoryParameterPrefix = javaVersion . equals ( JavaEnvUtils . JAVA_1_1 ) ? "<STR_LIT>" : "<STR_LIT>" ; if ( this . memoryInitialSize != null ) { if ( ! this . attributes . isForkedJavac ( ) ) { this . attributes . log ( AntAdapterMessages . getString ( "<STR_LIT>" ) , Project . MSG_WARN ) ; } else { cmd . createArgument ( ) . setValue ( memoryParameterPrefix + "<STR_LIT>" + this . memoryInitialSize ) ; } } if ( this . memoryMaximumSize != null ) { if ( ! this . attributes . isForkedJavac ( ) ) { this . attributes . log ( AntAdapterMessages . getString ( "<STR_LIT>" ) , Project . MSG_WARN ) ; } else { cmd . createArgument ( ) . setValue ( memoryParameterPrefix + "<STR_LIT>" + this . memoryMaximumSize ) ; } } if ( this . debug ) { Method getDebugLevelMethod = null ; try { getDebugLevelMethod = javacClass . getMethod ( "<STR_LIT>" , null ) ; } catch ( NoSuchMethodException e ) { } String debugLevel = null ; if ( getDebugLevelMethod != null ) { try { debugLevel = ( String ) getDebugLevelMethod . invoke ( this . attributes , null ) ; } catch ( IllegalAccessException e ) { } catch ( InvocationTargetException e ) { } } if ( debugLevel != null ) { this . customDefaultOptions . put ( CompilerOptions . OPTION_LocalVariableAttribute , CompilerOptions . DO_NOT_GENERATE ) ; this . customDefaultOptions . put ( CompilerOptions . OPTION_LineNumberAttribute , CompilerOptions . DO_NOT_GENERATE ) ; this . customDefaultOptions . put ( CompilerOptions . OPTION_SourceFileAttribute , CompilerOptions . DO_NOT_GENERATE ) ; if ( debugLevel . length ( ) != <NUM_LIT:0> ) { if ( debugLevel . indexOf ( "<STR_LIT>" ) != - <NUM_LIT:1> ) { this . customDefaultOptions . put ( CompilerOptions . OPTION_LocalVariableAttribute , CompilerOptions . GENERATE ) ; } if ( debugLevel . indexOf ( "<STR_LIT>" ) != - <NUM_LIT:1> ) { this . customDefaultOptions . put ( CompilerOptions . OPTION_LineNumberAttribute , CompilerOptions . GENERATE ) ; } if ( debugLevel . indexOf ( "<STR_LIT:source>" ) != - <NUM_LIT:1> ) { this . customDefaultOptions . put ( CompilerOptions . OPTION_SourceFileAttribute , CompilerOptions . GENERATE ) ; } } } else { this . customDefaultOptions . put ( CompilerOptions . OPTION_LocalVariableAttribute , CompilerOptions . GENERATE ) ; this . customDefaultOptions . put ( CompilerOptions . OPTION_LineNumberAttribute , CompilerOptions . GENERATE ) ; this . customDefaultOptions . put ( CompilerOptions . OPTION_SourceFileAttribute , CompilerOptions . GENERATE ) ; } } else { this . customDefaultOptions . put ( CompilerOptions . OPTION_LocalVariableAttribute , CompilerOptions . DO_NOT_GENERATE ) ; this . customDefaultOptions . put ( CompilerOptions . OPTION_LineNumberAttribute , CompilerOptions . DO_NOT_GENERATE ) ; this . customDefaultOptions . put ( CompilerOptions . OPTION_SourceFileAttribute , CompilerOptions . DO_NOT_GENERATE ) ; } if ( this . attributes . getNowarn ( ) ) { Object [ ] entries = this . customDefaultOptions . entrySet ( ) . toArray ( ) ; for ( int i = <NUM_LIT:0> , max = entries . length ; i < max ; i ++ ) { Map . Entry entry = ( Map . Entry ) entries [ i ] ; if ( ! ( entry . getKey ( ) instanceof String ) ) continue ; if ( ! ( entry . getValue ( ) instanceof String ) ) continue ; if ( ( ( String ) entry . getValue ( ) ) . equals ( CompilerOptions . WARNING ) ) { this . customDefaultOptions . put ( entry . getKey ( ) , CompilerOptions . IGNORE ) ; } } this . customDefaultOptions . put ( CompilerOptions . OPTION_TaskTags , Util . EMPTY_STRING ) ; if ( this . deprecation ) { this . customDefaultOptions . put ( CompilerOptions . OPTION_ReportDeprecation , CompilerOptions . WARNING ) ; this . customDefaultOptions . put ( CompilerOptions . OPTION_ReportDeprecationInDeprecatedCode , CompilerOptions . ENABLED ) ; this . customDefaultOptions . put ( CompilerOptions . OPTION_ReportDeprecationWhenOverridingDeprecatedMethod , CompilerOptions . ENABLED ) ; } } else if ( this . deprecation ) { this . customDefaultOptions . put ( CompilerOptions . OPTION_ReportDeprecation , CompilerOptions . WARNING ) ; this . customDefaultOptions . put ( CompilerOptions . OPTION_ReportDeprecationInDeprecatedCode , CompilerOptions . ENABLED ) ; this . customDefaultOptions . put ( CompilerOptions . OPTION_ReportDeprecationWhenOverridingDeprecatedMethod , CompilerOptions . ENABLED ) ; } else { this . customDefaultOptions . put ( CompilerOptions . OPTION_ReportDeprecation , CompilerOptions . IGNORE ) ; this . customDefaultOptions . put ( CompilerOptions . OPTION_ReportDeprecationInDeprecatedCode , CompilerOptions . DISABLED ) ; this . customDefaultOptions . put ( CompilerOptions . OPTION_ReportDeprecationWhenOverridingDeprecatedMethod , CompilerOptions . DISABLED ) ; } if ( this . destDir != null ) { cmd . createArgument ( ) . setValue ( "<STR_LIT>" ) ; cmd . createArgument ( ) . setFile ( this . destDir . getAbsoluteFile ( ) ) ; } if ( this . verbose ) { cmd . createArgument ( ) . setValue ( "<STR_LIT>" ) ; } if ( ! this . attributes . getFailonerror ( ) ) { cmd . createArgument ( ) . setValue ( "<STR_LIT>" ) ; } if ( this . target != null ) { this . customDefaultOptions . put ( CompilerOptions . OPTION_TargetPlatform , this . target ) ; } String source = this . attributes . getSource ( ) ; if ( source != null ) { this . customDefaultOptions . put ( CompilerOptions . OPTION_Source , source ) ; } if ( compilerArgs != null ) { final int length = compilerArgs . length ; if ( length != <NUM_LIT:0> ) { for ( int i = <NUM_LIT:0> , max = length ; i < max ; i ++ ) { String arg = compilerArgs [ i ] ; if ( this . logFileName == null && "<STR_LIT>" . equals ( arg ) && ( ( i + <NUM_LIT:1> ) < max ) ) { this . logFileName = compilerArgs [ i + <NUM_LIT:1> ] ; } cmd . createArgument ( ) . setValue ( arg ) ; } } } if ( this . encoding != null ) { cmd . createArgument ( ) . setValue ( "<STR_LIT>" ) ; cmd . createArgument ( ) . setValue ( this . encoding ) ; } logAndAddFilesToCompile ( cmd ) ; return cmd ; } private String [ ] processCompilerArguments ( Class javacClass ) { Method getCurrentCompilerArgsMethod = null ; try { getCurrentCompilerArgsMethod = javacClass . getMethod ( "<STR_LIT>" , null ) ; } catch ( NoSuchMethodException e ) { } String [ ] compilerArgs = null ; if ( getCurrentCompilerArgsMethod != null ) { try { compilerArgs = ( String [ ] ) getCurrentCompilerArgsMethod . invoke ( this . attributes , null ) ; } catch ( IllegalAccessException e ) { } catch ( InvocationTargetException e ) { } } if ( compilerArgs != null ) checkCompilerArgs ( compilerArgs ) ; return compilerArgs ; } private void checkCompilerArgs ( String [ ] args ) { for ( int i = <NUM_LIT:0> ; i < args . length ; i ++ ) { if ( args [ i ] . charAt ( <NUM_LIT:0> ) == '<CHAR_LIT>' ) { try { char [ ] content = Util . getFileCharContent ( new File ( args [ i ] . substring ( <NUM_LIT:1> ) ) , null ) ; int offset = <NUM_LIT:0> ; int prefixLength = ADAPTER_PREFIX . length ; while ( ( offset = CharOperation . indexOf ( ADAPTER_PREFIX , content , true , offset ) ) > - <NUM_LIT:1> ) { int start = offset + prefixLength ; int end = CharOperation . indexOf ( '<STR_LIT:\n>' , content , start ) ; if ( end == - <NUM_LIT:1> ) end = content . length ; while ( CharOperation . isWhitespace ( content [ end ] ) ) { end -- ; } if ( CharOperation . equals ( ADAPTER_ENCODING , content , start , start + ADAPTER_ENCODING . length ) ) { CharOperation . replace ( content , SEPARATOR_CHARS , File . separatorChar , start , end + <NUM_LIT:1> ) ; start += ADAPTER_ENCODING . length ; int encodeStart = CharOperation . lastIndexOf ( '<CHAR_LIT:[>' , content , start , end ) ; if ( start < encodeStart && encodeStart < end ) { boolean isFile = CharOperation . equals ( SuffixConstants . SUFFIX_java , content , encodeStart - <NUM_LIT:5> , encodeStart , false ) ; String str = String . valueOf ( content , start , encodeStart - start ) ; String enc = String . valueOf ( content , encodeStart , end - encodeStart + <NUM_LIT:1> ) ; if ( isFile ) { if ( this . fileEncodings == null ) this . fileEncodings = new HashMap ( ) ; this . fileEncodings . put ( str , enc ) ; } else { if ( this . dirEncodings == null ) this . dirEncodings = new HashMap ( ) ; this . dirEncodings . put ( str , enc ) ; } } } else if ( CharOperation . equals ( ADAPTER_ACCESS , content , start , start + ADAPTER_ACCESS . length ) ) { start += ADAPTER_ACCESS . length ; int accessStart = CharOperation . indexOf ( '<CHAR_LIT:[>' , content , start , end ) ; CharOperation . replace ( content , SEPARATOR_CHARS , File . separatorChar , start , accessStart ) ; if ( start < accessStart && accessStart < end ) { String path = String . valueOf ( content , start , accessStart - start ) ; String access = String . valueOf ( content , accessStart , end - accessStart + <NUM_LIT:1> ) ; if ( this . accessRules == null ) this . accessRules = new ArrayList ( ) ; this . accessRules . add ( path ) ; this . accessRules . add ( access ) ; } } offset = end ; } } catch ( IOException e ) { } } } } private void createClasspathArgument ( Commandline cmd , Path classpath ) { Argument arg = cmd . createArgument ( ) ; final String [ ] pathElements = classpath . list ( ) ; if ( pathElements . length == <NUM_LIT:0> ) { arg . setValue ( Util . EMPTY_STRING ) ; return ; } if ( this . accessRules == null ) { arg . setPath ( classpath ) ; return ; } int rulesLength = this . accessRules . size ( ) ; String [ ] rules = ( String [ ] ) this . accessRules . toArray ( new String [ rulesLength ] ) ; int nextRule = <NUM_LIT:0> ; final StringBuffer result = new StringBuffer ( ) ; for ( int i = <NUM_LIT:0> , max = pathElements . length ; i < max ; i ++ ) { if ( i > <NUM_LIT:0> ) result . append ( File . pathSeparatorChar ) ; String pathElement = pathElements [ i ] ; result . append ( pathElement ) ; for ( int j = nextRule ; j < rulesLength ; j += <NUM_LIT:2> ) { String rule = rules [ j ] ; if ( pathElement . endsWith ( rule ) ) { result . append ( rules [ j + <NUM_LIT:1> ] ) ; nextRule = j + <NUM_LIT:2> ; break ; } if ( rule . endsWith ( File . separator ) ) { int ruleLength = rule . length ( ) ; if ( pathElement . regionMatches ( false , pathElement . length ( ) - ruleLength + <NUM_LIT:1> , rule , <NUM_LIT:0> , ruleLength - <NUM_LIT:1> ) ) { result . append ( rules [ j + <NUM_LIT:1> ] ) ; nextRule = j + <NUM_LIT:2> ; break ; } } else if ( pathElement . endsWith ( File . separator ) ) { int ruleLength = rule . length ( ) ; if ( pathElement . regionMatches ( false , pathElement . length ( ) - ruleLength - <NUM_LIT:1> , rule , <NUM_LIT:0> , ruleLength ) ) { result . append ( rules [ j + <NUM_LIT:1> ] ) ; nextRule = j + <NUM_LIT:2> ; break ; } } } } arg . setValue ( result . toString ( ) ) ; } protected void logAndAddFilesToCompile ( Commandline cmd ) { this . attributes . log ( "<STR_LIT>" + cmd . describeArguments ( ) , Project . MSG_VERBOSE ) ; StringBuffer niceSourceList = new StringBuffer ( "<STR_LIT>" ) ; if ( this . compileList . length != <NUM_LIT:1> ) { niceSourceList . append ( "<STR_LIT:s>" ) ; } niceSourceList . append ( "<STR_LIT>" ) ; niceSourceList . append ( lSep ) ; String [ ] encodedFiles = null , encodedDirs = null ; int encodedFilesLength = <NUM_LIT:0> , encodedDirsLength = <NUM_LIT:0> ; if ( this . fileEncodings != null ) { encodedFilesLength = this . fileEncodings . size ( ) ; encodedFiles = new String [ encodedFilesLength ] ; this . fileEncodings . keySet ( ) . toArray ( encodedFiles ) ; } if ( this . dirEncodings != null ) { encodedDirsLength = this . dirEncodings . size ( ) ; encodedDirs = new String [ encodedDirsLength ] ; this . dirEncodings . keySet ( ) . toArray ( encodedDirs ) ; Comparator comparator = new Comparator ( ) { public int compare ( Object o1 , Object o2 ) { return ( ( String ) o2 ) . length ( ) - ( ( String ) o1 ) . length ( ) ; } } ; Arrays . sort ( encodedDirs , comparator ) ; } for ( int i = <NUM_LIT:0> ; i < this . compileList . length ; i ++ ) { String arg = this . compileList [ i ] . getAbsolutePath ( ) ; boolean encoded = false ; if ( encodedFiles != null ) { for ( int j = <NUM_LIT:0> ; j < encodedFilesLength ; j ++ ) { if ( arg . endsWith ( encodedFiles [ j ] ) ) { arg = arg + ( String ) this . fileEncodings . get ( encodedFiles [ j ] ) ; if ( j < encodedFilesLength - <NUM_LIT:1> ) { System . arraycopy ( encodedFiles , j + <NUM_LIT:1> , encodedFiles , j , encodedFilesLength - j - <NUM_LIT:1> ) ; } encodedFiles [ -- encodedFilesLength ] = null ; encoded = true ; break ; } } } if ( ! encoded && encodedDirs != null ) { for ( int j = <NUM_LIT:0> ; j < encodedDirsLength ; j ++ ) { if ( arg . lastIndexOf ( encodedDirs [ j ] ) != - <NUM_LIT:1> ) { arg = arg + ( String ) this . dirEncodings . get ( encodedDirs [ j ] ) ; break ; } } } cmd . createArgument ( ) . setValue ( arg ) ; niceSourceList . append ( "<STR_LIT:U+0020U+0020U+0020U+0020>" + arg + lSep ) ; } this . attributes . log ( niceSourceList . toString ( ) , Project . MSG_VERBOSE ) ; } } </s>
<s> package org . eclipse . jdt . internal . antadapter ; import java . text . MessageFormat ; import java . util . Locale ; import java . util . MissingResourceException ; import java . util . ResourceBundle ; public class AntAdapterMessages { private static final String BUNDLE_NAME = "<STR_LIT>" ; private static ResourceBundle RESOURCE_BUNDLE ; static { try { RESOURCE_BUNDLE = ResourceBundle . getBundle ( BUNDLE_NAME , Locale . getDefault ( ) ) ; } catch ( MissingResourceException e ) { System . out . println ( "<STR_LIT>" + BUNDLE_NAME . replace ( '<CHAR_LIT:.>' , '<CHAR_LIT:/>' ) + "<STR_LIT>" + Locale . getDefault ( ) ) ; throw e ; } } private AntAdapterMessages ( ) { } public static String getString ( String key ) { try { return RESOURCE_BUNDLE . getString ( key ) ; } catch ( MissingResourceException e ) { return '<CHAR_LIT>' + key + '<CHAR_LIT>' ; } } public static String getString ( String key , String argument ) { try { String message = RESOURCE_BUNDLE . getString ( key ) ; MessageFormat messageFormat = new MessageFormat ( message ) ; return messageFormat . format ( new String [ ] { argument } ) ; } catch ( MissingResourceException e ) { return '<CHAR_LIT>' + key + '<CHAR_LIT>' ; } } } </s>
<s> package org . eclipse . jdt . core ; public interface IField extends IMember , IAnnotatable { public Object getConstant ( ) throws JavaModelException ; String getElementName ( ) ; String getKey ( ) ; String getTypeSignature ( ) throws JavaModelException ; boolean isEnumConstant ( ) throws JavaModelException ; boolean isResolved ( ) ; } </s>
<s> package org . eclipse . jdt . core ; import org . eclipse . core . runtime . IProgressMonitor ; public interface ICodeAssist { void codeComplete ( int offset , ICodeCompletionRequestor requestor ) throws JavaModelException ; void codeComplete ( int offset , ICompletionRequestor requestor ) throws JavaModelException ; void codeComplete ( int offset , CompletionRequestor requestor ) throws JavaModelException ; void codeComplete ( int offset , CompletionRequestor requestor , IProgressMonitor monitor ) throws JavaModelException ; void codeComplete ( int offset , ICompletionRequestor requestor , WorkingCopyOwner owner ) throws JavaModelException ; void codeComplete ( int offset , CompletionRequestor requestor , WorkingCopyOwner owner ) throws JavaModelException ; void codeComplete ( int offset , CompletionRequestor requestor , WorkingCopyOwner owner , IProgressMonitor monitor ) throws JavaModelException ; IJavaElement [ ] codeSelect ( int offset , int length ) throws JavaModelException ; IJavaElement [ ] codeSelect ( int offset , int length , WorkingCopyOwner owner ) throws JavaModelException ; } </s>
<s> package org . eclipse . jdt . core ; import java . util . ArrayList ; import org . eclipse . jdt . core . compiler . CharOperation ; import org . eclipse . jdt . internal . compiler . parser . ScannerHelper ; import org . eclipse . jdt . internal . compiler . util . Util ; public final class Signature { public static final int ARRAY_TYPE_SIGNATURE = <NUM_LIT:4> ; public static final int BASE_TYPE_SIGNATURE = <NUM_LIT:2> ; private static final char [ ] BOOLEAN = "<STR_LIT:boolean>" . toCharArray ( ) ; private static final char [ ] BYTE = "<STR_LIT>" . toCharArray ( ) ; public static final char C_ARRAY = org . eclipse . jdt . internal . compiler . util . Util . C_ARRAY ; public static final char C_BOOLEAN = org . eclipse . jdt . internal . compiler . util . Util . C_BOOLEAN ; public static final char C_BYTE = org . eclipse . jdt . internal . compiler . util . Util . C_BYTE ; public static final char C_CAPTURE = org . eclipse . jdt . internal . compiler . util . Util . C_CAPTURE ; public static final char C_CHAR = org . eclipse . jdt . internal . compiler . util . Util . C_CHAR ; public static final char C_COLON = org . eclipse . jdt . internal . compiler . util . Util . C_COLON ; public static final char C_DOLLAR = org . eclipse . jdt . internal . compiler . util . Util . C_DOLLAR ; public static final char C_DOT = org . eclipse . jdt . internal . compiler . util . Util . C_DOT ; public static final char C_DOUBLE = org . eclipse . jdt . internal . compiler . util . Util . C_DOUBLE ; public static final char C_EXCEPTION_START = org . eclipse . jdt . internal . compiler . util . Util . C_EXCEPTION_START ; public static final char C_EXTENDS = org . eclipse . jdt . internal . compiler . util . Util . C_EXTENDS ; public static final char C_FLOAT = org . eclipse . jdt . internal . compiler . util . Util . C_FLOAT ; public static final char C_GENERIC_END = org . eclipse . jdt . internal . compiler . util . Util . C_GENERIC_END ; public static final char C_GENERIC_START = org . eclipse . jdt . internal . compiler . util . Util . C_GENERIC_START ; public static final char C_INT = org . eclipse . jdt . internal . compiler . util . Util . C_INT ; public static final char C_INTERSECTION = '<CHAR_LIT>' ; public static final char C_LONG = org . eclipse . jdt . internal . compiler . util . Util . C_LONG ; public static final char C_NAME_END = org . eclipse . jdt . internal . compiler . util . Util . C_NAME_END ; public static final char C_PARAM_END = org . eclipse . jdt . internal . compiler . util . Util . C_PARAM_END ; public static final char C_PARAM_START = org . eclipse . jdt . internal . compiler . util . Util . C_PARAM_START ; public static final char C_RESOLVED = org . eclipse . jdt . internal . compiler . util . Util . C_RESOLVED ; public static final char C_SEMICOLON = org . eclipse . jdt . internal . compiler . util . Util . C_SEMICOLON ; public static final char C_SHORT = org . eclipse . jdt . internal . compiler . util . Util . C_SHORT ; public static final char C_STAR = org . eclipse . jdt . internal . compiler . util . Util . C_STAR ; public static final char C_SUPER = org . eclipse . jdt . internal . compiler . util . Util . C_SUPER ; public static final char C_TYPE_VARIABLE = org . eclipse . jdt . internal . compiler . util . Util . C_TYPE_VARIABLE ; public static final char C_UNRESOLVED = org . eclipse . jdt . internal . compiler . util . Util . C_UNRESOLVED ; public static final char C_VOID = org . eclipse . jdt . internal . compiler . util . Util . C_VOID ; private static final char [ ] CAPTURE = "<STR_LIT>" . toCharArray ( ) ; public static final int CAPTURE_TYPE_SIGNATURE = <NUM_LIT:6> ; private static final char [ ] CHAR = "<STR_LIT>" . toCharArray ( ) ; public static final int CLASS_TYPE_SIGNATURE = <NUM_LIT:1> ; private static final char [ ] DOUBLE = "<STR_LIT:double>" . toCharArray ( ) ; private static final char [ ] EXTENDS = "<STR_LIT>" . toCharArray ( ) ; private static final char [ ] FLOAT = "<STR_LIT:float>" . toCharArray ( ) ; private static final char [ ] INT = "<STR_LIT:int>" . toCharArray ( ) ; public static final int INTERSECTION_TYPE_SIGNATURE = <NUM_LIT:7> ; private static final char [ ] LONG = "<STR_LIT:long>" . toCharArray ( ) ; private static final char [ ] SHORT = "<STR_LIT>" . toCharArray ( ) ; public static final String SIG_BOOLEAN = "<STR_LIT:Z>" ; public static final String SIG_BYTE = "<STR_LIT:B>" ; public static final String SIG_CHAR = "<STR_LIT:C>" ; public static final String SIG_DOUBLE = "<STR_LIT:D>" ; public static final String SIG_FLOAT = "<STR_LIT:F>" ; public static final String SIG_INT = "<STR_LIT:I>" ; public static final String SIG_LONG = "<STR_LIT>" ; public static final String SIG_SHORT = "<STR_LIT:S>" ; public static final String SIG_VOID = "<STR_LIT>" ; private static final char [ ] SUPER = "<STR_LIT>" . toCharArray ( ) ; public static final int TYPE_VARIABLE_SIGNATURE = <NUM_LIT:3> ; private static final char [ ] VOID = "<STR_LIT>" . toCharArray ( ) ; public static final int WILDCARD_TYPE_SIGNATURE = <NUM_LIT:5> ; private static void appendArgumentSimpleNames ( char [ ] name , int start , int end , StringBuffer buffer ) { buffer . append ( '<CHAR_LIT>' ) ; int depth = <NUM_LIT:0> ; int argumentStart = - <NUM_LIT:1> ; int argumentCount = <NUM_LIT:0> ; for ( int i = start ; i <= end ; i ++ ) { switch ( name [ i ] ) { case '<CHAR_LIT>' : depth ++ ; if ( depth == <NUM_LIT:1> ) { argumentStart = i + <NUM_LIT:1> ; } break ; case '<CHAR_LIT:>>' : if ( depth == <NUM_LIT:1> ) { if ( argumentCount > <NUM_LIT:0> ) buffer . append ( '<CHAR_LIT:U+002C>' ) ; appendSimpleName ( name , argumentStart , i - <NUM_LIT:1> , buffer ) ; argumentCount ++ ; } depth -- ; break ; case '<CHAR_LIT:U+002C>' : if ( depth == <NUM_LIT:1> ) { if ( argumentCount > <NUM_LIT:0> ) buffer . append ( '<CHAR_LIT:U+002C>' ) ; appendSimpleName ( name , argumentStart , i - <NUM_LIT:1> , buffer ) ; argumentCount ++ ; argumentStart = i + <NUM_LIT:1> ; } break ; } } buffer . append ( '<CHAR_LIT:>>' ) ; } private static int appendArrayTypeSignature ( char [ ] string , int start , boolean fullyQualifyTypeNames , StringBuffer buffer ) { return appendArrayTypeSignature ( string , start , fullyQualifyTypeNames , buffer , false ) ; } private static int appendArrayTypeSignature ( char [ ] string , int start , boolean fullyQualifyTypeNames , StringBuffer buffer , boolean isVarArgs ) { int length = string . length ; if ( start >= length - <NUM_LIT:1> ) { throw new IllegalArgumentException ( ) ; } char c = string [ start ] ; if ( c != C_ARRAY ) { throw new IllegalArgumentException ( ) ; } int index = start ; c = string [ ++ index ] ; while ( c == C_ARRAY ) { if ( index >= length - <NUM_LIT:1> ) { throw new IllegalArgumentException ( ) ; } c = string [ ++ index ] ; } int e = appendTypeSignature ( string , index , fullyQualifyTypeNames , buffer ) ; for ( int i = <NUM_LIT:1> , dims = index - start ; i < dims ; i ++ ) { buffer . append ( '<CHAR_LIT:[>' ) . append ( '<CHAR_LIT:]>' ) ; } if ( isVarArgs ) { buffer . append ( '<CHAR_LIT:.>' ) . append ( '<CHAR_LIT:.>' ) . append ( '<CHAR_LIT:.>' ) ; } else { buffer . append ( '<CHAR_LIT:[>' ) . append ( '<CHAR_LIT:]>' ) ; } return e ; } private static int appendCaptureTypeSignature ( char [ ] string , int start , boolean fullyQualifyTypeNames , StringBuffer buffer ) { if ( start >= string . length - <NUM_LIT:1> ) { throw new IllegalArgumentException ( ) ; } char c = string [ start ] ; if ( c != C_CAPTURE ) { throw new IllegalArgumentException ( ) ; } buffer . append ( CAPTURE ) . append ( '<CHAR_LIT:U+0020>' ) ; return appendTypeArgumentSignature ( string , start + <NUM_LIT:1> , fullyQualifyTypeNames , buffer ) ; } private static int appendClassTypeSignature ( char [ ] string , int start , boolean fullyQualifyTypeNames , StringBuffer buffer ) { if ( start >= string . length - <NUM_LIT:2> ) { throw new IllegalArgumentException ( ) ; } char c = string [ start ] ; if ( c != C_RESOLVED && c != C_UNRESOLVED ) { throw new IllegalArgumentException ( ) ; } boolean resolved = ( c == C_RESOLVED ) ; boolean removePackageQualifiers = ! fullyQualifyTypeNames ; if ( ! resolved ) { removePackageQualifiers = false ; } int p = start + <NUM_LIT:1> ; int checkpoint = buffer . length ( ) ; int innerTypeStart = - <NUM_LIT:1> ; boolean inAnonymousType = false ; while ( true ) { if ( p >= string . length ) { throw new IllegalArgumentException ( ) ; } c = string [ p ] ; switch ( c ) { case C_SEMICOLON : return p ; case C_GENERIC_START : int e = appendTypeArgumentSignatures ( string , p , fullyQualifyTypeNames , buffer ) ; removePackageQualifiers = false ; p = e ; break ; case C_DOT : if ( removePackageQualifiers ) { buffer . setLength ( checkpoint ) ; } else { buffer . append ( '<CHAR_LIT:.>' ) ; } break ; case '<CHAR_LIT:/>' : if ( removePackageQualifiers ) { buffer . setLength ( checkpoint ) ; } else { buffer . append ( '<CHAR_LIT:/>' ) ; } break ; case C_DOLLAR : innerTypeStart = buffer . length ( ) ; inAnonymousType = false ; if ( resolved ) { removePackageQualifiers = false ; buffer . append ( '<CHAR_LIT:.>' ) ; } break ; default : if ( innerTypeStart != - <NUM_LIT:1> && ! inAnonymousType && Character . isDigit ( c ) ) { inAnonymousType = true ; buffer . setLength ( innerTypeStart ) ; buffer . insert ( checkpoint , "<STR_LIT>" ) ; buffer . append ( "<STR_LIT>" ) ; } if ( ! inAnonymousType ) buffer . append ( c ) ; innerTypeStart = - <NUM_LIT:1> ; } p ++ ; } } private static int appendIntersectionTypeSignature ( char [ ] string , int start , boolean fullyQualifyTypeNames , StringBuffer buffer ) { if ( start >= string . length - <NUM_LIT:1> ) { throw new IllegalArgumentException ( ) ; } char c = string [ start ] ; if ( c != C_INTERSECTION ) { throw new IllegalArgumentException ( ) ; } start = appendClassTypeSignature ( string , start + <NUM_LIT:1> , fullyQualifyTypeNames , buffer ) ; if ( start < string . length - <NUM_LIT:1> ) { start ++ ; if ( string [ start ] != C_COLON ) { throw new IllegalArgumentException ( "<STR_LIT>" ) ; } while ( string [ start ] == C_COLON ) { buffer . append ( "<STR_LIT>" ) ; start = appendClassTypeSignature ( string , start + <NUM_LIT:1> , fullyQualifyTypeNames , buffer ) ; if ( start == string . length - <NUM_LIT:1> ) { return start ; } else if ( start > string . length - <NUM_LIT:1> ) { throw new IllegalArgumentException ( "<STR_LIT>" ) ; } start ++ ; } } return start ; } private static void appendSimpleName ( char [ ] name , int start , int end , StringBuffer buffer ) { int lastDot = - <NUM_LIT:1> , lastGenericStart = - <NUM_LIT:1> , lastGenericEnd = - <NUM_LIT:1> ; int depth = <NUM_LIT:0> ; if ( name [ start ] == '<CHAR_LIT>' ) { buffer . append ( "<STR_LIT:?>" ) ; int index = consumeWhitespace ( name , start + <NUM_LIT:1> , end + <NUM_LIT:1> ) ; switch ( name [ index ] ) { case '<CHAR_LIT:e>' : int checkPos = checkName ( EXTENDS , name , index , end ) ; if ( checkPos > <NUM_LIT:0> ) { buffer . append ( '<CHAR_LIT:U+0020>' ) . append ( EXTENDS ) . append ( '<CHAR_LIT:U+0020>' ) ; index = consumeWhitespace ( name , checkPos , end + <NUM_LIT:1> ) ; } break ; case '<CHAR_LIT>' : checkPos = checkName ( SUPER , name , index , end + <NUM_LIT:1> ) ; if ( checkPos > <NUM_LIT:0> ) { buffer . append ( '<CHAR_LIT:U+0020>' ) . append ( SUPER ) . append ( '<CHAR_LIT:U+0020>' ) ; index = consumeWhitespace ( name , checkPos , end + <NUM_LIT:1> ) ; } break ; } start = index ; } lastDotLookup : for ( int i = end ; i >= start ; i -- ) { switch ( name [ i ] ) { case '<CHAR_LIT:.>' : if ( depth == <NUM_LIT:0> ) { lastDot = i ; char c = name [ start ] ; if ( c == C_EXTENDS || c == C_SUPER ) { buffer . append ( c ) ; } break lastDotLookup ; } break ; case '<CHAR_LIT>' : depth -- ; if ( depth == <NUM_LIT:0> ) lastGenericStart = i ; break ; case '<CHAR_LIT:>>' : if ( depth == <NUM_LIT:0> ) lastGenericEnd = i ; depth ++ ; break ; } } int nameStart = lastDot < <NUM_LIT:0> ? start : lastDot + <NUM_LIT:1> ; int nameEnd = lastGenericStart < <NUM_LIT:0> ? end + <NUM_LIT:1> : lastGenericStart ; buffer . append ( name , nameStart , nameEnd - nameStart ) ; if ( lastGenericStart >= <NUM_LIT:0> ) { appendArgumentSimpleNames ( name , lastGenericStart , lastGenericEnd , buffer ) ; buffer . append ( name , lastGenericEnd + <NUM_LIT:1> , end - lastGenericEnd ) ; } } private static int appendTypeArgumentSignature ( char [ ] string , int start , boolean fullyQualifyTypeNames , StringBuffer buffer ) { if ( start >= string . length ) { throw new IllegalArgumentException ( ) ; } char c = string [ start ] ; switch ( c ) { case C_STAR : buffer . append ( '<CHAR_LIT>' ) ; return start ; case C_EXTENDS : buffer . append ( "<STR_LIT>" ) ; return appendTypeSignature ( string , start + <NUM_LIT:1> , fullyQualifyTypeNames , buffer ) ; case C_SUPER : buffer . append ( "<STR_LIT>" ) ; return appendTypeSignature ( string , start + <NUM_LIT:1> , fullyQualifyTypeNames , buffer ) ; default : return appendTypeSignature ( string , start , fullyQualifyTypeNames , buffer ) ; } } private static int appendTypeArgumentSignatures ( char [ ] string , int start , boolean fullyQualifyTypeNames , StringBuffer buffer ) { if ( start >= string . length - <NUM_LIT:1> ) { throw new IllegalArgumentException ( ) ; } char c = string [ start ] ; if ( c != C_GENERIC_START ) { throw new IllegalArgumentException ( ) ; } buffer . append ( '<CHAR_LIT>' ) ; int p = start + <NUM_LIT:1> ; int count = <NUM_LIT:0> ; while ( true ) { if ( p >= string . length ) { throw new IllegalArgumentException ( ) ; } c = string [ p ] ; if ( c == C_GENERIC_END ) { buffer . append ( '<CHAR_LIT:>>' ) ; return p ; } if ( count != <NUM_LIT:0> ) { buffer . append ( '<CHAR_LIT:U+002C>' ) ; } int e = appendTypeArgumentSignature ( string , p , fullyQualifyTypeNames , buffer ) ; count ++ ; p = e + <NUM_LIT:1> ; } } private static int appendTypeSignature ( char [ ] string , int start , boolean fullyQualifyTypeNames , StringBuffer buffer ) { return appendTypeSignature ( string , start , fullyQualifyTypeNames , buffer , false ) ; } private static int appendTypeSignature ( char [ ] string , int start , boolean fullyQualifyTypeNames , StringBuffer buffer , boolean isVarArgs ) { if ( start >= string . length ) { throw new IllegalArgumentException ( ) ; } char c = string [ start ] ; if ( isVarArgs ) { switch ( c ) { case C_ARRAY : return appendArrayTypeSignature ( string , start , fullyQualifyTypeNames , buffer , true ) ; case C_RESOLVED : case C_UNRESOLVED : case C_TYPE_VARIABLE : case C_BOOLEAN : case C_BYTE : case C_CHAR : case C_DOUBLE : case C_FLOAT : case C_INT : case C_LONG : case C_SHORT : case C_VOID : case C_STAR : case C_EXTENDS : case C_SUPER : case C_CAPTURE : case C_INTERSECTION : default : throw new IllegalArgumentException ( ) ; } } else { switch ( c ) { case C_ARRAY : return appendArrayTypeSignature ( string , start , fullyQualifyTypeNames , buffer ) ; case C_RESOLVED : case C_UNRESOLVED : return appendClassTypeSignature ( string , start , fullyQualifyTypeNames , buffer ) ; case C_TYPE_VARIABLE : int e = Util . scanTypeVariableSignature ( string , start ) ; buffer . append ( string , start + <NUM_LIT:1> , e - start - <NUM_LIT:1> ) ; return e ; case C_BOOLEAN : buffer . append ( BOOLEAN ) ; return start ; case C_BYTE : buffer . append ( BYTE ) ; return start ; case C_CHAR : buffer . append ( CHAR ) ; return start ; case C_DOUBLE : buffer . append ( DOUBLE ) ; return start ; case C_FLOAT : buffer . append ( FLOAT ) ; return start ; case C_INT : buffer . append ( INT ) ; return start ; case C_LONG : buffer . append ( LONG ) ; return start ; case C_SHORT : buffer . append ( SHORT ) ; return start ; case C_VOID : buffer . append ( VOID ) ; return start ; case C_CAPTURE : return appendCaptureTypeSignature ( string , start , fullyQualifyTypeNames , buffer ) ; case C_INTERSECTION : return appendIntersectionTypeSignature ( string , start , fullyQualifyTypeNames , buffer ) ; case C_STAR : case C_EXTENDS : case C_SUPER : return appendTypeArgumentSignature ( string , start , fullyQualifyTypeNames , buffer ) ; default : throw new IllegalArgumentException ( ) ; } } } private static int checkArrayDimension ( char [ ] typeName , int pos , int length ) { int genericBalance = <NUM_LIT:0> ; while ( pos < length ) { switch ( typeName [ pos ] ) { case '<CHAR_LIT>' : genericBalance ++ ; break ; case '<CHAR_LIT:U+002C>' : if ( genericBalance == <NUM_LIT:0> ) return - <NUM_LIT:1> ; break ; case '<CHAR_LIT:>>' : if ( genericBalance == <NUM_LIT:0> ) return - <NUM_LIT:1> ; genericBalance -- ; break ; case '<CHAR_LIT:[>' : if ( genericBalance == <NUM_LIT:0> ) { return pos ; } } pos ++ ; } return - <NUM_LIT:1> ; } private static int checkName ( char [ ] name , char [ ] typeName , int pos , int length ) { if ( CharOperation . fragmentEquals ( name , typeName , pos , true ) ) { pos += name . length ; if ( pos == length ) return pos ; char currentChar = typeName [ pos ] ; switch ( currentChar ) { case '<CHAR_LIT:U+0020>' : case '<CHAR_LIT:.>' : case '<CHAR_LIT>' : case '<CHAR_LIT:>>' : case '<CHAR_LIT:[>' : case '<CHAR_LIT:U+002C>' : return pos ; default : if ( ScannerHelper . isWhitespace ( currentChar ) ) return pos ; } } return - <NUM_LIT:1> ; } private static int checkNextChar ( char [ ] typeName , char expectedChar , int pos , int length , boolean isOptional ) { pos = consumeWhitespace ( typeName , pos , length ) ; if ( pos < length && typeName [ pos ] == expectedChar ) return pos + <NUM_LIT:1> ; if ( ! isOptional ) throw new IllegalArgumentException ( new String ( typeName ) ) ; return - <NUM_LIT:1> ; } private static int consumeWhitespace ( char [ ] typeName , int pos , int length ) { while ( pos < length ) { char currentChar = typeName [ pos ] ; if ( currentChar != '<CHAR_LIT:U+0020>' && ! ScannerHelper . isWhitespace ( currentChar ) ) { break ; } pos ++ ; } return pos ; } public static char [ ] createArraySignature ( char [ ] typeSignature , int arrayCount ) { if ( arrayCount == <NUM_LIT:0> ) return typeSignature ; int sigLength = typeSignature . length ; char [ ] result = new char [ arrayCount + sigLength ] ; for ( int i = <NUM_LIT:0> ; i < arrayCount ; i ++ ) { result [ i ] = C_ARRAY ; } System . arraycopy ( typeSignature , <NUM_LIT:0> , result , arrayCount , sigLength ) ; return result ; } public static String createArraySignature ( String typeSignature , int arrayCount ) { return new String ( createArraySignature ( typeSignature . toCharArray ( ) , arrayCount ) ) ; } public static char [ ] createCharArrayTypeSignature ( char [ ] typeName , boolean isResolved ) { if ( typeName == null ) throw new IllegalArgumentException ( "<STR_LIT:null>" ) ; int length = typeName . length ; if ( length == <NUM_LIT:0> ) throw new IllegalArgumentException ( new String ( typeName ) ) ; StringBuffer buffer = new StringBuffer ( <NUM_LIT:5> ) ; int pos = encodeTypeSignature ( typeName , <NUM_LIT:0> , isResolved , length , buffer ) ; pos = consumeWhitespace ( typeName , pos , length ) ; if ( pos < length ) throw new IllegalArgumentException ( new String ( typeName ) ) ; char [ ] result = new char [ length = buffer . length ( ) ] ; buffer . getChars ( <NUM_LIT:0> , length , result , <NUM_LIT:0> ) ; return result ; } public static String createIntersectionTypeSignature ( char [ ] [ ] typeSignatures ) { StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( Signature . C_INTERSECTION ) ; for ( int i = <NUM_LIT:0> , max = typeSignatures . length ; i < max ; i ++ ) { if ( i > <NUM_LIT:0> ) { buffer . append ( Signature . C_COLON ) ; } buffer . append ( typeSignatures [ i ] ) ; } return String . valueOf ( buffer ) ; } public static String createIntersectionTypeSignature ( String [ ] typeSignatures ) { int typeSignaturesLenth = typeSignatures . length ; char [ ] [ ] signatures = new char [ typeSignaturesLenth ] [ ] ; for ( int i = <NUM_LIT:0> ; i < typeSignaturesLenth ; i ++ ) { signatures [ i ] = typeSignatures [ i ] . toCharArray ( ) ; } return createIntersectionTypeSignature ( signatures ) ; } public static char [ ] createMethodSignature ( char [ ] [ ] parameterTypes , char [ ] returnType ) { int parameterTypesLength = parameterTypes . length ; int parameterLength = <NUM_LIT:0> ; for ( int i = <NUM_LIT:0> ; i < parameterTypesLength ; i ++ ) { parameterLength += parameterTypes [ i ] . length ; } int returnTypeLength = returnType . length ; char [ ] result = new char [ <NUM_LIT:1> + parameterLength + <NUM_LIT:1> + returnTypeLength ] ; result [ <NUM_LIT:0> ] = C_PARAM_START ; int index = <NUM_LIT:1> ; for ( int i = <NUM_LIT:0> ; i < parameterTypesLength ; i ++ ) { char [ ] parameterType = parameterTypes [ i ] ; int length = parameterType . length ; System . arraycopy ( parameterType , <NUM_LIT:0> , result , index , length ) ; index += length ; } result [ index ] = C_PARAM_END ; System . arraycopy ( returnType , <NUM_LIT:0> , result , index + <NUM_LIT:1> , returnTypeLength ) ; return result ; } public static String createMethodSignature ( String [ ] parameterTypes , String returnType ) { int parameterTypesLenth = parameterTypes . length ; char [ ] [ ] parameters = new char [ parameterTypesLenth ] [ ] ; for ( int i = <NUM_LIT:0> ; i < parameterTypesLenth ; i ++ ) { parameters [ i ] = parameterTypes [ i ] . toCharArray ( ) ; } return new String ( createMethodSignature ( parameters , returnType . toCharArray ( ) ) ) ; } public static char [ ] createTypeParameterSignature ( char [ ] typeParameterName , char [ ] [ ] boundSignatures ) { int length = boundSignatures . length ; if ( length == <NUM_LIT:0> ) { return CharOperation . append ( typeParameterName , C_COLON ) ; } int boundsSize = <NUM_LIT:0> ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { boundsSize += boundSignatures [ i ] . length + <NUM_LIT:1> ; } int nameLength = typeParameterName . length ; char [ ] result = new char [ nameLength + boundsSize ] ; System . arraycopy ( typeParameterName , <NUM_LIT:0> , result , <NUM_LIT:0> , nameLength ) ; int index = nameLength ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { result [ index ++ ] = C_COLON ; int boundLength = boundSignatures [ i ] . length ; System . arraycopy ( boundSignatures [ i ] , <NUM_LIT:0> , result , index , boundLength ) ; index += boundLength ; } return result ; } public static String createTypeParameterSignature ( String typeParameterName , String [ ] boundSignatures ) { int length = boundSignatures . length ; char [ ] [ ] boundSignatureChars = new char [ length ] [ ] ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { boundSignatureChars [ i ] = boundSignatures [ i ] . toCharArray ( ) ; } return new String ( createTypeParameterSignature ( typeParameterName . toCharArray ( ) , boundSignatureChars ) ) ; } public static String createTypeSignature ( char [ ] typeName , boolean isResolved ) { return new String ( createCharArrayTypeSignature ( typeName , isResolved ) ) ; } public static String createTypeSignature ( String typeName , boolean isResolved ) { return createTypeSignature ( typeName == null ? null : typeName . toCharArray ( ) , isResolved ) ; } private static int encodeArrayDimension ( char [ ] typeName , int pos , int length , StringBuffer buffer ) { int checkPos ; while ( pos < length && ( checkPos = checkNextChar ( typeName , '<CHAR_LIT:[>' , pos , length , true ) ) > <NUM_LIT:0> ) { pos = checkNextChar ( typeName , '<CHAR_LIT:]>' , checkPos , length , false ) ; buffer . append ( C_ARRAY ) ; } return pos ; } private static int encodeQualifiedName ( char [ ] typeName , int pos , int length , StringBuffer buffer ) { int count = <NUM_LIT:0> ; char lastAppendedChar = <NUM_LIT:0> ; nameLoop : while ( pos < length ) { char currentChar = typeName [ pos ] ; switch ( currentChar ) { case '<CHAR_LIT>' : case '<CHAR_LIT:>>' : case '<CHAR_LIT:[>' : case '<CHAR_LIT:U+002C>' : break nameLoop ; case '<CHAR_LIT:.>' : buffer . append ( C_DOT ) ; lastAppendedChar = C_DOT ; count ++ ; break ; default : if ( currentChar == '<CHAR_LIT:U+0020>' || ScannerHelper . isWhitespace ( currentChar ) ) { if ( lastAppendedChar == C_DOT ) { pos = consumeWhitespace ( typeName , pos , length ) - <NUM_LIT:1> ; break ; } int checkPos = checkNextChar ( typeName , '<CHAR_LIT:.>' , pos , length , true ) ; if ( checkPos > <NUM_LIT:0> ) { buffer . append ( C_DOT ) ; lastAppendedChar = C_DOT ; count ++ ; pos = checkPos ; break ; } break nameLoop ; } buffer . append ( currentChar ) ; lastAppendedChar = currentChar ; count ++ ; break ; } pos ++ ; } if ( count == <NUM_LIT:0> ) throw new IllegalArgumentException ( new String ( typeName ) ) ; return pos ; } private static int encodeTypeSignature ( char [ ] typeName , int start , boolean isResolved , int length , StringBuffer buffer ) { int pos = start ; pos = consumeWhitespace ( typeName , pos , length ) ; if ( pos >= length ) throw new IllegalArgumentException ( new String ( typeName ) ) ; int checkPos ; char currentChar = typeName [ pos ] ; switch ( currentChar ) { case '<CHAR_LIT:b>' : checkPos = checkName ( BOOLEAN , typeName , pos , length ) ; if ( checkPos > <NUM_LIT:0> ) { pos = encodeArrayDimension ( typeName , checkPos , length , buffer ) ; buffer . append ( C_BOOLEAN ) ; return pos ; } checkPos = checkName ( BYTE , typeName , pos , length ) ; if ( checkPos > <NUM_LIT:0> ) { pos = encodeArrayDimension ( typeName , checkPos , length , buffer ) ; buffer . append ( C_BYTE ) ; return pos ; } break ; case '<CHAR_LIT>' : checkPos = checkName ( DOUBLE , typeName , pos , length ) ; if ( checkPos > <NUM_LIT:0> ) { pos = encodeArrayDimension ( typeName , checkPos , length , buffer ) ; buffer . append ( C_DOUBLE ) ; return pos ; } break ; case '<CHAR_LIT>' : checkPos = checkName ( FLOAT , typeName , pos , length ) ; if ( checkPos > <NUM_LIT:0> ) { pos = encodeArrayDimension ( typeName , checkPos , length , buffer ) ; buffer . append ( C_FLOAT ) ; return pos ; } break ; case '<CHAR_LIT>' : checkPos = checkName ( INT , typeName , pos , length ) ; if ( checkPos > <NUM_LIT:0> ) { pos = encodeArrayDimension ( typeName , checkPos , length , buffer ) ; buffer . append ( C_INT ) ; return pos ; } break ; case '<CHAR_LIT>' : checkPos = checkName ( LONG , typeName , pos , length ) ; if ( checkPos > <NUM_LIT:0> ) { pos = encodeArrayDimension ( typeName , checkPos , length , buffer ) ; buffer . append ( C_LONG ) ; return pos ; } break ; case '<CHAR_LIT>' : checkPos = checkName ( SHORT , typeName , pos , length ) ; if ( checkPos > <NUM_LIT:0> ) { pos = encodeArrayDimension ( typeName , checkPos , length , buffer ) ; buffer . append ( C_SHORT ) ; return pos ; } break ; case '<CHAR_LIT>' : checkPos = checkName ( VOID , typeName , pos , length ) ; if ( checkPos > <NUM_LIT:0> ) { pos = encodeArrayDimension ( typeName , checkPos , length , buffer ) ; buffer . append ( C_VOID ) ; return pos ; } break ; case '<CHAR_LIT:c>' : checkPos = checkName ( CHAR , typeName , pos , length ) ; if ( checkPos > <NUM_LIT:0> ) { pos = encodeArrayDimension ( typeName , checkPos , length , buffer ) ; buffer . append ( C_CHAR ) ; return pos ; } else { checkPos = checkName ( CAPTURE , typeName , pos , length ) ; if ( checkPos > <NUM_LIT:0> ) { pos = consumeWhitespace ( typeName , checkPos , length ) ; if ( typeName [ pos ] != '<CHAR_LIT>' ) { break ; } } else { break ; } } buffer . append ( C_CAPTURE ) ; case '<CHAR_LIT>' : pos = consumeWhitespace ( typeName , pos + <NUM_LIT:1> , length ) ; checkPos = checkName ( EXTENDS , typeName , pos , length ) ; if ( checkPos > <NUM_LIT:0> ) { buffer . append ( C_EXTENDS ) ; pos = encodeTypeSignature ( typeName , checkPos , isResolved , length , buffer ) ; return pos ; } checkPos = checkName ( SUPER , typeName , pos , length ) ; if ( checkPos > <NUM_LIT:0> ) { buffer . append ( C_SUPER ) ; pos = encodeTypeSignature ( typeName , checkPos , isResolved , length , buffer ) ; return pos ; } buffer . append ( C_STAR ) ; return pos ; } checkPos = checkArrayDimension ( typeName , pos , length ) ; int end ; if ( checkPos > <NUM_LIT:0> ) { end = encodeArrayDimension ( typeName , checkPos , length , buffer ) ; } else { end = - <NUM_LIT:1> ; } buffer . append ( isResolved ? C_RESOLVED : C_UNRESOLVED ) ; while ( true ) { pos = encodeQualifiedName ( typeName , pos , length , buffer ) ; checkPos = checkNextChar ( typeName , '<CHAR_LIT>' , pos , length , true ) ; if ( checkPos > <NUM_LIT:0> ) { buffer . append ( C_GENERIC_START ) ; if ( ( pos = checkNextChar ( typeName , '<CHAR_LIT:>>' , checkPos , length , true ) ) > <NUM_LIT:0> ) { buffer . append ( C_GENERIC_END ) ; } else { pos = encodeTypeSignature ( typeName , checkPos , isResolved , length , buffer ) ; while ( ( checkPos = checkNextChar ( typeName , '<CHAR_LIT:U+002C>' , pos , length , true ) ) > <NUM_LIT:0> ) { pos = encodeTypeSignature ( typeName , checkPos , isResolved , length , buffer ) ; } pos = checkNextChar ( typeName , '<CHAR_LIT:>>' , pos , length , false ) ; buffer . append ( C_GENERIC_END ) ; } } checkPos = checkNextChar ( typeName , '<CHAR_LIT:.>' , pos , length , true ) ; if ( checkPos > <NUM_LIT:0> ) { buffer . append ( C_DOT ) ; pos = checkPos ; } else { break ; } } buffer . append ( C_NAME_END ) ; if ( end > <NUM_LIT:0> ) pos = end ; return pos ; } public static int getArrayCount ( char [ ] typeSignature ) throws IllegalArgumentException { try { int count = <NUM_LIT:0> ; while ( typeSignature [ count ] == C_ARRAY ) { ++ count ; } return count ; } catch ( ArrayIndexOutOfBoundsException e ) { throw new IllegalArgumentException ( ) ; } } public static int getArrayCount ( String typeSignature ) throws IllegalArgumentException { return getArrayCount ( typeSignature . toCharArray ( ) ) ; } public static char [ ] getElementType ( char [ ] typeSignature ) throws IllegalArgumentException { int count = getArrayCount ( typeSignature ) ; if ( count == <NUM_LIT:0> ) return typeSignature ; int length = typeSignature . length ; char [ ] result = new char [ length - count ] ; System . arraycopy ( typeSignature , count , result , <NUM_LIT:0> , length - count ) ; return result ; } public static String getElementType ( String typeSignature ) throws IllegalArgumentException { char [ ] signature = typeSignature . toCharArray ( ) ; char [ ] elementType = getElementType ( signature ) ; return signature == elementType ? typeSignature : new String ( elementType ) ; } public static char [ ] [ ] getIntersectionTypeBounds ( char [ ] intersectionTypeSignature ) throws IllegalArgumentException { if ( getTypeSignatureKind ( intersectionTypeSignature ) != INTERSECTION_TYPE_SIGNATURE ) { return CharOperation . NO_CHAR_CHAR ; } ArrayList args = new ArrayList ( ) ; int i = <NUM_LIT:1> ; int length = intersectionTypeSignature . length ; for ( ; ; ) { int e = Util . scanClassTypeSignature ( intersectionTypeSignature , i ) ; if ( e < <NUM_LIT:0> ) { throw new IllegalArgumentException ( "<STR_LIT>" ) ; } args . add ( CharOperation . subarray ( intersectionTypeSignature , i , e + <NUM_LIT:1> ) ) ; if ( e == length - <NUM_LIT:1> ) { int size = args . size ( ) ; char [ ] [ ] result = new char [ size ] [ ] ; args . toArray ( result ) ; return result ; } else if ( intersectionTypeSignature [ e + <NUM_LIT:1> ] != C_COLON ) { throw new IllegalArgumentException ( "<STR_LIT>" ) ; } i = e + <NUM_LIT:2> ; } } public static String [ ] getIntersectionTypeBounds ( String intersectionTypeSignature ) throws IllegalArgumentException { char [ ] [ ] args = getIntersectionTypeBounds ( intersectionTypeSignature . toCharArray ( ) ) ; return CharOperation . toStrings ( args ) ; } public static int getParameterCount ( char [ ] methodSignature ) throws IllegalArgumentException { try { int count = <NUM_LIT:0> ; int i = CharOperation . indexOf ( C_PARAM_START , methodSignature ) ; if ( i < <NUM_LIT:0> ) { throw new IllegalArgumentException ( ) ; } else { i ++ ; } for ( ; ; ) { if ( methodSignature [ i ] == C_PARAM_END ) { return count ; } int e = Util . scanTypeSignature ( methodSignature , i ) ; if ( e < <NUM_LIT:0> ) { throw new IllegalArgumentException ( ) ; } else { i = e + <NUM_LIT:1> ; } count ++ ; } } catch ( ArrayIndexOutOfBoundsException e ) { throw new IllegalArgumentException ( ) ; } } public static int getParameterCount ( String methodSignature ) throws IllegalArgumentException { return getParameterCount ( methodSignature . toCharArray ( ) ) ; } public static char [ ] [ ] getParameterTypes ( char [ ] methodSignature ) throws IllegalArgumentException { try { int count = getParameterCount ( methodSignature ) ; char [ ] [ ] result = new char [ count ] [ ] ; if ( count == <NUM_LIT:0> ) { return result ; } int i = CharOperation . indexOf ( C_PARAM_START , methodSignature ) ; if ( i < <NUM_LIT:0> ) { throw new IllegalArgumentException ( ) ; } else { i ++ ; } int t = <NUM_LIT:0> ; for ( ; ; ) { if ( methodSignature [ i ] == C_PARAM_END ) { return result ; } int e = Util . scanTypeSignature ( methodSignature , i ) ; if ( e < <NUM_LIT:0> ) { throw new IllegalArgumentException ( ) ; } result [ t ] = CharOperation . subarray ( methodSignature , i , e + <NUM_LIT:1> ) ; t ++ ; i = e + <NUM_LIT:1> ; } } catch ( ArrayIndexOutOfBoundsException e ) { throw new IllegalArgumentException ( ) ; } } public static String [ ] getParameterTypes ( String methodSignature ) throws IllegalArgumentException { char [ ] [ ] parameterTypes = getParameterTypes ( methodSignature . toCharArray ( ) ) ; return CharOperation . toStrings ( parameterTypes ) ; } public static char [ ] getQualifier ( char [ ] name ) { int firstGenericStart = CharOperation . indexOf ( C_GENERIC_START , name ) ; int lastDot = CharOperation . lastIndexOf ( C_DOT , name , <NUM_LIT:0> , firstGenericStart == - <NUM_LIT:1> ? name . length - <NUM_LIT:1> : firstGenericStart ) ; if ( lastDot == - <NUM_LIT:1> ) { return CharOperation . NO_CHAR ; } return CharOperation . subarray ( name , <NUM_LIT:0> , lastDot ) ; } public static String getQualifier ( String name ) { char [ ] qualifier = getQualifier ( name . toCharArray ( ) ) ; if ( qualifier . length == <NUM_LIT:0> ) return org . eclipse . jdt . internal . compiler . util . Util . EMPTY_STRING ; return new String ( qualifier ) ; } public static char [ ] getReturnType ( char [ ] methodSignature ) throws IllegalArgumentException { int paren = CharOperation . lastIndexOf ( C_PARAM_END , methodSignature ) ; if ( paren == - <NUM_LIT:1> ) { throw new IllegalArgumentException ( ) ; } int last = Util . scanTypeSignature ( methodSignature , paren + <NUM_LIT:1> ) ; return CharOperation . subarray ( methodSignature , paren + <NUM_LIT:1> , last + <NUM_LIT:1> ) ; } public static String getReturnType ( String methodSignature ) throws IllegalArgumentException { return new String ( getReturnType ( methodSignature . toCharArray ( ) ) ) ; } public static char [ ] getSignatureQualifier ( char [ ] typeSignature ) { if ( typeSignature == null ) return CharOperation . NO_CHAR ; char [ ] qualifiedType = Signature . toCharArray ( typeSignature ) ; int dotCount = <NUM_LIT:0> ; indexFound : for ( int i = <NUM_LIT:0> ; i < typeSignature . length ; i ++ ) { switch ( typeSignature [ i ] ) { case C_DOT : dotCount ++ ; break ; case C_GENERIC_START : break indexFound ; case C_DOLLAR : break indexFound ; } } if ( dotCount > <NUM_LIT:0> ) { for ( int i = <NUM_LIT:0> ; i < qualifiedType . length ; i ++ ) { if ( qualifiedType [ i ] == '<CHAR_LIT:.>' ) { dotCount -- ; } if ( dotCount <= <NUM_LIT:0> ) { return CharOperation . subarray ( qualifiedType , <NUM_LIT:0> , i ) ; } } } return CharOperation . NO_CHAR ; } public static String getSignatureQualifier ( String typeSignature ) { return new String ( getSignatureQualifier ( typeSignature == null ? null : typeSignature . toCharArray ( ) ) ) ; } public static char [ ] getSignatureSimpleName ( char [ ] typeSignature ) { if ( typeSignature == null ) return CharOperation . NO_CHAR ; char [ ] qualifiedType = Signature . toCharArray ( typeSignature ) ; int dotCount = <NUM_LIT:0> ; indexFound : for ( int i = <NUM_LIT:0> ; i < typeSignature . length ; i ++ ) { switch ( typeSignature [ i ] ) { case C_DOT : dotCount ++ ; break ; case C_GENERIC_START : break indexFound ; case C_DOLLAR : break indexFound ; } } if ( dotCount > <NUM_LIT:0> ) { for ( int i = <NUM_LIT:0> ; i < qualifiedType . length ; i ++ ) { if ( qualifiedType [ i ] == '<CHAR_LIT:.>' ) { dotCount -- ; } if ( dotCount <= <NUM_LIT:0> ) { return CharOperation . subarray ( qualifiedType , i + <NUM_LIT:1> , qualifiedType . length ) ; } } } return qualifiedType ; } public static String getSignatureSimpleName ( String typeSignature ) { return new String ( getSignatureSimpleName ( typeSignature == null ? null : typeSignature . toCharArray ( ) ) ) ; } public static char [ ] getSimpleName ( char [ ] name ) { int lastDot = - <NUM_LIT:1> , lastGenericStart = - <NUM_LIT:1> , lastGenericEnd = - <NUM_LIT:1> ; int depth = <NUM_LIT:0> ; int length = name . length ; lastDotLookup : for ( int i = length - <NUM_LIT:1> ; i >= <NUM_LIT:0> ; i -- ) { switch ( name [ i ] ) { case '<CHAR_LIT:.>' : if ( depth == <NUM_LIT:0> ) { lastDot = i ; break lastDotLookup ; } break ; case '<CHAR_LIT>' : depth -- ; if ( depth == <NUM_LIT:0> ) lastGenericStart = i ; break ; case '<CHAR_LIT:>>' : if ( depth == <NUM_LIT:0> ) lastGenericEnd = i ; depth ++ ; break ; } } if ( lastGenericStart < <NUM_LIT:0> ) { if ( lastDot < <NUM_LIT:0> ) { return name ; } return CharOperation . subarray ( name , lastDot + <NUM_LIT:1> , length ) ; } StringBuffer buffer = new StringBuffer ( <NUM_LIT:10> ) ; int nameStart = lastDot < <NUM_LIT:0> ? <NUM_LIT:0> : lastDot + <NUM_LIT:1> ; buffer . append ( name , nameStart , lastGenericStart - nameStart ) ; appendArgumentSimpleNames ( name , lastGenericStart , lastGenericEnd , buffer ) ; buffer . append ( name , lastGenericEnd + <NUM_LIT:1> , length - lastGenericEnd - <NUM_LIT:1> ) ; char [ ] result = new char [ length = buffer . length ( ) ] ; buffer . getChars ( <NUM_LIT:0> , length , result , <NUM_LIT:0> ) ; return result ; } public static String getSimpleName ( String name ) { int lastDot = - <NUM_LIT:1> , lastGenericStart = - <NUM_LIT:1> , lastGenericEnd = - <NUM_LIT:1> ; int depth = <NUM_LIT:0> ; int length = name . length ( ) ; lastDotLookup : for ( int i = length - <NUM_LIT:1> ; i >= <NUM_LIT:0> ; i -- ) { switch ( name . charAt ( i ) ) { case '<CHAR_LIT:.>' : if ( depth == <NUM_LIT:0> ) { lastDot = i ; break lastDotLookup ; } break ; case '<CHAR_LIT>' : depth -- ; if ( depth == <NUM_LIT:0> ) lastGenericStart = i ; break ; case '<CHAR_LIT:>>' : if ( depth == <NUM_LIT:0> ) lastGenericEnd = i ; depth ++ ; break ; } } if ( lastGenericStart < <NUM_LIT:0> ) { if ( lastDot < <NUM_LIT:0> ) { return name ; } return name . substring ( lastDot + <NUM_LIT:1> , length ) ; } StringBuffer buffer = new StringBuffer ( <NUM_LIT:10> ) ; char [ ] nameChars = name . toCharArray ( ) ; int nameStart = lastDot < <NUM_LIT:0> ? <NUM_LIT:0> : lastDot + <NUM_LIT:1> ; buffer . append ( nameChars , nameStart , lastGenericStart - nameStart ) ; appendArgumentSimpleNames ( nameChars , lastGenericStart , lastGenericEnd , buffer ) ; buffer . append ( nameChars , lastGenericEnd + <NUM_LIT:1> , length - lastGenericEnd - <NUM_LIT:1> ) ; return buffer . toString ( ) ; } public static char [ ] [ ] getSimpleNames ( char [ ] name ) { int length = name == null ? <NUM_LIT:0> : name . length ; if ( length == <NUM_LIT:0> ) return CharOperation . NO_CHAR_CHAR ; int wordCount = <NUM_LIT:1> ; countingWords : for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) switch ( name [ i ] ) { case C_DOT : wordCount ++ ; break ; case C_GENERIC_START : break countingWords ; } char [ ] [ ] split = new char [ wordCount ] [ ] ; int last = <NUM_LIT:0> , currentWord = <NUM_LIT:0> ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { if ( name [ i ] == C_GENERIC_START ) break ; if ( name [ i ] == C_DOT ) { split [ currentWord ] = new char [ i - last ] ; System . arraycopy ( name , last , split [ currentWord ++ ] , <NUM_LIT:0> , i - last ) ; last = i + <NUM_LIT:1> ; } } split [ currentWord ] = new char [ length - last ] ; System . arraycopy ( name , last , split [ currentWord ] , <NUM_LIT:0> , length - last ) ; return split ; } public static String [ ] getSimpleNames ( String name ) { return CharOperation . toStrings ( getSimpleNames ( name . toCharArray ( ) ) ) ; } public static char [ ] [ ] getThrownExceptionTypes ( char [ ] methodSignature ) throws IllegalArgumentException { int exceptionStart = CharOperation . indexOf ( C_EXCEPTION_START , methodSignature ) ; if ( exceptionStart == - <NUM_LIT:1> ) { int paren = CharOperation . lastIndexOf ( C_PARAM_END , methodSignature ) ; if ( paren == - <NUM_LIT:1> ) { throw new IllegalArgumentException ( ) ; } exceptionStart = Util . scanTypeSignature ( methodSignature , paren + <NUM_LIT:1> ) + <NUM_LIT:1> ; int length = methodSignature . length ; if ( exceptionStart == length ) return CharOperation . NO_CHAR_CHAR ; throw new IllegalArgumentException ( ) ; } int length = methodSignature . length ; int i = exceptionStart ; ArrayList exceptionList = new ArrayList ( <NUM_LIT:1> ) ; while ( i < length ) { if ( methodSignature [ i ] == C_EXCEPTION_START ) { exceptionStart ++ ; i ++ ; } else { throw new IllegalArgumentException ( ) ; } i = Util . scanTypeSignature ( methodSignature , i ) + <NUM_LIT:1> ; exceptionList . add ( CharOperation . subarray ( methodSignature , exceptionStart , i ) ) ; exceptionStart = i ; } char [ ] [ ] result ; exceptionList . toArray ( result = new char [ exceptionList . size ( ) ] [ ] ) ; return result ; } public static String [ ] getThrownExceptionTypes ( String methodSignature ) throws IllegalArgumentException { char [ ] [ ] parameterTypes = getThrownExceptionTypes ( methodSignature . toCharArray ( ) ) ; return CharOperation . toStrings ( parameterTypes ) ; } public static char [ ] [ ] getTypeArguments ( char [ ] parameterizedTypeSignature ) throws IllegalArgumentException { int length = parameterizedTypeSignature . length ; if ( length < <NUM_LIT:2> || parameterizedTypeSignature [ length - <NUM_LIT:2> ] != C_GENERIC_END ) return CharOperation . NO_CHAR_CHAR ; int count = <NUM_LIT:1> ; int start = length - <NUM_LIT:2> ; while ( start >= <NUM_LIT:0> && count > <NUM_LIT:0> ) { switch ( parameterizedTypeSignature [ -- start ] ) { case C_GENERIC_START : count -- ; break ; case C_GENERIC_END : count ++ ; break ; } } if ( start < <NUM_LIT:0> ) throw new IllegalArgumentException ( ) ; ArrayList args = new ArrayList ( ) ; int p = start + <NUM_LIT:1> ; while ( true ) { if ( p >= parameterizedTypeSignature . length ) { throw new IllegalArgumentException ( ) ; } char c = parameterizedTypeSignature [ p ] ; if ( c == C_GENERIC_END ) { int size = args . size ( ) ; char [ ] [ ] result = new char [ size ] [ ] ; args . toArray ( result ) ; return result ; } int e = Util . scanTypeArgumentSignature ( parameterizedTypeSignature , p ) ; args . add ( CharOperation . subarray ( parameterizedTypeSignature , p , e + <NUM_LIT:1> ) ) ; p = e + <NUM_LIT:1> ; } } public static String [ ] getTypeArguments ( String parameterizedTypeSignature ) throws IllegalArgumentException { char [ ] [ ] args = getTypeArguments ( parameterizedTypeSignature . toCharArray ( ) ) ; return CharOperation . toStrings ( args ) ; } public static char [ ] getTypeErasure ( char [ ] parameterizedTypeSignature ) throws IllegalArgumentException { int end = CharOperation . indexOf ( C_GENERIC_START , parameterizedTypeSignature ) ; if ( end == - <NUM_LIT:1> ) return parameterizedTypeSignature ; int length = parameterizedTypeSignature . length ; char [ ] result = new char [ length ] ; int pos = <NUM_LIT:0> ; int start = <NUM_LIT:0> ; int deep = <NUM_LIT:0> ; for ( int idx = end ; idx < length ; idx ++ ) { switch ( parameterizedTypeSignature [ idx ] ) { case C_GENERIC_START : if ( deep == <NUM_LIT:0> ) { int size = idx - start ; System . arraycopy ( parameterizedTypeSignature , start , result , pos , size ) ; end = idx ; pos += size ; } deep ++ ; break ; case C_GENERIC_END : deep -- ; if ( deep < <NUM_LIT:0> ) throw new IllegalArgumentException ( ) ; if ( deep == <NUM_LIT:0> ) start = idx + <NUM_LIT:1> ; break ; } } if ( deep > <NUM_LIT:0> ) throw new IllegalArgumentException ( ) ; int size = pos + length - start ; char [ ] resized = new char [ size ] ; System . arraycopy ( result , <NUM_LIT:0> , resized , <NUM_LIT:0> , pos ) ; System . arraycopy ( parameterizedTypeSignature , start , resized , pos , length - start ) ; return resized ; } public static String getTypeErasure ( String parameterizedTypeSignature ) throws IllegalArgumentException { char [ ] signature = parameterizedTypeSignature . toCharArray ( ) ; char [ ] erasure = getTypeErasure ( signature ) ; return signature == erasure ? parameterizedTypeSignature : new String ( erasure ) ; } public static char [ ] [ ] getTypeParameterBounds ( char [ ] formalTypeParameterSignature ) throws IllegalArgumentException { int p1 = CharOperation . indexOf ( C_COLON , formalTypeParameterSignature ) ; if ( p1 < <NUM_LIT:0> ) { throw new IllegalArgumentException ( ) ; } if ( p1 == formalTypeParameterSignature . length - <NUM_LIT:1> ) { return CharOperation . NO_CHAR_CHAR ; } int p2 = CharOperation . indexOf ( C_COLON , formalTypeParameterSignature , p1 + <NUM_LIT:1> ) ; char [ ] classBound ; if ( p2 < <NUM_LIT:0> ) { classBound = CharOperation . subarray ( formalTypeParameterSignature , p1 + <NUM_LIT:1> , formalTypeParameterSignature . length ) ; return new char [ ] [ ] { classBound } ; } if ( p2 == p1 + <NUM_LIT:1> ) { classBound = null ; } else { classBound = CharOperation . subarray ( formalTypeParameterSignature , p1 + <NUM_LIT:1> , p2 ) ; } char [ ] [ ] interfaceBounds = CharOperation . splitOn ( C_COLON , formalTypeParameterSignature , p2 + <NUM_LIT:1> , formalTypeParameterSignature . length ) ; if ( classBound == null ) { return interfaceBounds ; } int resultLength = interfaceBounds . length + <NUM_LIT:1> ; char [ ] [ ] result = new char [ resultLength ] [ ] ; result [ <NUM_LIT:0> ] = classBound ; System . arraycopy ( interfaceBounds , <NUM_LIT:0> , result , <NUM_LIT:1> , interfaceBounds . length ) ; return result ; } public static String [ ] getTypeParameterBounds ( String formalTypeParameterSignature ) throws IllegalArgumentException { char [ ] [ ] bounds = getTypeParameterBounds ( formalTypeParameterSignature . toCharArray ( ) ) ; return CharOperation . toStrings ( bounds ) ; } public static char [ ] [ ] getTypeParameters ( char [ ] methodOrTypeSignature ) throws IllegalArgumentException { try { int length = methodOrTypeSignature . length ; if ( length == <NUM_LIT:0> ) return CharOperation . NO_CHAR_CHAR ; if ( methodOrTypeSignature [ <NUM_LIT:0> ] != C_GENERIC_START ) return CharOperation . NO_CHAR_CHAR ; ArrayList paramList = new ArrayList ( <NUM_LIT:1> ) ; int paramStart = <NUM_LIT:1> , i = <NUM_LIT:1> ; while ( i < length ) { if ( methodOrTypeSignature [ i ] == C_GENERIC_END ) { int size = paramList . size ( ) ; if ( size == <NUM_LIT:0> ) throw new IllegalArgumentException ( ) ; char [ ] [ ] result ; paramList . toArray ( result = new char [ size ] [ ] ) ; return result ; } i = CharOperation . indexOf ( C_COLON , methodOrTypeSignature , i ) ; if ( i < <NUM_LIT:0> || i >= length ) throw new IllegalArgumentException ( ) ; while ( methodOrTypeSignature [ i ] == '<CHAR_LIT::>' ) { i ++ ; switch ( methodOrTypeSignature [ i ] ) { case '<CHAR_LIT::>' : break ; case C_GENERIC_END : break ; case C_RESOLVED : try { i = Util . scanClassTypeSignature ( methodOrTypeSignature , i ) ; i ++ ; } catch ( IllegalArgumentException e ) { } break ; case C_ARRAY : try { i = Util . scanArrayTypeSignature ( methodOrTypeSignature , i ) ; i ++ ; } catch ( IllegalArgumentException e ) { } break ; case C_TYPE_VARIABLE : try { i = Util . scanTypeVariableSignature ( methodOrTypeSignature , i ) ; i ++ ; } catch ( IllegalArgumentException e ) { } break ; } } paramList . add ( CharOperation . subarray ( methodOrTypeSignature , paramStart , i ) ) ; paramStart = i ; } } catch ( ArrayIndexOutOfBoundsException e ) { } throw new IllegalArgumentException ( ) ; } public static String [ ] getTypeParameters ( String methodOrTypeSignature ) throws IllegalArgumentException { char [ ] [ ] params = getTypeParameters ( methodOrTypeSignature . toCharArray ( ) ) ; return CharOperation . toStrings ( params ) ; } public static int getTypeSignatureKind ( char [ ] typeSignature ) { if ( typeSignature . length < <NUM_LIT:1> ) { throw new IllegalArgumentException ( ) ; } char c = typeSignature [ <NUM_LIT:0> ] ; if ( c == C_GENERIC_START ) { int count = <NUM_LIT:1> ; for ( int i = <NUM_LIT:1> , length = typeSignature . length ; i < length ; i ++ ) { switch ( typeSignature [ i ] ) { case C_GENERIC_START : count ++ ; break ; case C_GENERIC_END : count -- ; break ; } if ( count == <NUM_LIT:0> ) { if ( i + <NUM_LIT:1> < length ) c = typeSignature [ i + <NUM_LIT:1> ] ; break ; } } } switch ( c ) { case C_ARRAY : return ARRAY_TYPE_SIGNATURE ; case C_RESOLVED : case C_UNRESOLVED : return CLASS_TYPE_SIGNATURE ; case C_TYPE_VARIABLE : return TYPE_VARIABLE_SIGNATURE ; case C_BOOLEAN : case C_BYTE : case C_CHAR : case C_DOUBLE : case C_FLOAT : case C_INT : case C_LONG : case C_SHORT : case C_VOID : return BASE_TYPE_SIGNATURE ; case C_STAR : case C_SUPER : case C_EXTENDS : return WILDCARD_TYPE_SIGNATURE ; case C_CAPTURE : return CAPTURE_TYPE_SIGNATURE ; case C_INTERSECTION : return INTERSECTION_TYPE_SIGNATURE ; default : throw new IllegalArgumentException ( ) ; } } public static int getTypeSignatureKind ( String typeSignature ) { return getTypeSignatureKind ( typeSignature . toCharArray ( ) ) ; } public static char [ ] getTypeVariable ( char [ ] formalTypeParameterSignature ) throws IllegalArgumentException { int p = CharOperation . indexOf ( C_COLON , formalTypeParameterSignature ) ; if ( p < <NUM_LIT:0> ) { throw new IllegalArgumentException ( ) ; } return CharOperation . subarray ( formalTypeParameterSignature , <NUM_LIT:0> , p ) ; } public static String getTypeVariable ( String formalTypeParameterSignature ) throws IllegalArgumentException { return new String ( getTypeVariable ( formalTypeParameterSignature . toCharArray ( ) ) ) ; } public static char [ ] removeCapture ( char [ ] methodOrTypeSignature ) { return CharOperation . remove ( methodOrTypeSignature , C_CAPTURE ) ; } public static String removeCapture ( String methodOrTypeSignature ) { char [ ] array = methodOrTypeSignature . toCharArray ( ) ; char [ ] result = removeCapture ( array ) ; if ( array == result ) return methodOrTypeSignature ; return new String ( result ) ; } public static char [ ] toCharArray ( char [ ] signature ) throws IllegalArgumentException { int sigLength = signature . length ; if ( sigLength == <NUM_LIT:0> ) { throw new IllegalArgumentException ( ) ; } if ( signature [ <NUM_LIT:0> ] == C_PARAM_START || signature [ <NUM_LIT:0> ] == C_GENERIC_START ) { return toCharArray ( signature , CharOperation . NO_CHAR , null , true , true ) ; } StringBuffer buffer = new StringBuffer ( signature . length + <NUM_LIT:10> ) ; appendTypeSignature ( signature , <NUM_LIT:0> , true , buffer ) ; char [ ] result = new char [ buffer . length ( ) ] ; buffer . getChars ( <NUM_LIT:0> , buffer . length ( ) , result , <NUM_LIT:0> ) ; return result ; } public static char [ ] toCharArray ( char [ ] methodSignature , char [ ] methodName , char [ ] [ ] parameterNames , boolean fullyQualifyTypeNames , boolean includeReturnType ) { return toCharArray ( methodSignature , methodName , parameterNames , fullyQualifyTypeNames , includeReturnType , false ) ; } public static char [ ] toCharArray ( char [ ] methodSignature , char [ ] methodName , char [ ] [ ] parameterNames , boolean fullyQualifyTypeNames , boolean includeReturnType , boolean isVargArgs ) { int firstParen = CharOperation . indexOf ( C_PARAM_START , methodSignature ) ; if ( firstParen == - <NUM_LIT:1> ) { throw new IllegalArgumentException ( ) ; } StringBuffer buffer = new StringBuffer ( methodSignature . length + <NUM_LIT:10> ) ; if ( includeReturnType ) { char [ ] rts = getReturnType ( methodSignature ) ; appendTypeSignature ( rts , <NUM_LIT:0> , fullyQualifyTypeNames , buffer ) ; buffer . append ( '<CHAR_LIT:U+0020>' ) ; } if ( methodName != null ) { buffer . append ( methodName ) ; } buffer . append ( '<CHAR_LIT:(>' ) ; char [ ] [ ] pts = getParameterTypes ( methodSignature ) ; int max = pts . length ; int index = max - <NUM_LIT:1> ; loop : for ( int i = index ; i >= <NUM_LIT:0> ; i -- ) { if ( pts [ i ] [ <NUM_LIT:0> ] == Signature . C_ARRAY ) { break loop ; } index -- ; } for ( int i = <NUM_LIT:0> ; i < max ; i ++ ) { if ( i == index ) { appendTypeSignature ( pts [ i ] , <NUM_LIT:0> , fullyQualifyTypeNames , buffer , isVargArgs ) ; } else { appendTypeSignature ( pts [ i ] , <NUM_LIT:0> , fullyQualifyTypeNames , buffer ) ; } if ( parameterNames != null ) { buffer . append ( '<CHAR_LIT:U+0020>' ) ; buffer . append ( parameterNames [ i ] ) ; } if ( i != pts . length - <NUM_LIT:1> ) { buffer . append ( '<CHAR_LIT:U+002C>' ) ; buffer . append ( '<CHAR_LIT:U+0020>' ) ; } } buffer . append ( '<CHAR_LIT:)>' ) ; char [ ] result = new char [ buffer . length ( ) ] ; buffer . getChars ( <NUM_LIT:0> , buffer . length ( ) , result , <NUM_LIT:0> ) ; return result ; } public static char [ ] toQualifiedName ( char [ ] [ ] segments ) { int length = segments . length ; if ( length == <NUM_LIT:0> ) return CharOperation . NO_CHAR ; if ( length == <NUM_LIT:1> ) return segments [ <NUM_LIT:0> ] ; int resultLength = <NUM_LIT:0> ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { resultLength += segments [ i ] . length + <NUM_LIT:1> ; } resultLength -- ; char [ ] result = new char [ resultLength ] ; int index = <NUM_LIT:0> ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { char [ ] segment = segments [ i ] ; int segmentLength = segment . length ; System . arraycopy ( segment , <NUM_LIT:0> , result , index , segmentLength ) ; index += segmentLength ; if ( i != length - <NUM_LIT:1> ) { result [ index ++ ] = C_DOT ; } } return result ; } public static String toQualifiedName ( String [ ] segments ) { int length = segments . length ; char [ ] [ ] charArrays = new char [ length ] [ ] ; for ( int i = <NUM_LIT:0> ; i < length ; i ++ ) { charArrays [ i ] = segments [ i ] . toCharArray ( ) ; } return new String ( toQualifiedName ( charArrays ) ) ; } public static String toString ( String signature ) throws IllegalArgumentException { return new String ( toCharArray ( signature . toCharArray ( ) ) ) ; } public static String toString ( String methodSignature , String methodName , String [ ] parameterNames , boolean fullyQualifyTypeNames , boolean includeReturnType ) { return toString ( methodSignature , methodName , parameterNames , fullyQualifyTypeNames , includeReturnType , false ) ; } public static String toString ( String methodSignature , String methodName , String [ ] parameterNames , boolean fullyQualifyTypeNames , boolean includeReturnType , boolean isVarArgs ) { char [ ] [ ] params ; if ( parameterNames == null ) { params = null ; } else { int paramLength = parameterNames . length ; params = new char [ paramLength ] [ ] ; for ( int i = <NUM_LIT:0> ; i < paramLength ; i ++ ) { params [ i ] = parameterNames [ i ] . toCharArray ( ) ; } } return new String ( toCharArray ( methodSignature . toCharArray ( ) , methodName == null ? null : methodName . toCharArray ( ) , params , fullyQualifyTypeNames , includeReturnType , isVarArgs ) ) ; } private Signature ( ) { } } </s>
<s> package org . eclipse . jdt . core ; import org . eclipse . core . runtime . IProgressMonitor ; public interface ITypeRoot extends IJavaElement , IParent , IOpenable , ISourceReference , ICodeAssist { IType findPrimaryType ( ) ; IJavaElement getElementAt ( int position ) throws JavaModelException ; ICompilationUnit getWorkingCopy ( WorkingCopyOwner owner , IProgressMonitor monitor ) throws JavaModelException ; } </s>
<s> package org . eclipse . jdt . core ; public interface IBufferFactory { IBuffer createBuffer ( IOpenable owner ) ; } </s>
<s> package org . eclipse . jdt . core ; import org . eclipse . jdt . internal . compiler . lookup . TypeConstants ; import org . eclipse . jdt . internal . core . util . KeyKind ; import org . eclipse . jdt . internal . core . util . KeyToSignature ; public final class BindingKey { private String key ; public BindingKey ( String key ) { this . key = key ; } public static String createArrayTypeBindingKey ( String typeKey , int arrayDimension ) { StringBuffer buffer = new StringBuffer ( ) ; while ( arrayDimension -- > <NUM_LIT:0> ) buffer . append ( '<CHAR_LIT:[>' ) ; buffer . append ( typeKey ) ; return buffer . toString ( ) ; } public static String createParameterizedTypeBindingKey ( String genericTypeKey , String [ ] argumentTypeKeys ) { StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( Signature . getTypeErasure ( genericTypeKey ) ) ; buffer . insert ( buffer . length ( ) - <NUM_LIT:1> , '<CHAR_LIT>' ) ; for ( int i = <NUM_LIT:0> , length = argumentTypeKeys . length ; i < length ; i ++ ) { String argumentTypeKey = argumentTypeKeys [ i ] ; buffer . insert ( buffer . length ( ) - <NUM_LIT:1> , argumentTypeKey ) ; } buffer . insert ( buffer . length ( ) - <NUM_LIT:1> , '<CHAR_LIT:>>' ) ; return buffer . toString ( ) ; } public static String createTypeBindingKey ( String typeName ) { return Signature . createTypeSignature ( typeName . replace ( '<CHAR_LIT:.>' , '<CHAR_LIT:/>' ) , true ) ; } public static String createTypeVariableBindingKey ( String typeVariableName , String declaringKey ) { StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( declaringKey ) ; buffer . append ( '<CHAR_LIT::>' ) ; buffer . append ( '<CHAR_LIT>' ) ; buffer . append ( typeVariableName ) ; buffer . append ( '<CHAR_LIT:;>' ) ; return buffer . toString ( ) ; } public static String createWilcardTypeBindingKey ( String typeKey , char kind ) { switch ( kind ) { case Signature . C_STAR : return "<STR_LIT:*>" ; case Signature . C_SUPER : return '<CHAR_LIT:->' + typeKey ; case Signature . C_EXTENDS : return '<CHAR_LIT>' + typeKey ; } return null ; } public static String createWildcardTypeBindingKey ( String genericTypeKey , char boundKind , String boundTypeKey , int rank ) { String wildCardKey ; switch ( boundKind ) { case Signature . C_STAR : wildCardKey = new String ( TypeConstants . WILDCARD_STAR ) ; break ; case Signature . C_SUPER : wildCardKey = new String ( TypeConstants . WILDCARD_MINUS ) + boundTypeKey ; break ; case Signature . C_EXTENDS : wildCardKey = new String ( TypeConstants . WILDCARD_PLUS ) + boundTypeKey ; break ; default : return null ; } return genericTypeKey + '<CHAR_LIT>' + rank + '<CHAR_LIT:}>' + wildCardKey ; } public BindingKey getDeclaringType ( ) { int end = this . key . lastIndexOf ( Signature . C_DOT ) ; if ( end == - <NUM_LIT:1> ) { end = this . key . lastIndexOf ( Signature . C_DOLLAR ) ; if ( end == - <NUM_LIT:1> ) return null ; } KeyKind kind = new KeyKind ( this . key ) ; kind . parse ( ) ; if ( ( kind . flags & KeyKind . F_LOCAL_VAR ) != <NUM_LIT:0> ) { return null ; } String typeKey = this . key . substring ( <NUM_LIT:0> , end ) ; if ( typeKey . charAt ( typeKey . length ( ) - <NUM_LIT:1> ) != Signature . C_SEMICOLON ) { typeKey += Signature . C_SEMICOLON ; } return new BindingKey ( typeKey ) ; } public String [ ] getThrownExceptions ( ) { KeyToSignature keyToSignature = new KeyToSignature ( this . key , KeyToSignature . THROWN_EXCEPTIONS ) ; keyToSignature . parse ( ) ; return keyToSignature . getThrownExceptions ( ) ; } public String [ ] getTypeArguments ( ) { KeyToSignature keyToSignature = new KeyToSignature ( this . key , KeyToSignature . TYPE_ARGUMENTS ) ; keyToSignature . parse ( ) ; return keyToSignature . getTypeArguments ( ) ; } public boolean isRawType ( ) { KeyKind kind = new KeyKind ( this . key ) ; kind . parse ( ) ; return ( kind . flags & KeyKind . F_RAW_TYPE ) != <NUM_LIT:0> ; } public boolean isParameterizedType ( ) { KeyKind kind = new KeyKind ( this . key ) ; kind . parse ( ) ; return ( kind . flags & KeyKind . F_PARAMETERIZED_TYPE ) != <NUM_LIT:0> ; } public boolean isParameterizedMethod ( ) { KeyKind kind = new KeyKind ( this . key ) ; kind . parse ( ) ; return ( kind . flags & KeyKind . F_PARAMETERIZED_METHOD ) != <NUM_LIT:0> ; } public String toSignature ( ) { KeyToSignature keyToSignature = new KeyToSignature ( this . key , KeyToSignature . SIGNATURE ) ; keyToSignature . parse ( ) ; return keyToSignature . signature . toString ( ) ; } public String toString ( ) { return this . key ; } } </s>
<s> package org . eclipse . jdt . core ; import org . eclipse . core . resources . IMarker ; public interface IJavaModelMarker { String JAVA_MODEL_PROBLEM_MARKER = JavaCore . PLUGIN_ID + "<STR_LIT>" ; String TRANSIENT_PROBLEM = JavaCore . PLUGIN_ID + "<STR_LIT>" ; String TASK_MARKER = JavaCore . PLUGIN_ID + "<STR_LIT>" ; String ARGUMENTS = "<STR_LIT>" ; String ID = "<STR_LIT:id>" ; String CATEGORY_ID = "<STR_LIT>" ; String FLAGS = "<STR_LIT>" ; String CYCLE_DETECTED = "<STR_LIT>" ; String BUILDPATH_PROBLEM_MARKER = JavaCore . PLUGIN_ID + "<STR_LIT>" ; String CLASSPATH_FILE_FORMAT = "<STR_LIT>" ; String OUTPUT_OVERLAPPING_SOURCE = "<STR_LIT>" ; } </s>
<s> package org . eclipse . jdt . core ; public interface IImportContainer extends IJavaElement , IParent , ISourceReference { IImportDeclaration getImport ( String name ) ; } </s>
<s> package org . eclipse . jdt . core . eval ; public interface IGlobalVariable { public String getInitializer ( ) ; public String getName ( ) ; public String getTypeName ( ) ; } </s>
<s> package org . eclipse . jdt . core . eval ; import org . eclipse . core . resources . IMarker ; import org . eclipse . jdt . internal . eval . EvaluationConstants ; public interface ICodeSnippetRequestor { public static final String LOCAL_VAR_PREFIX = new String ( EvaluationConstants . LOCAL_VAR_PREFIX ) ; public static final String DELEGATE_THIS = new String ( EvaluationConstants . DELEGATE_THIS ) ; public static final String RUN_METHOD = EvaluationConstants . RUN_METHOD ; public static final String RESULT_VALUE_FIELD = EvaluationConstants . RESULT_VALUE_FIELD ; public static final String RESULT_TYPE_FIELD = EvaluationConstants . RESULT_TYPE_FIELD ; public static final int VARIABLE = <NUM_LIT:1> ; public static final int CODE_SNIPPET = <NUM_LIT:2> ; public static final int IMPORT = <NUM_LIT:3> ; public static final int PACKAGE = <NUM_LIT:4> ; public static final int INTERNAL = <NUM_LIT:5> ; public boolean acceptClassFiles ( byte [ ] [ ] classFileBytes , String [ ] [ ] classFileCompoundNames , String codeSnippetClassName ) ; public void acceptProblem ( IMarker problemMarker , String fragmentSource , int fragmentKind ) ; } </s>
<s> package org . eclipse . jdt . core . eval ; import org . eclipse . core . runtime . IProgressMonitor ; import org . eclipse . jdt . core . * ; import org . eclipse . jdt . core . IJavaElement ; import org . eclipse . jdt . core . IJavaProject ; import org . eclipse . jdt . core . IType ; import org . eclipse . jdt . core . JavaModelException ; public interface IEvaluationContext { public IGlobalVariable [ ] allVariables ( ) ; public void codeComplete ( String codeSnippet , int position , ICompletionRequestor requestor ) throws JavaModelException ; public void codeComplete ( String codeSnippet , int position , ICompletionRequestor requestor , WorkingCopyOwner owner ) throws JavaModelException ; public void codeComplete ( String codeSnippet , int position , CompletionRequestor requestor ) throws JavaModelException ; public void codeComplete ( String codeSnippet , int position , CompletionRequestor requestor , IProgressMonitor monitor ) throws JavaModelException ; public void codeComplete ( String codeSnippet , int position , CompletionRequestor requestor , WorkingCopyOwner owner ) throws JavaModelException ; public void codeComplete ( String codeSnippet , int position , CompletionRequestor requestor , WorkingCopyOwner owner , IProgressMonitor monitor ) throws JavaModelException ; public IJavaElement [ ] codeSelect ( String codeSnippet , int offset , int length ) throws JavaModelException ; public IJavaElement [ ] codeSelect ( String codeSnippet , int offset , int length , WorkingCopyOwner owner ) throws JavaModelException ; public void deleteVariable ( IGlobalVariable variable ) ; public void evaluateCodeSnippet ( String codeSnippet , String [ ] localVariableTypeNames , String [ ] localVariableNames , int [ ] localVariableModifiers , IType declaringType , boolean isStatic , boolean isConstructorCall , ICodeSnippetRequestor requestor , IProgressMonitor progressMonitor ) throws JavaModelException ; public void evaluateCodeSnippet ( String codeSnippet , ICodeSnippetRequestor requestor , IProgressMonitor progressMonitor ) throws JavaModelException ; public void evaluateVariable ( IGlobalVariable variable , ICodeSnippetRequestor requestor , IProgressMonitor progressMonitor ) throws JavaModelException ; public String [ ] getImports ( ) ; public String getPackageName ( ) ; public IJavaProject getProject ( ) ; public IGlobalVariable newVariable ( String typeName , String name , String initializer ) ; public void setImports ( String [ ] imports ) ; public void setPackageName ( String packageName ) ; public void validateImports ( ICodeSnippetRequestor requestor ) throws JavaModelException ; public void codeComplete ( String codeSnippet , int position , org . eclipse . jdt . core . ICodeCompletionRequestor requestor ) throws JavaModelException ; } </s>
<s> package org . eclipse . jdt . core ; public interface ITypeParameter extends IJavaElement , ISourceReference { String [ ] getBounds ( ) throws JavaModelException ; String [ ] getBoundsSignatures ( ) throws JavaModelException ; IMember getDeclaringMember ( ) ; ITypeRoot getTypeRoot ( ) ; } </s>
<s> package org . eclipse . jdt . core ; import java . util . ArrayList ; import java . util . HashMap ; import java . util . HashSet ; import java . util . Hashtable ; import java . util . Map ; import org . eclipse . core . runtime . CoreException ; import org . eclipse . core . runtime . IConfigurationElement ; import org . eclipse . core . runtime . IExtension ; import org . eclipse . core . runtime . IExtensionPoint ; import org . eclipse . core . runtime . IPath ; import org . eclipse . core . runtime . IProgressMonitor ; import org . eclipse . core . runtime . OperationCanceledException ; import org . eclipse . core . runtime . Path ; import org . eclipse . core . runtime . Platform ; import org . eclipse . core . runtime . Plugin ; import org . eclipse . core . runtime . QualifiedName ; import org . eclipse . core . runtime . SubProgressMonitor ; import org . eclipse . core . runtime . jobs . ISchedulingRule ; import org . eclipse . core . resources . IContainer ; import org . eclipse . core . resources . IFile ; import org . eclipse . core . resources . IFolder ; import org . eclipse . core . resources . IMarker ; import org . eclipse . core . resources . IMarkerDelta ; import org . eclipse . core . resources . IProject ; import org . eclipse . core . resources . IResource ; import org . eclipse . core . resources . IResourceChangeEvent ; import org . eclipse . core . resources . IResourceChangeListener ; import org . eclipse . core . resources . IWorkspace ; import org . eclipse . core . resources . IWorkspaceRoot ; import org . eclipse . core . resources . IWorkspaceRunnable ; import org . eclipse . core . resources . ResourcesPlugin ; import org . eclipse . jdt . core . compiler . CharOperation ; import org . eclipse . jdt . core . compiler . IProblem ; import org . eclipse . jdt . core . search . IJavaSearchConstants ; import org . eclipse . jdt . core . search . IJavaSearchScope ; import org . eclipse . jdt . core . search . SearchEngine ; import org . eclipse . jdt . core . search . SearchPattern ; import org . eclipse . jdt . core . search . TypeNameRequestor ; import org . eclipse . jdt . internal . compiler . classfmt . ClassFileConstants ; import org . eclipse . jdt . internal . compiler . impl . CompilerOptions ; import org . eclipse . jdt . internal . compiler . problem . ProblemReporter ; import org . eclipse . jdt . internal . core . * ; import org . eclipse . jdt . internal . core . builder . JavaBuilder ; import org . eclipse . jdt . internal . core . builder . State ; import org . eclipse . jdt . internal . core . util . MementoTokenizer ; import org . eclipse . jdt . internal . core . util . Messages ; import org . eclipse . jdt . internal . core . util . Util ; import org . osgi . framework . BundleContext ; public final class JavaCore extends Plugin { private static final IResource [ ] NO_GENERATED_RESOURCES = new IResource [ <NUM_LIT:0> ] ; private static Plugin JAVA_CORE_PLUGIN = null ; public static final String PLUGIN_ID = "<STR_LIT>" ; public static final String BUILDER_ID = PLUGIN_ID + "<STR_LIT>" ; public static final String MODEL_ID = PLUGIN_ID + "<STR_LIT>" ; public static final String NATURE_ID = PLUGIN_ID + "<STR_LIT>" ; protected static final String ATT_HANDLE_ID = "<STR_LIT>" ; public static final String USER_LIBRARY_CONTAINER_ID = "<STR_LIT>" ; public static final String COMPILER_LOCAL_VARIABLE_ATTR = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_LINE_NUMBER_ATTR = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_SOURCE_FILE_ATTR = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_CODEGEN_UNUSED_LOCAL = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_CODEGEN_TARGET_PLATFORM = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_CODEGEN_INLINE_JSR_BYTECODE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_DOC_COMMENT_SUPPORT = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNREACHABLE_CODE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_INVALID_IMPORT = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_METHOD_WITH_CONSTRUCTOR_NAME = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_DEPRECATION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_DEPRECATION_IN_DEPRECATED_CODE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_DEPRECATION_WHEN_OVERRIDING_DEPRECATED_METHOD = "<STR_LIT>" ; public static final String COMPILER_PB_HIDDEN_CATCH_BLOCK = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_LOCAL = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_PARAMETER = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_PARAMETER_WHEN_IMPLEMENTING_ABSTRACT = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_PARAMETER_WHEN_OVERRIDING_CONCRETE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_PARAMETER_INCLUDE_DOC_COMMENT_REFERENCE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_IMPORT = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_TYPE_ARGUMENTS_FOR_METHOD_INVOCATION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_SYNTHETIC_ACCESS_EMULATION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_NON_NLS_STRING_LITERAL = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_ASSERT_IDENTIFIER = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_ENUM_IDENTIFIER = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_STATIC_ACCESS_RECEIVER = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_INDIRECT_STATIC_ACCESS = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_NO_EFFECT_ASSIGNMENT = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_INCOMPATIBLE_NON_INHERITED_INTERFACE_METHOD = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_PRIVATE_MEMBER = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_LOCAL_VARIABLE_HIDING = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_SPECIAL_PARAMETER_HIDING_FIELD = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_FIELD_HIDING = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_TYPE_PARAMETER_HIDING = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_POSSIBLE_ACCIDENTAL_BOOLEAN_ASSIGNMENT = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_FALLTHROUGH_CASE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_EMPTY_STATEMENT = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_BOOLEAN_METHOD_THROWING_EXCEPTION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNNECESSARY_TYPE_CHECK = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNNECESSARY_ELSE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNDOCUMENTED_EMPTY_BLOCK = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_FINALLY_BLOCK_NOT_COMPLETING = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_WHEN_OVERRIDING = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_INCLUDE_DOC_COMMENT_REFERENCE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_EXEMPT_EXCEPTION_AND_THROWABLE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNQUALIFIED_FIELD_ACCESS = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNSAFE_TYPE_OPERATION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNCHECKED_TYPE_OPERATION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_RAW_TYPE_REFERENCE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNAVOIDABLE_GENERIC_TYPE_PROBLEMS = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_FINAL_PARAMETER_BOUND = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_SERIAL_VERSION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_VARARGS_ARGUMENT_NEED_CAST = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_AUTOBOXING = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_ANNOTATION_SUPER_INTERFACE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_OVERRIDE_ANNOTATION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_DEPRECATED_ANNOTATION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_HASHCODE_METHOD = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_DEAD_CODE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_DEAD_CODE_IN_TRIVIAL_IF_STATEMENT = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_INCOMPLETE_ENUM_SWITCH = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_INCONSISTENT_NULL_CHECK = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_LABEL = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_INVALID_JAVADOC = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_INVALID_JAVADOC_TAGS = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_INVALID_JAVADOC_TAGS__DEPRECATED_REF = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_INVALID_JAVADOC_TAGS__NOT_VISIBLE_REF = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_INVALID_JAVADOC_TAGS_VISIBILITY = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_JAVADOC_TAGS = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_JAVADOC_TAGS_VISIBILITY = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_JAVADOC_TAGS_OVERRIDING = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_JAVADOC_TAGS_METHOD_TYPE_PARAMETERS = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_JAVADOC_COMMENTS = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_JAVADOC_COMMENTS_VISIBILITY = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_CHAR_ARRAY_IN_STRING_CONCATENATION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MAX_PER_UNIT = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_FATAL_OPTIONAL_ERROR = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_PARAMETER_ASSIGNMENT = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_STATIC_ON_METHOD = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_POTENTIALLY_MISSING_STATIC_ON_METHOD = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_SOURCE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_COMPLIANCE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_TASK_PRIORITIES = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_TASK_TAGS = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_TASK_CASE_SENSITIVE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_FORBIDDEN_REFERENCE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_DISCOURAGED_REFERENCE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_SUPPRESS_WARNINGS = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_INCLUDE_ASSERTS_IN_NULL_ANALYSIS = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_SUPPRESS_OPTIONAL_ERRORS = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNHANDLED_WARNING_TOKEN = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_WARNING_TOKEN = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_NULL_REFERENCE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_POTENTIAL_NULL_REFERENCE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_REDUNDANT_NULL_CHECK = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_OVERRIDING_METHOD_WITHOUT_SUPER_INVOCATION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_REDUNDANT_SUPERINTERFACE = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_COMPARING_IDENTICAL = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_SYNCHRONIZED_ON_INHERITED_METHOD = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_UNUSED_OBJECT_ALLOCATION = PLUGIN_ID + "<STR_LIT>" ; public static final String COMPILER_PB_REDUNDANT_TYPE_ARGUMENTS = PLUGIN_ID + "<STR_LIT>" ; public static final String CORE_JAVA_BUILD_ORDER = PLUGIN_ID + "<STR_LIT>" ; public static final String CORE_JAVA_BUILD_RESOURCE_COPY_FILTER = PLUGIN_ID + "<STR_LIT>" ; public static final String CORE_JAVA_BUILD_DUPLICATE_RESOURCE = PLUGIN_ID + "<STR_LIT>" ; public static final String CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER = PLUGIN_ID + "<STR_LIT>" ; public static final String CORE_JAVA_BUILD_RECREATE_MODIFIED_CLASS_FILES_IN_OUTPUT_FOLDER = PLUGIN_ID + "<STR_LIT>" ; public static final String CORE_INCOMPLETE_CLASSPATH = PLUGIN_ID + "<STR_LIT>" ; public static final String CORE_CIRCULAR_CLASSPATH = PLUGIN_ID + "<STR_LIT>" ; public static final String CORE_INCOMPATIBLE_JDK_LEVEL = PLUGIN_ID + "<STR_LIT>" ; public static final String CORE_JAVA_BUILD_INVALID_CLASSPATH = PLUGIN_ID + "<STR_LIT>" ; public static final String CORE_ENCODING = PLUGIN_ID + "<STR_LIT>" ; public static final String CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS = PLUGIN_ID + "<STR_LIT>" ; public static final String CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS = PLUGIN_ID + "<STR_LIT>" ; public static final String CORE_OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE = PLUGIN_ID + "<STR_LIT>" ; public static final String TIMEOUT_FOR_PARAMETER_NAME_FROM_ATTACHED_JAVADOC = PLUGIN_ID + "<STR_LIT>" ; public static final String FORMATTER_NEWLINE_OPENING_BRACE = PLUGIN_ID + "<STR_LIT>" ; public static final String FORMATTER_NEWLINE_CONTROL = PLUGIN_ID + "<STR_LIT>" ; public static final String FORMATTER_NEWLINE_ELSE_IF = PLUGIN_ID + "<STR_LIT>" ; public static final String FORMATTER_NEWLINE_EMPTY_BLOCK = PLUGIN_ID + "<STR_LIT>" ; public static final String FORMATTER_CLEAR_BLANK_LINES = PLUGIN_ID + "<STR_LIT>" ; public static final String FORMATTER_LINE_SPLIT = PLUGIN_ID + "<STR_LIT>" ; public static final String FORMATTER_COMPACT_ASSIGNMENT = PLUGIN_ID + "<STR_LIT>" ; public static final String FORMATTER_TAB_CHAR = PLUGIN_ID + "<STR_LIT>" ; public static final String FORMATTER_TAB_SIZE = PLUGIN_ID + "<STR_LIT>" ; public static final String FORMATTER_SPACE_CASTEXPRESSION = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_VISIBILITY_CHECK = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_DEPRECATION_CHECK = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_CAMEL_CASE_MATCH = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_IMPLICIT_QUALIFICATION = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_FIELD_PREFIXES = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_STATIC_FIELD_PREFIXES = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_STATIC_FINAL_FIELD_PREFIXES = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_LOCAL_PREFIXES = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_ARGUMENT_PREFIXES = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_FIELD_SUFFIXES = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_STATIC_FIELD_SUFFIXES = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_STATIC_FINAL_FIELD_SUFFIXES = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_LOCAL_SUFFIXES = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_ARGUMENT_SUFFIXES = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_FORBIDDEN_REFERENCE_CHECK = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_DISCOURAGED_REFERENCE_CHECK = PLUGIN_ID + "<STR_LIT>" ; public static final String CODEASSIST_SUGGEST_STATIC_IMPORTS = PLUGIN_ID + "<STR_LIT>" ; public static final String DEFAULT_TASK_TAG = "<STR_LIT>" ; public static final String DEFAULT_TASK_PRIORITY = "<STR_LIT>" ; public static final String DEFAULT_TASK_TAGS = "<STR_LIT>" ; public static final String DEFAULT_TASK_PRIORITIES = "<STR_LIT>" ; public static final String GENERATE = "<STR_LIT>" ; public static final String DO_NOT_GENERATE = "<STR_LIT>" ; public static final String PRESERVE = "<STR_LIT>" ; public static final String OPTIMIZE_OUT = "<STR_LIT>" ; public static final String COMPILER_TASK_PRIORITY_HIGH = "<STR_LIT>" ; public static final String COMPILER_TASK_PRIORITY_LOW = "<STR_LIT>" ; public static final String COMPILER_TASK_PRIORITY_NORMAL = "<STR_LIT>" ; public static final String VERSION_1_1 = "<STR_LIT>" ; public static final String VERSION_1_2 = "<STR_LIT>" ; public static final String VERSION_1_3 = "<STR_LIT>" ; public static final String VERSION_1_4 = "<STR_LIT>" ; public static final String VERSION_1_5 = "<STR_LIT>" ; public static final String VERSION_1_6 = "<STR_LIT>" ; public static final String VERSION_1_7 = "<STR_LIT>" ; public static final String VERSION_CLDC_1_1 = "<STR_LIT>" ; public static final String ABORT = "<STR_LIT>" ; public static final String ERROR = "<STR_LIT:error>" ; public static final String WARNING = "<STR_LIT>" ; public static final String IGNORE = "<STR_LIT>" ; public static final String COMPUTE = "<STR_LIT>" ; public static final String INSERT = "<STR_LIT>" ; public static final String DO_NOT_INSERT = "<STR_LIT>" ; public static final String PRESERVE_ONE = "<STR_LIT>" ; public static final String CLEAR_ALL = "<STR_LIT>" ; public static final String NORMAL = "<STR_LIT>" ; public static final String COMPACT = "<STR_LIT>" ; public static final String TAB = "<STR_LIT>" ; public static final String SPACE = "<STR_LIT>" ; public static final String ENABLED = "<STR_LIT>" ; public static final String DISABLED = "<STR_LIT>" ; public static final String CLEAN = "<STR_LIT>" ; public static final String PUBLIC = "<STR_LIT>" ; public static final String PROTECTED = "<STR_LIT>" ; public static final String DEFAULT = "<STR_LIT:default>" ; public static final String PRIVATE = "<STR_LIT>" ; public static final String NEVER = "<STR_LIT>" ; public static final String COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION_NO_TAG = CompilerOptions . NO_TAG ; public static final String COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION_RETURN_TAG = CompilerOptions . RETURN_TAG ; public static final String COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION_ALL_STANDARD_TAGS = CompilerOptions . ALL_STANDARD_TAGS ; public static final String JAVA_SOURCE_CONTENT_TYPE = JavaCore . PLUGIN_ID + "<STR_LIT>" ; public JavaCore ( ) { super ( ) ; JAVA_CORE_PLUGIN = this ; } public static void addElementChangedListener ( IElementChangedListener listener ) { addElementChangedListener ( listener , ElementChangedEvent . POST_CHANGE | ElementChangedEvent . POST_RECONCILE ) ; } public static void addElementChangedListener ( IElementChangedListener listener , int eventMask ) { JavaModelManager . getDeltaState ( ) . addElementChangedListener ( listener , eventMask ) ; } public static void addJavaElementMarkerAttributes ( Map attributes , IJavaElement element ) { if ( element instanceof IMember ) element = ( ( IMember ) element ) . getClassFile ( ) ; if ( attributes != null && element != null ) attributes . put ( ATT_HANDLE_ID , element . getHandleIdentifier ( ) ) ; } private static void addNonJavaResources ( Object [ ] nonJavaResources , IContainer container , int rootPathSegmentCounts , ArrayList collector ) { for ( int i = <NUM_LIT:0> , max = nonJavaResources . length ; i < max ; i ++ ) { Object nonJavaResource = nonJavaResources [ i ] ; if ( nonJavaResource instanceof IFile ) { IFile file = ( IFile ) nonJavaResource ; IPath path = file . getFullPath ( ) . removeFirstSegments ( rootPathSegmentCounts ) ; IResource member = container . findMember ( path ) ; if ( member != null && member . exists ( ) ) { collector . add ( member ) ; } } else if ( nonJavaResource instanceof IFolder ) { IFolder folder = ( IFolder ) nonJavaResource ; IResource [ ] members = null ; try { members = folder . members ( ) ; } catch ( CoreException e ) { } if ( members != null ) { addNonJavaResources ( members , container , rootPathSegmentCounts , collector ) ; } } } } public static void addPreProcessingResourceChangedListener ( IResourceChangeListener listener ) { addPreProcessingResourceChangedListener ( listener , IResourceChangeEvent . POST_CHANGE ) ; } public static void addPreProcessingResourceChangedListener ( IResourceChangeListener listener , int eventMask ) { JavaModelManager . getDeltaState ( ) . addPreResourceChangedListener ( listener , eventMask ) ; } public void configureJavaElementMarker ( IMarker marker , IJavaElement element ) throws CoreException { if ( element instanceof IMember ) element = ( ( IMember ) element ) . getClassFile ( ) ; if ( marker != null && element != null ) marker . setAttribute ( ATT_HANDLE_ID , element . getHandleIdentifier ( ) ) ; } public static IJavaElement create ( String handleIdentifier ) { return create ( handleIdentifier , DefaultWorkingCopyOwner . PRIMARY ) ; } public static IJavaElement create ( String handleIdentifier , WorkingCopyOwner owner ) { if ( handleIdentifier == null ) { return null ; } if ( owner == null ) owner = DefaultWorkingCopyOwner . PRIMARY ; MementoTokenizer memento = new MementoTokenizer ( handleIdentifier ) ; JavaModel model = JavaModelManager . getJavaModelManager ( ) . getJavaModel ( ) ; return model . getHandleFromMemento ( memento , owner ) ; } public static IJavaElement create ( IFile file ) { return JavaModelManager . create ( file , null ) ; } public static IJavaElement create ( IFolder folder ) { return JavaModelManager . create ( folder , null ) ; } public static IJavaProject create ( IProject project ) { if ( project == null ) { return null ; } JavaModel javaModel = JavaModelManager . getJavaModelManager ( ) . getJavaModel ( ) ; return javaModel . getJavaProject ( project ) ; } public static IJavaElement create ( IResource resource ) { return JavaModelManager . create ( resource , null ) ; } public static IJavaElement create ( IResource resource , IJavaProject project ) { return JavaModelManager . create ( resource , project ) ; } public static IJavaModel create ( IWorkspaceRoot root ) { if ( root == null ) { return null ; } return JavaModelManager . getJavaModelManager ( ) . getJavaModel ( ) ; } public static IClassFile createClassFileFrom ( IFile file ) { return JavaModelManager . createClassFileFrom ( file , null ) ; } public static ICompilationUnit createCompilationUnitFrom ( IFile file ) { return JavaModelManager . createCompilationUnitFrom ( file , null ) ; } public static IPackageFragmentRoot createJarPackageFragmentRootFrom ( IFile file ) { return JavaModelManager . createJarPackageFragmentRootFrom ( file , null ) ; } public static IClasspathContainer getClasspathContainer ( IPath containerPath , IJavaProject project ) throws JavaModelException { JavaModelManager manager = JavaModelManager . getJavaModelManager ( ) ; IClasspathContainer container = manager . getClasspathContainer ( containerPath , project ) ; if ( container == JavaModelManager . CONTAINER_INITIALIZATION_IN_PROGRESS ) { return manager . getPreviousSessionContainer ( containerPath , project ) ; } return container ; } public static ClasspathContainerInitializer getClasspathContainerInitializer ( String containerID ) { Hashtable containerInitializersCache = JavaModelManager . getJavaModelManager ( ) . containerInitializersCache ; ClasspathContainerInitializer initializer = ( ClasspathContainerInitializer ) containerInitializersCache . get ( containerID ) ; if ( initializer == null ) { initializer = computeClasspathContainerInitializer ( containerID ) ; if ( initializer == null ) return null ; containerInitializersCache . put ( containerID , initializer ) ; } return initializer ; } private static ClasspathContainerInitializer computeClasspathContainerInitializer ( String containerID ) { Plugin jdtCorePlugin = JavaCore . getPlugin ( ) ; if ( jdtCorePlugin == null ) return null ; IExtensionPoint extension = Platform . getExtensionRegistry ( ) . getExtensionPoint ( JavaCore . PLUGIN_ID , JavaModelManager . CPCONTAINER_INITIALIZER_EXTPOINT_ID ) ; if ( extension != null ) { IExtension [ ] extensions = extension . getExtensions ( ) ; for ( int i = <NUM_LIT:0> ; i < extensions . length ; i ++ ) { IConfigurationElement [ ] configElements = extensions [ i ] . getConfigurationElements ( ) ; for ( int j = <NUM_LIT:0> ; j < configElements . length ; j ++ ) { IConfigurationElement configurationElement = configElements [ j ] ; String initializerID = configurationElement . getAttribute ( "<STR_LIT:id>" ) ; if ( initializerID != null && initializerID . equals ( containerID ) ) { if ( JavaModelManager . CP_RESOLVE_VERBOSE_ADVANCED ) verbose_found_container_initializer ( containerID , configurationElement ) ; try { Object execExt = configurationElement . createExecutableExtension ( "<STR_LIT:class>" ) ; if ( execExt instanceof ClasspathContainerInitializer ) { return ( ClasspathContainerInitializer ) execExt ; } } catch ( CoreException e ) { if ( JavaModelManager . CP_RESOLVE_VERBOSE || JavaModelManager . CP_RESOLVE_VERBOSE_FAILURE ) { verbose_failed_to_instanciate_container_initializer ( containerID , configurationElement ) ; e . printStackTrace ( ) ; } } } } } } return null ; } private static void verbose_failed_to_instanciate_container_initializer ( String containerID , IConfigurationElement configurationElement ) { Util . verbose ( "<STR_LIT>" + "<STR_LIT>" + containerID + '<STR_LIT:\n>' + "<STR_LIT>" + configurationElement . getAttribute ( "<STR_LIT:class>" ) , System . err ) ; } private static void verbose_found_container_initializer ( String containerID , IConfigurationElement configurationElement ) { Util . verbose ( "<STR_LIT>" + "<STR_LIT>" + containerID + '<STR_LIT:\n>' + "<STR_LIT>" + configurationElement . getAttribute ( "<STR_LIT:class>" ) ) ; } public static IPath getClasspathVariable ( final String variableName ) { JavaModelManager manager = JavaModelManager . getJavaModelManager ( ) ; IPath variablePath = manager . variableGet ( variableName ) ; if ( variablePath == JavaModelManager . VARIABLE_INITIALIZATION_IN_PROGRESS ) { return manager . getPreviousSessionVariable ( variableName ) ; } if ( variablePath != null ) { if ( variablePath == JavaModelManager . CP_ENTRY_IGNORE_PATH ) return null ; return variablePath ; } final ClasspathVariableInitializer initializer = JavaCore . getClasspathVariableInitializer ( variableName ) ; if ( initializer != null ) { if ( JavaModelManager . CP_RESOLVE_VERBOSE ) verbose_triggering_variable_initialization ( variableName , initializer ) ; if ( JavaModelManager . CP_RESOLVE_VERBOSE_ADVANCED ) verbose_triggering_variable_initialization_invocation_trace ( ) ; manager . variablePut ( variableName , JavaModelManager . VARIABLE_INITIALIZATION_IN_PROGRESS ) ; boolean ok = false ; try { initializer . initialize ( variableName ) ; variablePath = manager . variableGet ( variableName ) ; if ( variablePath == JavaModelManager . VARIABLE_INITIALIZATION_IN_PROGRESS ) return null ; if ( JavaModelManager . CP_RESOLVE_VERBOSE_ADVANCED ) verbose_variable_value_after_initialization ( variableName , variablePath ) ; manager . variablesWithInitializer . add ( variableName ) ; ok = true ; } catch ( RuntimeException e ) { if ( JavaModelManager . CP_RESOLVE_VERBOSE || JavaModelManager . CP_RESOLVE_VERBOSE_FAILURE ) e . printStackTrace ( ) ; throw e ; } catch ( Error e ) { if ( JavaModelManager . CP_RESOLVE_VERBOSE || JavaModelManager . CP_RESOLVE_VERBOSE_FAILURE ) e . printStackTrace ( ) ; throw e ; } finally { if ( ! ok ) JavaModelManager . getJavaModelManager ( ) . variablePut ( variableName , null ) ; } } else { if ( JavaModelManager . CP_RESOLVE_VERBOSE_ADVANCED || JavaModelManager . CP_RESOLVE_VERBOSE_FAILURE ) verbose_no_variable_initializer_found ( variableName ) ; } return variablePath ; } private static void verbose_no_variable_initializer_found ( String variableName ) { Util . verbose ( "<STR_LIT>" + "<STR_LIT>" + variableName ) ; } private static void verbose_variable_value_after_initialization ( String variableName , IPath variablePath ) { Util . verbose ( "<STR_LIT>" + "<STR_LIT>" + variableName + '<STR_LIT:\n>' + "<STR_LIT>" + variablePath ) ; } private static void verbose_triggering_variable_initialization ( String variableName , ClasspathVariableInitializer initializer ) { Util . verbose ( "<STR_LIT>" + "<STR_LIT>" + variableName + '<STR_LIT:\n>' + "<STR_LIT>" + initializer ) ; } private static void verbose_triggering_variable_initialization_invocation_trace ( ) { Util . verbose ( "<STR_LIT>" + "<STR_LIT>" ) ; new Exception ( "<STR_LIT>" ) . printStackTrace ( System . out ) ; } public static String getClasspathVariableDeprecationMessage ( String variableName ) { JavaModelManager manager = JavaModelManager . getJavaModelManager ( ) ; String message = ( String ) manager . deprecatedVariables . get ( variableName ) ; if ( message != null ) { return message ; } IPath variablePath = manager . variableGet ( variableName ) ; if ( variablePath != null && variablePath != JavaModelManager . VARIABLE_INITIALIZATION_IN_PROGRESS ) { return null ; } Plugin jdtCorePlugin = JavaCore . getPlugin ( ) ; if ( jdtCorePlugin == null ) return null ; IExtensionPoint extension = Platform . getExtensionRegistry ( ) . getExtensionPoint ( JavaCore . PLUGIN_ID , JavaModelManager . CPVARIABLE_INITIALIZER_EXTPOINT_ID ) ; if ( extension != null ) { IExtension [ ] extensions = extension . getExtensions ( ) ; for ( int i = <NUM_LIT:0> ; i < extensions . length ; i ++ ) { IConfigurationElement [ ] configElements = extensions [ i ] . getConfigurationElements ( ) ; for ( int j = <NUM_LIT:0> ; j < configElements . length ; j ++ ) { IConfigurationElement configElement = configElements [ j ] ; String varAttribute = configElement . getAttribute ( "<STR_LIT>" ) ; if ( variableName . equals ( varAttribute ) ) { String deprecatedAttribute = configElement . getAttribute ( "<STR_LIT>" ) ; if ( deprecatedAttribute != null ) { return deprecatedAttribute ; } } } } } return null ; } public static ClasspathVariableInitializer getClasspathVariableInitializer ( String variable ) { Plugin jdtCorePlugin = JavaCore . getPlugin ( ) ; if ( jdtCorePlugin == null ) return null ; IExtensionPoint extension = Platform . getExtensionRegistry ( ) . getExtensionPoint ( JavaCore . PLUGIN_ID , JavaModelManager . CPVARIABLE_INITIALIZER_EXTPOINT_ID ) ; if ( extension != null ) { IExtension [ ] extensions = extension . getExtensions ( ) ; for ( int i = <NUM_LIT:0> ; i < extensions . length ; i ++ ) { IConfigurationElement [ ] configElements = extensions [ i ] . getConfigurationElements ( ) ; for ( int j = <NUM_LIT:0> ; j < configElements . length ; j ++ ) { IConfigurationElement configElement = configElements [ j ] ; try { String varAttribute = configElement . getAttribute ( "<STR_LIT>" ) ; if ( variable . equals ( varAttribute ) ) { if ( JavaModelManager . CP_RESOLVE_VERBOSE_ADVANCED ) verbose_found_variable_initializer ( variable , configElement ) ; Object execExt = configElement . createExecutableExtension ( "<STR_LIT:class>" ) ; if ( execExt instanceof ClasspathVariableInitializer ) { ClasspathVariableInitializer initializer = ( ClasspathVariableInitializer ) execExt ; String deprecatedAttribute = configElement . getAttribute ( "<STR_LIT>" ) ; if ( deprecatedAttribute != null ) { JavaModelManager . getJavaModelManager ( ) . deprecatedVariables . put ( variable , deprecatedAttribute ) ; } String readOnlyAttribute = configElement . getAttribute ( "<STR_LIT>" ) ; if ( JavaModelManager . TRUE . equals ( readOnlyAttribute ) ) { JavaModelManager . getJavaModelManager ( ) . readOnlyVariables . add ( variable ) ; } return initializer ; } } } catch ( CoreException e ) { if ( JavaModelManager . CP_RESOLVE_VERBOSE || JavaModelManager . CP_RESOLVE_VERBOSE_FAILURE ) { verbose_failed_to_instanciate_variable_initializer ( variable , configElement ) ; e . printStackTrace ( ) ; } } } } } return null ; } private static void verbose_failed_to_instanciate_variable_initializer ( String variable , IConfigurationElement configElement ) { Util . verbose ( "<STR_LIT>" + "<STR_LIT>" + variable + '<STR_LIT:\n>' + "<STR_LIT>" + configElement . getAttribute ( "<STR_LIT:class>" ) , System . err ) ; } private static void verbose_found_variable_initializer ( String variable , IConfigurationElement configElement ) { Util . verbose ( "<STR_LIT>" + "<STR_LIT>" + variable + '<STR_LIT:\n>' + "<STR_LIT>" + configElement . getAttribute ( "<STR_LIT:class>" ) ) ; } public static String [ ] getClasspathVariableNames ( ) { return JavaModelManager . getJavaModelManager ( ) . variableNames ( ) ; } public static Hashtable getDefaultOptions ( ) { return JavaModelManager . getJavaModelManager ( ) . getDefaultOptions ( ) ; } public static String getEncoding ( ) { try { return ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . getDefaultCharset ( ) ; } catch ( IllegalStateException ise ) { return System . getProperty ( "<STR_LIT>" ) ; } catch ( CoreException ce ) { } return ResourcesPlugin . getEncoding ( ) ; } public static IResource [ ] getGeneratedResources ( IRegion region , boolean includesNonJavaResources ) { if ( region == null ) throw new IllegalArgumentException ( "<STR_LIT>" ) ; IJavaElement [ ] elements = region . getElements ( ) ; HashMap projectsStates = new HashMap ( ) ; ArrayList collector = new ArrayList ( ) ; for ( int i = <NUM_LIT:0> , max = elements . length ; i < max ; i ++ ) { IJavaElement element = elements [ i ] ; IJavaProject javaProject = element . getJavaProject ( ) ; IProject project = javaProject . getProject ( ) ; State state = null ; State currentState = ( State ) projectsStates . get ( project ) ; if ( currentState != null ) { state = currentState ; } else { state = ( State ) JavaModelManager . getJavaModelManager ( ) . getLastBuiltState ( project , null ) ; if ( state != null ) { projectsStates . put ( project , state ) ; } } if ( state == null ) continue ; if ( element . getElementType ( ) == IJavaElement . JAVA_PROJECT ) { IPackageFragmentRoot [ ] roots = null ; try { roots = javaProject . getPackageFragmentRoots ( ) ; } catch ( JavaModelException e ) { } if ( roots == null ) continue ; IRegion region2 = JavaCore . newRegion ( ) ; for ( int j = <NUM_LIT:0> ; j < roots . length ; j ++ ) { region2 . add ( roots [ j ] ) ; } IResource [ ] res = getGeneratedResources ( region2 , includesNonJavaResources ) ; for ( int j = <NUM_LIT:0> , max2 = res . length ; j < max2 ; j ++ ) { collector . add ( res [ j ] ) ; } continue ; } IPath outputLocation = null ; try { outputLocation = javaProject . getOutputLocation ( ) ; } catch ( JavaModelException e ) { } IJavaElement root = element ; while ( root != null && root . getElementType ( ) != IJavaElement . PACKAGE_FRAGMENT_ROOT ) { root = root . getParent ( ) ; } if ( root == null ) continue ; IPackageFragmentRoot packageFragmentRoot = ( IPackageFragmentRoot ) root ; int rootPathSegmentCounts = packageFragmentRoot . getPath ( ) . segmentCount ( ) ; try { IClasspathEntry entry = packageFragmentRoot . getRawClasspathEntry ( ) ; IPath entryOutputLocation = entry . getOutputLocation ( ) ; if ( entryOutputLocation != null ) { outputLocation = entryOutputLocation ; } } catch ( JavaModelException e ) { e . printStackTrace ( ) ; } if ( outputLocation == null ) continue ; IContainer container = ( IContainer ) project . getWorkspace ( ) . getRoot ( ) . findMember ( outputLocation ) ; switch ( element . getElementType ( ) ) { case IJavaElement . COMPILATION_UNIT : ICompilationUnit unit = ( ICompilationUnit ) element ; getGeneratedResource ( unit , container , state , rootPathSegmentCounts , collector ) ; break ; case IJavaElement . PACKAGE_FRAGMENT : IPackageFragment fragment = ( IPackageFragment ) element ; ICompilationUnit [ ] compilationUnits = null ; try { compilationUnits = fragment . getCompilationUnits ( ) ; } catch ( JavaModelException e ) { } if ( compilationUnits == null ) continue ; for ( int j = <NUM_LIT:0> , max2 = compilationUnits . length ; j < max2 ; j ++ ) { getGeneratedResource ( compilationUnits [ j ] , container , state , rootPathSegmentCounts , collector ) ; } if ( includesNonJavaResources ) { Object [ ] nonJavaResources = null ; try { nonJavaResources = fragment . getNonJavaResources ( ) ; } catch ( JavaModelException e ) { } if ( nonJavaResources != null ) { addNonJavaResources ( nonJavaResources , container , rootPathSegmentCounts , collector ) ; } } break ; case IJavaElement . PACKAGE_FRAGMENT_ROOT : IPackageFragmentRoot fragmentRoot = ( IPackageFragmentRoot ) element ; if ( fragmentRoot . isArchive ( ) ) continue ; IJavaElement [ ] children = null ; try { children = fragmentRoot . getChildren ( ) ; } catch ( JavaModelException e ) { } if ( children == null ) continue ; for ( int j = <NUM_LIT:0> , max2 = children . length ; j < max2 ; j ++ ) { fragment = ( IPackageFragment ) children [ j ] ; ICompilationUnit [ ] units = null ; try { units = fragment . getCompilationUnits ( ) ; } catch ( JavaModelException e ) { } if ( units == null ) continue ; for ( int n = <NUM_LIT:0> , max3 = units . length ; n < max3 ; n ++ ) { getGeneratedResource ( units [ n ] , container , state , rootPathSegmentCounts , collector ) ; } if ( includesNonJavaResources ) { Object [ ] nonJavaResources = null ; try { nonJavaResources = fragment . getNonJavaResources ( ) ; } catch ( JavaModelException e ) { } if ( nonJavaResources != null ) { addNonJavaResources ( nonJavaResources , container , rootPathSegmentCounts , collector ) ; } } } break ; } } int size = collector . size ( ) ; if ( size != <NUM_LIT:0> ) { IResource [ ] result = new IResource [ size ] ; collector . toArray ( result ) ; return result ; } return NO_GENERATED_RESOURCES ; } private static void getGeneratedResource ( ICompilationUnit unit , IContainer container , State state , int rootPathSegmentCounts , ArrayList collector ) { IResource resource = unit . getResource ( ) ; char [ ] [ ] typeNames = state . getDefinedTypeNamesFor ( resource . getProjectRelativePath ( ) . toString ( ) ) ; if ( typeNames != null ) { IPath path = unit . getPath ( ) . removeFirstSegments ( rootPathSegmentCounts ) . removeLastSegments ( <NUM_LIT:1> ) ; for ( int j = <NUM_LIT:0> , max2 = typeNames . length ; j < max2 ; j ++ ) { IPath localPath = path . append ( new String ( typeNames [ j ] ) + "<STR_LIT:.class>" ) ; IResource member = container . findMember ( localPath ) ; if ( member != null && member . exists ( ) ) { collector . add ( member ) ; } } } else { IPath path = unit . getPath ( ) . removeFirstSegments ( rootPathSegmentCounts ) . removeLastSegments ( <NUM_LIT:1> ) ; path = path . append ( Util . getNameWithoutJavaLikeExtension ( unit . getElementName ( ) ) + "<STR_LIT:.class>" ) ; IResource member = container . findMember ( path ) ; if ( member != null && member . exists ( ) ) { collector . add ( member ) ; } } } public static JavaCore getJavaCore ( ) { return ( JavaCore ) getPlugin ( ) ; } public static String [ ] getJavaLikeExtensions ( ) { return CharOperation . toStrings ( Util . getJavaLikeExtensions ( ) ) ; } public static String getOption ( String optionName ) { return JavaModelManager . getJavaModelManager ( ) . getOption ( optionName ) ; } public static String getOptionForConfigurableSeverity ( int problemID ) { return CompilerOptions . optionKeyFromIrritant ( ProblemReporter . getIrritant ( problemID ) ) ; } public static Hashtable getOptions ( ) { return JavaModelManager . getJavaModelManager ( ) . getOptions ( ) ; } public static Plugin getPlugin ( ) { return JAVA_CORE_PLUGIN ; } public static IClasspathEntry getResolvedClasspathEntry ( IClasspathEntry entry ) { return JavaModelManager . getJavaModelManager ( ) . resolveVariableEntry ( entry , false ) ; } public static IPath getResolvedVariablePath ( IPath variablePath ) { return JavaModelManager . getJavaModelManager ( ) . getResolvedVariablePath ( variablePath , false ) ; } public static IWorkingCopy [ ] getSharedWorkingCopies ( IBufferFactory factory ) { if ( factory == null ) factory = BufferManager . getDefaultBufferManager ( ) . getDefaultBufferFactory ( ) ; return getWorkingCopies ( BufferFactoryWrapper . create ( factory ) ) ; } public static String [ ] getUserLibraryNames ( ) { return JavaModelManager . getUserLibraryManager ( ) . getUserLibraryNames ( ) ; } public static ICompilationUnit [ ] getWorkingCopies ( WorkingCopyOwner owner ) { JavaModelManager manager = JavaModelManager . getJavaModelManager ( ) ; if ( owner == null ) owner = DefaultWorkingCopyOwner . PRIMARY ; ICompilationUnit [ ] result = manager . getWorkingCopies ( owner , false ) ; if ( result == null ) return JavaModelManager . NO_WORKING_COPY ; return result ; } public static void initializeAfterLoad ( IProgressMonitor monitor ) throws CoreException { try { if ( monitor != null ) { monitor . beginTask ( Messages . javamodel_initialization , <NUM_LIT:100> ) ; monitor . subTask ( Messages . javamodel_configuring_classpath_containers ) ; } JavaModelManager manager = JavaModelManager . getJavaModelManager ( ) ; SubProgressMonitor subMonitor = null ; try { if ( monitor != null ) { subMonitor = new SubProgressMonitor ( monitor , <NUM_LIT> ) ; subMonitor . beginTask ( "<STR_LIT>" , <NUM_LIT:100> ) ; subMonitor . worked ( <NUM_LIT:5> ) ; manager . batchContainerInitializationsProgress . initializeAfterLoadMonitor . set ( subMonitor ) ; } if ( manager . forceBatchInitializations ( true ) ) { manager . getClasspathContainer ( Path . EMPTY , null ) ; } else { while ( manager . batchContainerInitializations == JavaModelManager . BATCH_INITIALIZATION_IN_PROGRESS ) { if ( subMonitor != null ) { subMonitor . subTask ( manager . batchContainerInitializationsProgress . subTaskName ) ; subMonitor . worked ( manager . batchContainerInitializationsProgress . getWorked ( ) ) ; } synchronized ( manager ) { try { manager . wait ( <NUM_LIT:100> ) ; } catch ( InterruptedException e ) { } } } } } finally { if ( subMonitor != null ) subMonitor . done ( ) ; manager . batchContainerInitializationsProgress . initializeAfterLoadMonitor . set ( null ) ; } if ( monitor != null ) monitor . subTask ( Messages . javamodel_resetting_source_attachment_properties ) ; final IJavaProject [ ] projects = manager . getJavaModel ( ) . getJavaProjects ( ) ; HashSet visitedPaths = new HashSet ( ) ; ExternalFoldersManager externalFoldersManager = JavaModelManager . getExternalManager ( ) ; for ( int i = <NUM_LIT:0> , length = projects . length ; i < length ; i ++ ) { JavaProject javaProject = ( JavaProject ) projects [ i ] ; IClasspathEntry [ ] classpath ; try { classpath = javaProject . getResolvedClasspath ( ) ; } catch ( JavaModelException e ) { continue ; } if ( classpath != null ) { for ( int j = <NUM_LIT:0> , length2 = classpath . length ; j < length2 ; j ++ ) { IClasspathEntry entry = classpath [ j ] ; if ( entry . getSourceAttachmentPath ( ) != null ) { IPath entryPath = entry . getPath ( ) ; if ( visitedPaths . add ( entryPath ) ) { Util . setSourceAttachmentProperty ( entryPath , null ) ; } } if ( entry . getEntryKind ( ) == IClasspathEntry . CPE_LIBRARY ) { IPath entryPath = entry . getPath ( ) ; if ( ExternalFoldersManager . isExternalFolderPath ( entryPath ) && externalFoldersManager . getFolder ( entryPath ) == null ) { externalFoldersManager . addFolder ( entryPath , true ) ; } } } } } try { externalFoldersManager . createPendingFolders ( monitor ) ; } catch ( JavaModelException jme ) { Util . log ( jme , "<STR_LIT>" ) ; } if ( monitor != null ) monitor . subTask ( Messages . javamodel_initializing_delta_state ) ; manager . deltaState . rootsAreStale = true ; manager . deltaState . initializeRoots ( true ) ; if ( monitor != null ) monitor . subTask ( Messages . javamodel_configuring_searchengine ) ; SearchEngine engine = new SearchEngine ( ) ; IJavaSearchScope scope = SearchEngine . createWorkspaceScope ( ) ; try { engine . searchAllTypeNames ( null , SearchPattern . R_EXACT_MATCH , "<STR_LIT>" . toCharArray ( ) , SearchPattern . R_PATTERN_MATCH | SearchPattern . R_CASE_SENSITIVE , IJavaSearchConstants . CLASS , scope , new TypeNameRequestor ( ) { public void acceptType ( int modifiers , char [ ] packageName , char [ ] simpleTypeName , char [ ] [ ] enclosingTypeNames , String path ) { } } , IJavaSearchConstants . CANCEL_IF_NOT_READY_TO_SEARCH , monitor == null ? null : new SubProgressMonitor ( monitor , <NUM_LIT> ) ) ; } catch ( JavaModelException e ) { } catch ( OperationCanceledException e ) { if ( monitor != null && monitor . isCanceled ( ) ) throw e ; } if ( monitor != null ) monitor . subTask ( Messages . javamodel_getting_build_state_number ) ; QualifiedName qName = new QualifiedName ( JavaCore . PLUGIN_ID , "<STR_LIT>" ) ; IWorkspaceRoot root = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) ; String versionNumber = null ; try { versionNumber = root . getPersistentProperty ( qName ) ; } catch ( CoreException e ) { } final JavaModel model = manager . getJavaModel ( ) ; String newVersionNumber = Byte . toString ( State . VERSION ) ; if ( ! newVersionNumber . equals ( versionNumber ) ) { if ( JavaBuilder . DEBUG ) System . out . println ( "<STR_LIT>" ) ; IWorkspaceRunnable runnable = new IWorkspaceRunnable ( ) { public void run ( IProgressMonitor progressMonitor2 ) throws CoreException { for ( int i = <NUM_LIT:0> , length = projects . length ; i < length ; i ++ ) { IJavaProject project = projects [ i ] ; try { if ( JavaBuilder . DEBUG ) System . out . println ( "<STR_LIT>" + project . getElementName ( ) ) ; new ClasspathValidation ( ( JavaProject ) project ) . validate ( ) ; project . getProject ( ) . touch ( progressMonitor2 ) ; } catch ( CoreException e ) { } } } } ; if ( monitor != null ) monitor . subTask ( Messages . javamodel_building_after_upgrade ) ; try { ResourcesPlugin . getWorkspace ( ) . run ( runnable , monitor ) ; } catch ( CoreException e ) { } try { root . setPersistentProperty ( qName , newVersionNumber ) ; } catch ( CoreException e ) { Util . log ( e , "<STR_LIT>" ) ; } } try { if ( monitor != null ) monitor . subTask ( Messages . javamodel_refreshing_external_jars ) ; model . refreshExternalArchives ( null , monitor == null ? null : new SubProgressMonitor ( monitor , <NUM_LIT:1> ) ) ; } catch ( JavaModelException e ) { } } finally { if ( monitor != null ) monitor . done ( ) ; } } public static boolean isClasspathVariableReadOnly ( String variableName ) { return JavaModelManager . getJavaModelManager ( ) . readOnlyVariables . contains ( variableName ) ; } public static boolean isJavaLikeFileName ( String fileName ) { return Util . isJavaLikeFileName ( fileName ) ; } public static boolean isReferencedBy ( IJavaElement element , IMarker marker ) throws CoreException { if ( element instanceof IMember ) { IMember member = ( IMember ) element ; if ( member . isBinary ( ) ) { element = member . getClassFile ( ) ; } else { element = member . getCompilationUnit ( ) ; } } if ( element == null ) return false ; if ( marker == null ) return false ; String markerHandleId = ( String ) marker . getAttribute ( ATT_HANDLE_ID ) ; if ( markerHandleId == null ) return false ; IJavaElement markerElement = JavaCore . create ( markerHandleId ) ; while ( true ) { if ( element . equals ( markerElement ) ) return true ; if ( markerElement instanceof IClassFile ) { IType enclosingType = ( ( IClassFile ) markerElement ) . getType ( ) . getDeclaringType ( ) ; if ( enclosingType != null ) { markerElement = enclosingType . getClassFile ( ) ; continue ; } } break ; } return false ; } public static boolean isReferencedBy ( IJavaElement element , IMarkerDelta markerDelta ) throws CoreException { if ( element instanceof IMember ) { IMember member = ( IMember ) element ; if ( member . isBinary ( ) ) { element = member . getClassFile ( ) ; } else { element = member . getCompilationUnit ( ) ; } } if ( element == null ) return false ; if ( markerDelta == null ) return false ; String markerDeltarHandleId = ( String ) markerDelta . getAttribute ( ATT_HANDLE_ID ) ; if ( markerDeltarHandleId == null ) return false ; IJavaElement markerElement = JavaCore . create ( markerDeltarHandleId ) ; while ( true ) { if ( element . equals ( markerElement ) ) return true ; if ( markerElement instanceof IClassFile ) { IType enclosingType = ( ( IClassFile ) markerElement ) . getType ( ) . getDeclaringType ( ) ; if ( enclosingType != null ) { markerElement = enclosingType . getClassFile ( ) ; continue ; } } break ; } return false ; } public static IAccessRule newAccessRule ( IPath filePattern , int kind ) { return new ClasspathAccessRule ( filePattern , kind ) ; } public static IClasspathAttribute newClasspathAttribute ( String name , String value ) { return new ClasspathAttribute ( name , value ) ; } public static IClasspathEntry newContainerEntry ( IPath containerPath ) { return newContainerEntry ( containerPath , ClasspathEntry . NO_ACCESS_RULES , ClasspathEntry . NO_EXTRA_ATTRIBUTES , false ) ; } public static IClasspathEntry newContainerEntry ( IPath containerPath , boolean isExported ) { return newContainerEntry ( containerPath , ClasspathEntry . NO_ACCESS_RULES , ClasspathEntry . NO_EXTRA_ATTRIBUTES , isExported ) ; } public static IClasspathEntry newContainerEntry ( IPath containerPath , IAccessRule [ ] accessRules , IClasspathAttribute [ ] extraAttributes , boolean isExported ) { if ( containerPath == null ) { throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" ) ; } else if ( containerPath . segmentCount ( ) < <NUM_LIT:1> ) { throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" + containerPath . makeRelative ( ) . toString ( ) + "<STR_LIT>" ) ; } if ( accessRules == null ) { accessRules = ClasspathEntry . NO_ACCESS_RULES ; } if ( extraAttributes == null ) { extraAttributes = ClasspathEntry . NO_EXTRA_ATTRIBUTES ; } return new ClasspathEntry ( IPackageFragmentRoot . K_SOURCE , IClasspathEntry . CPE_CONTAINER , containerPath , ClasspathEntry . INCLUDE_ALL , ClasspathEntry . EXCLUDE_NONE , null , null , null , isExported , accessRules , true , extraAttributes ) ; } public static ITypeHierarchy newTypeHierarchy ( IRegion region , WorkingCopyOwner owner , IProgressMonitor monitor ) throws JavaModelException { if ( region == null ) { throw new IllegalArgumentException ( Messages . hierarchy_nullRegion ) ; } ICompilationUnit [ ] workingCopies = JavaModelManager . getJavaModelManager ( ) . getWorkingCopies ( owner , true ) ; CreateTypeHierarchyOperation op = new CreateTypeHierarchyOperation ( region , workingCopies , null , true ) ; op . runOperation ( monitor ) ; return op . getResult ( ) ; } public static IClasspathEntry newLibraryEntry ( IPath path , IPath sourceAttachmentPath , IPath sourceAttachmentRootPath ) { return newLibraryEntry ( path , sourceAttachmentPath , sourceAttachmentRootPath , ClasspathEntry . NO_ACCESS_RULES , ClasspathEntry . NO_EXTRA_ATTRIBUTES , false ) ; } public static IClasspathEntry newLibraryEntry ( IPath path , IPath sourceAttachmentPath , IPath sourceAttachmentRootPath , boolean isExported ) { return newLibraryEntry ( path , sourceAttachmentPath , sourceAttachmentRootPath , ClasspathEntry . NO_ACCESS_RULES , ClasspathEntry . NO_EXTRA_ATTRIBUTES , isExported ) ; } public static IClasspathEntry newLibraryEntry ( IPath path , IPath sourceAttachmentPath , IPath sourceAttachmentRootPath , IAccessRule [ ] accessRules , IClasspathAttribute [ ] extraAttributes , boolean isExported ) { if ( path == null ) throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" ) ; if ( accessRules == null ) { accessRules = ClasspathEntry . NO_ACCESS_RULES ; } if ( extraAttributes == null ) { extraAttributes = ClasspathEntry . NO_EXTRA_ATTRIBUTES ; } boolean hasDotDot = ClasspathEntry . hasDotDot ( path ) ; if ( ! hasDotDot && ! path . isAbsolute ( ) ) throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" + path ) ; if ( sourceAttachmentPath != null ) { if ( sourceAttachmentPath . isEmpty ( ) ) { sourceAttachmentPath = null ; } else if ( ! sourceAttachmentPath . isAbsolute ( ) ) { throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" + sourceAttachmentPath + "<STR_LIT>" ) ; } } return new ClasspathEntry ( IPackageFragmentRoot . K_BINARY , IClasspathEntry . CPE_LIBRARY , hasDotDot ? path : JavaProject . canonicalizedPath ( path ) , ClasspathEntry . INCLUDE_ALL , ClasspathEntry . EXCLUDE_NONE , sourceAttachmentPath , sourceAttachmentRootPath , null , isExported , accessRules , false , extraAttributes ) ; } public static IClasspathEntry newProjectEntry ( IPath path ) { return newProjectEntry ( path , false ) ; } public static IClasspathEntry newProjectEntry ( IPath path , boolean isExported ) { if ( ! path . isAbsolute ( ) ) throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" ) ; return newProjectEntry ( path , ClasspathEntry . NO_ACCESS_RULES , true , ClasspathEntry . NO_EXTRA_ATTRIBUTES , isExported ) ; } public static IClasspathEntry newProjectEntry ( IPath path , IAccessRule [ ] accessRules , boolean combineAccessRules , IClasspathAttribute [ ] extraAttributes , boolean isExported ) { if ( ! path . isAbsolute ( ) ) throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" ) ; if ( accessRules == null ) { accessRules = ClasspathEntry . NO_ACCESS_RULES ; } if ( extraAttributes == null ) { extraAttributes = ClasspathEntry . NO_EXTRA_ATTRIBUTES ; } return new ClasspathEntry ( IPackageFragmentRoot . K_SOURCE , IClasspathEntry . CPE_PROJECT , path , ClasspathEntry . INCLUDE_ALL , ClasspathEntry . EXCLUDE_NONE , null , null , null , isExported , accessRules , combineAccessRules , extraAttributes ) ; } public static IRegion newRegion ( ) { return new Region ( ) ; } public static IClasspathEntry newSourceEntry ( IPath path ) { return newSourceEntry ( path , ClasspathEntry . INCLUDE_ALL , ClasspathEntry . EXCLUDE_NONE , null ) ; } public static IClasspathEntry newSourceEntry ( IPath path , IPath [ ] exclusionPatterns ) { return newSourceEntry ( path , ClasspathEntry . INCLUDE_ALL , exclusionPatterns , null ) ; } public static IClasspathEntry newSourceEntry ( IPath path , IPath [ ] exclusionPatterns , IPath specificOutputLocation ) { return newSourceEntry ( path , ClasspathEntry . INCLUDE_ALL , exclusionPatterns , specificOutputLocation ) ; } public static IClasspathEntry newSourceEntry ( IPath path , IPath [ ] inclusionPatterns , IPath [ ] exclusionPatterns , IPath specificOutputLocation ) { return newSourceEntry ( path , inclusionPatterns , exclusionPatterns , specificOutputLocation , ClasspathEntry . NO_EXTRA_ATTRIBUTES ) ; } public static IClasspathEntry newSourceEntry ( IPath path , IPath [ ] inclusionPatterns , IPath [ ] exclusionPatterns , IPath specificOutputLocation , IClasspathAttribute [ ] extraAttributes ) { if ( path == null ) throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" ) ; if ( ! path . isAbsolute ( ) ) throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" ) ; if ( exclusionPatterns == null ) { exclusionPatterns = ClasspathEntry . EXCLUDE_NONE ; } if ( inclusionPatterns == null ) { inclusionPatterns = ClasspathEntry . INCLUDE_ALL ; } if ( extraAttributes == null ) { extraAttributes = ClasspathEntry . NO_EXTRA_ATTRIBUTES ; } return new ClasspathEntry ( IPackageFragmentRoot . K_SOURCE , IClasspathEntry . CPE_SOURCE , path , inclusionPatterns , exclusionPatterns , null , null , specificOutputLocation , false , null , false , extraAttributes ) ; } public static IClasspathEntry newVariableEntry ( IPath variablePath , IPath variableSourceAttachmentPath , IPath sourceAttachmentRootPath ) { return newVariableEntry ( variablePath , variableSourceAttachmentPath , sourceAttachmentRootPath , false ) ; } public static IClasspathEntry newVariableEntry ( IPath variablePath , IPath variableSourceAttachmentPath , IPath variableSourceAttachmentRootPath , boolean isExported ) { return newVariableEntry ( variablePath , variableSourceAttachmentPath , variableSourceAttachmentRootPath , ClasspathEntry . NO_ACCESS_RULES , ClasspathEntry . NO_EXTRA_ATTRIBUTES , isExported ) ; } public static IClasspathEntry newVariableEntry ( IPath variablePath , IPath variableSourceAttachmentPath , IPath variableSourceAttachmentRootPath , IAccessRule [ ] accessRules , IClasspathAttribute [ ] extraAttributes , boolean isExported ) { if ( variablePath == null ) throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" ) ; if ( variablePath . segmentCount ( ) < <NUM_LIT:1> ) { throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" + variablePath . makeRelative ( ) . toString ( ) + "<STR_LIT>" ) ; } if ( accessRules == null ) { accessRules = ClasspathEntry . NO_ACCESS_RULES ; } if ( extraAttributes == null ) { extraAttributes = ClasspathEntry . NO_EXTRA_ATTRIBUTES ; } return new ClasspathEntry ( IPackageFragmentRoot . K_SOURCE , IClasspathEntry . CPE_VARIABLE , variablePath , ClasspathEntry . INCLUDE_ALL , ClasspathEntry . EXCLUDE_NONE , variableSourceAttachmentPath , variableSourceAttachmentRootPath , null , isExported , accessRules , false , extraAttributes ) ; } public static IClasspathEntry [ ] getReferencedClasspathEntries ( IClasspathEntry libraryEntry , IJavaProject project ) { JavaModelManager manager = JavaModelManager . getJavaModelManager ( ) ; return manager . getReferencedClasspathEntries ( libraryEntry , project ) ; } public static void removeClasspathVariable ( String variableName ) { removeClasspathVariable ( variableName , null ) ; } public static void removeClasspathVariable ( String variableName , IProgressMonitor monitor ) { try { SetVariablesOperation operation = new SetVariablesOperation ( new String [ ] { variableName } , new IPath [ ] { null } , true ) ; operation . runOperation ( monitor ) ; } catch ( JavaModelException e ) { Util . log ( e , "<STR_LIT>" + variableName ) ; } } public static void removeElementChangedListener ( IElementChangedListener listener ) { JavaModelManager . getDeltaState ( ) . removeElementChangedListener ( listener ) ; } public static String removeJavaLikeExtension ( String fileName ) { return Util . getNameWithoutJavaLikeExtension ( fileName ) ; } public static void removePreProcessingResourceChangedListener ( IResourceChangeListener listener ) { JavaModelManager . getDeltaState ( ) . removePreResourceChangedListener ( listener ) ; } public static void run ( IWorkspaceRunnable action , IProgressMonitor monitor ) throws CoreException { run ( action , ResourcesPlugin . getWorkspace ( ) . getRoot ( ) , monitor ) ; } public static void run ( IWorkspaceRunnable action , ISchedulingRule rule , IProgressMonitor monitor ) throws CoreException { IWorkspace workspace = ResourcesPlugin . getWorkspace ( ) ; if ( workspace . isTreeLocked ( ) ) { new BatchOperation ( action ) . run ( monitor ) ; } else { workspace . run ( new BatchOperation ( action ) , rule , IWorkspace . AVOID_UPDATE , monitor ) ; } } public static void setClasspathContainer ( IPath containerPath , IJavaProject [ ] affectedProjects , IClasspathContainer [ ] respectiveContainers , IProgressMonitor monitor ) throws JavaModelException { if ( affectedProjects . length != respectiveContainers . length ) throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" ) ; if ( affectedProjects . length == <NUM_LIT:1> ) { IClasspathContainer container = respectiveContainers [ <NUM_LIT:0> ] ; if ( container != null ) { JavaModelManager manager = JavaModelManager . getJavaModelManager ( ) ; IJavaProject project = affectedProjects [ <NUM_LIT:0> ] ; IClasspathContainer existingCointainer = manager . containerGet ( project , containerPath ) ; if ( existingCointainer == JavaModelManager . CONTAINER_INITIALIZATION_IN_PROGRESS ) { manager . containerBeingInitializedPut ( project , containerPath , container ) ; return ; } } } SetContainerOperation operation = new SetContainerOperation ( containerPath , affectedProjects , respectiveContainers ) ; operation . runOperation ( monitor ) ; } public static void setClasspathVariable ( String variableName , IPath path ) throws JavaModelException { setClasspathVariable ( variableName , path , null ) ; } public static void setClasspathVariable ( String variableName , IPath path , IProgressMonitor monitor ) throws JavaModelException { if ( path == null ) throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" ) ; setClasspathVariables ( new String [ ] { variableName } , new IPath [ ] { path } , monitor ) ; } public static void setClasspathVariables ( String [ ] variableNames , IPath [ ] paths , IProgressMonitor monitor ) throws JavaModelException { if ( variableNames . length != paths . length ) throw new ClasspathEntry . AssertionFailedException ( "<STR_LIT>" ) ; SetVariablesOperation operation = new SetVariablesOperation ( variableNames , paths , true ) ; operation . runOperation ( monitor ) ; } public static void setComplianceOptions ( String compliance , Map options ) { switch ( ( int ) ( CompilerOptions . versionToJdkLevel ( compliance ) > > > <NUM_LIT:16> ) ) { case ClassFileConstants . MAJOR_VERSION_1_3 : options . put ( JavaCore . COMPILER_COMPLIANCE , JavaCore . VERSION_1_3 ) ; options . put ( JavaCore . COMPILER_SOURCE , JavaCore . VERSION_1_3 ) ; options . put ( JavaCore . COMPILER_CODEGEN_TARGET_PLATFORM , JavaCore . VERSION_1_1 ) ; options . put ( JavaCore . COMPILER_PB_ASSERT_IDENTIFIER , JavaCore . IGNORE ) ; options . put ( JavaCore . COMPILER_PB_ENUM_IDENTIFIER , JavaCore . IGNORE ) ; break ; case ClassFileConstants . MAJOR_VERSION_1_4 : options . put ( JavaCore . COMPILER_COMPLIANCE , JavaCore . VERSION_1_4 ) ; options . put ( JavaCore . COMPILER_SOURCE , JavaCore . VERSION_1_3 ) ; options . put ( JavaCore . COMPILER_CODEGEN_TARGET_PLATFORM , JavaCore . VERSION_1_2 ) ; options . put ( JavaCore . COMPILER_PB_ASSERT_IDENTIFIER , JavaCore . WARNING ) ; options . put ( JavaCore . COMPILER_PB_ENUM_IDENTIFIER , JavaCore . WARNING ) ; break ; case ClassFileConstants . MAJOR_VERSION_1_5 : options . put ( JavaCore . COMPILER_COMPLIANCE , JavaCore . VERSION_1_5 ) ; options . put ( JavaCore . COMPILER_SOURCE , JavaCore . VERSION_1_5 ) ; options . put ( JavaCore . COMPILER_CODEGEN_TARGET_PLATFORM , JavaCore . VERSION_1_5 ) ; options . put ( JavaCore . COMPILER_PB_ASSERT_IDENTIFIER , JavaCore . ERROR ) ; options . put ( JavaCore . COMPILER_PB_ENUM_IDENTIFIER , JavaCore . ERROR ) ; options . put ( JavaCore . COMPILER_CODEGEN_INLINE_JSR_BYTECODE , JavaCore . ENABLED ) ; break ; case ClassFileConstants . MAJOR_VERSION_1_6 : options . put ( JavaCore . COMPILER_COMPLIANCE , JavaCore . VERSION_1_6 ) ; options . put ( JavaCore . COMPILER_SOURCE , JavaCore . VERSION_1_6 ) ; options . put ( JavaCore . COMPILER_CODEGEN_TARGET_PLATFORM , JavaCore . VERSION_1_6 ) ; options . put ( JavaCore . COMPILER_PB_ASSERT_IDENTIFIER , JavaCore . ERROR ) ; options . put ( JavaCore . COMPILER_PB_ENUM_IDENTIFIER , JavaCore . ERROR ) ; options . put ( JavaCore . COMPILER_CODEGEN_INLINE_JSR_BYTECODE , JavaCore . ENABLED ) ; break ; case ClassFileConstants . MAJOR_VERSION_1_7 : options . put ( JavaCore . COMPILER_COMPLIANCE , JavaCore . VERSION_1_7 ) ; options . put ( JavaCore . COMPILER_SOURCE , JavaCore . VERSION_1_7 ) ; options . put ( JavaCore . COMPILER_CODEGEN_TARGET_PLATFORM , JavaCore . VERSION_1_7 ) ; options . put ( JavaCore . COMPILER_PB_ASSERT_IDENTIFIER , JavaCore . ERROR ) ; options . put ( JavaCore . COMPILER_PB_ENUM_IDENTIFIER , JavaCore . ERROR ) ; options . put ( JavaCore . COMPILER_CODEGEN_INLINE_JSR_BYTECODE , JavaCore . ENABLED ) ; } } public static void setOptions ( Hashtable newOptions ) { JavaModelManager . getJavaModelManager ( ) . setOptions ( newOptions ) ; } public void stop ( BundleContext context ) throws Exception { try { JavaModelManager . getJavaModelManager ( ) . shutdown ( ) ; } finally { super . stop ( context ) ; } } public void start ( BundleContext context ) throws Exception { super . start ( context ) ; JavaModelManager . getJavaModelManager ( ) . startup ( ) ; } } </s>
<s> package org . eclipse . jdt . core ; import org . eclipse . core . resources . IMarker ; import org . eclipse . core . resources . IResource ; import org . eclipse . core . runtime . IProgressMonitor ; public interface IWorkingCopy { void commit ( boolean force , IProgressMonitor monitor ) throws JavaModelException ; void destroy ( ) ; IJavaElement findSharedWorkingCopy ( IBufferFactory bufferFactory ) ; IJavaElement getOriginal ( IJavaElement workingCopyElement ) ; IJavaElement getOriginalElement ( ) ; IJavaElement [ ] findElements ( IJavaElement element ) ; IType findPrimaryType ( ) ; IJavaElement getSharedWorkingCopy ( IProgressMonitor monitor , IBufferFactory factory , IProblemRequestor problemRequestor ) throws JavaModelException ; IJavaElement getWorkingCopy ( ) throws JavaModelException ; IJavaElement getWorkingCopy ( IProgressMonitor monitor , IBufferFactory factory , IProblemRequestor problemRequestor ) throws JavaModelException ; boolean isBasedOn ( IResource resource ) ; boolean isWorkingCopy ( ) ; IMarker [ ] reconcile ( ) throws JavaModelException ; void reconcile ( boolean forceProblemDetection , IProgressMonitor monitor ) throws JavaModelException ; void restore ( ) throws JavaModelException ; } </s>
<s> package org . eclipse . jdt . core ; public interface IInitializer extends IMember { } </s>
<s> package org . eclipse . jdt . core ; import java . io . PrintStream ; import java . io . PrintWriter ; import org . eclipse . core . runtime . CoreException ; import org . eclipse . core . runtime . IStatus ; import org . eclipse . jdt . internal . core . JavaModelStatus ; public class JavaModelException extends CoreException { private static final long serialVersionUID = - <NUM_LIT> ; CoreException nestedCoreException ; public JavaModelException ( Throwable e , int code ) { this ( new JavaModelStatus ( code , e ) ) ; } public JavaModelException ( CoreException exception ) { super ( exception . getStatus ( ) ) ; this . nestedCoreException = exception ; } public JavaModelException ( IJavaModelStatus status ) { super ( status ) ; } public Throwable getException ( ) { if ( this . nestedCoreException == null ) { return getStatus ( ) . getException ( ) ; } else { return this . nestedCoreException ; } } public IJavaModelStatus getJavaModelStatus ( ) { IStatus status = getStatus ( ) ; if ( status instanceof IJavaModelStatus ) { return ( IJavaModelStatus ) status ; } else { return new JavaModelStatus ( this . nestedCoreException ) ; } } public boolean isDoesNotExist ( ) { IJavaModelStatus javaModelStatus = getJavaModelStatus ( ) ; return javaModelStatus != null && javaModelStatus . isDoesNotExist ( ) ; } public void printStackTrace ( PrintStream output ) { synchronized ( output ) { super . printStackTrace ( output ) ; Throwable throwable = getException ( ) ; if ( throwable != null ) { output . print ( "<STR_LIT>" ) ; throwable . printStackTrace ( output ) ; } } } public void printStackTrace ( PrintWriter output ) { synchronized ( output ) { super . printStackTrace ( output ) ; Throwable throwable = getException ( ) ; if ( throwable != null ) { output . print ( "<STR_LIT>" ) ; throwable . printStackTrace ( output ) ; } } } public String toString ( ) { StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( "<STR_LIT>" ) ; if ( getException ( ) != null ) { if ( getException ( ) instanceof CoreException ) { CoreException c = ( CoreException ) getException ( ) ; buffer . append ( "<STR_LIT>" ) ; buffer . append ( c . getStatus ( ) . getCode ( ) ) ; buffer . append ( "<STR_LIT>" ) ; buffer . append ( c . getStatus ( ) . getMessage ( ) ) ; } else { buffer . append ( getException ( ) . toString ( ) ) ; } } else { buffer . append ( getStatus ( ) . toString ( ) ) ; } return buffer . toString ( ) ; } } </s>
<s> package org . eclipse . jdt . core ; public interface IParent { IJavaElement [ ] getChildren ( ) throws JavaModelException ; boolean hasChildren ( ) throws JavaModelException ; } </s>
<s> package org . eclipse . jdt . core ; public final class CompletionFlags { public static final int Default = <NUM_LIT> ; public static final int StaticImport = <NUM_LIT> ; private CompletionFlags ( ) { } public static boolean isStaticImport ( int flags ) { return ( flags & StaticImport ) != <NUM_LIT:0> ; } } </s>
<s> package org . eclipse . jdt . core ; import org . eclipse . core . runtime . IProgressMonitor ; public interface IPackageFragment extends IParent , IJavaElement , IOpenable , ISourceManipulation { public static final String DEFAULT_PACKAGE_NAME = "<STR_LIT>" ; boolean containsJavaResources ( ) throws JavaModelException ; ICompilationUnit createCompilationUnit ( String name , String contents , boolean force , IProgressMonitor monitor ) throws JavaModelException ; IClassFile getClassFile ( String name ) ; IClassFile [ ] getClassFiles ( ) throws JavaModelException ; ICompilationUnit getCompilationUnit ( String name ) ; ICompilationUnit [ ] getCompilationUnits ( ) throws JavaModelException ; ICompilationUnit [ ] getCompilationUnits ( WorkingCopyOwner owner ) throws JavaModelException ; String getElementName ( ) ; int getKind ( ) throws JavaModelException ; Object [ ] getNonJavaResources ( ) throws JavaModelException ; boolean hasSubpackages ( ) throws JavaModelException ; boolean isDefaultPackage ( ) ; } </s>
<s> package org . eclipse . jdt . core ; import org . eclipse . jdt . core . compiler . IProblem ; public interface IProblemRequestor { void acceptProblem ( IProblem problem ) ; void beginReporting ( ) ; void endReporting ( ) ; boolean isActive ( ) ; } </s>
<s> package org . eclipse . jdt . core ; import org . eclipse . core . resources . IResource ; import org . eclipse . core . runtime . IAdaptable ; import org . eclipse . core . runtime . IPath ; import org . eclipse . core . runtime . IProgressMonitor ; import org . eclipse . core . runtime . jobs . ISchedulingRule ; public interface IJavaElement extends IAdaptable { int JAVA_MODEL = <NUM_LIT:1> ; int JAVA_PROJECT = <NUM_LIT:2> ; int PACKAGE_FRAGMENT_ROOT = <NUM_LIT:3> ; int PACKAGE_FRAGMENT = <NUM_LIT:4> ; int COMPILATION_UNIT = <NUM_LIT:5> ; int CLASS_FILE = <NUM_LIT:6> ; int TYPE = <NUM_LIT:7> ; int FIELD = <NUM_LIT:8> ; int METHOD = <NUM_LIT:9> ; int INITIALIZER = <NUM_LIT:10> ; int PACKAGE_DECLARATION = <NUM_LIT:11> ; int IMPORT_CONTAINER = <NUM_LIT:12> ; int IMPORT_DECLARATION = <NUM_LIT> ; int LOCAL_VARIABLE = <NUM_LIT> ; int TYPE_PARAMETER = <NUM_LIT:15> ; int ANNOTATION = <NUM_LIT:16> ; boolean exists ( ) ; IJavaElement getAncestor ( int ancestorType ) ; String getAttachedJavadoc ( IProgressMonitor monitor ) throws JavaModelException ; IResource getCorrespondingResource ( ) throws JavaModelException ; String getElementName ( ) ; int getElementType ( ) ; String getHandleIdentifier ( ) ; IJavaModel getJavaModel ( ) ; IJavaProject getJavaProject ( ) ; IOpenable getOpenable ( ) ; IJavaElement getParent ( ) ; IPath getPath ( ) ; IJavaElement getPrimaryElement ( ) ; IResource getResource ( ) ; ISchedulingRule getSchedulingRule ( ) ; IResource getUnderlyingResource ( ) throws JavaModelException ; boolean isReadOnly ( ) ; boolean isStructureKnown ( ) throws JavaModelException ; } </s>
<s> package org . eclipse . jdt . core . compiler ; import org . eclipse . core . resources . IFile ; public class BuildContext { public char [ ] getContents ( ) { return null ; } public IFile getFile ( ) { return null ; } public boolean hasAnnotations ( ) { return false ; } public void recordAddedGeneratedFiles ( IFile [ ] addedGeneratedFiles ) { } public void recordDeletedGeneratedFiles ( IFile [ ] deletedGeneratedFiles ) { } public void recordDependencies ( String [ ] typeNameDependencies ) { } public void recordNewProblems ( CategorizedProblem [ ] newProblems ) { } } </s>
<s> package org . eclipse . jdt . core . compiler ; public interface ITerminalSymbols { int TokenNameWHITESPACE = <NUM_LIT:1000> ; int TokenNameCOMMENT_LINE = <NUM_LIT> ; int TokenNameCOMMENT_BLOCK = <NUM_LIT> ; int TokenNameCOMMENT_JAVADOC = <NUM_LIT> ; int TokenNameIdentifier = <NUM_LIT:5> ; int TokenNameabstract = <NUM_LIT> ; int TokenNameassert = <NUM_LIT> ; int TokenNameboolean = <NUM_LIT> ; int TokenNamebreak = <NUM_LIT> ; int TokenNamebyte = <NUM_LIT> ; int TokenNamecase = <NUM_LIT> ; int TokenNamecatch = <NUM_LIT> ; int TokenNamechar = <NUM_LIT:20> ; int TokenNameclass = <NUM_LIT> ; int TokenNamecontinue = <NUM_LIT> ; int TokenNamedefault = <NUM_LIT> ; int TokenNamedo = <NUM_LIT> ; int TokenNamedouble = <NUM_LIT> ; int TokenNameelse = <NUM_LIT> ; int TokenNameextends = <NUM_LIT> ; int TokenNamefalse = <NUM_LIT> ; int TokenNamefinal = <NUM_LIT> ; int TokenNamefinally = <NUM_LIT> ; int TokenNamefloat = <NUM_LIT> ; int TokenNamefor = <NUM_LIT> ; int TokenNameif = <NUM_LIT> ; int TokenNameimplements = <NUM_LIT> ; int TokenNameimport = <NUM_LIT> ; int TokenNameinstanceof = <NUM_LIT> ; int TokenNameint = <NUM_LIT> ; int TokenNameinterface = <NUM_LIT> ; int TokenNamelong = <NUM_LIT:24> ; int TokenNamenative = <NUM_LIT:100> ; int TokenNamenew = <NUM_LIT:32> ; int TokenNamenull = <NUM_LIT> ; int TokenNamepackage = <NUM_LIT> ; int TokenNameprivate = <NUM_LIT> ; int TokenNameprotected = <NUM_LIT> ; int TokenNamepublic = <NUM_LIT> ; int TokenNamereturn = <NUM_LIT> ; int TokenNameshort = <NUM_LIT> ; int TokenNamestatic = <NUM_LIT> ; int TokenNamestrictfp = <NUM_LIT> ; int TokenNamesuper = <NUM_LIT> ; int TokenNameswitch = <NUM_LIT> ; int TokenNamesynchronized = <NUM_LIT> ; int TokenNamethis = <NUM_LIT> ; int TokenNamethrow = <NUM_LIT> ; int TokenNamethrows = <NUM_LIT> ; int TokenNametransient = <NUM_LIT> ; int TokenNametrue = <NUM_LIT> ; int TokenNametry = <NUM_LIT> ; int TokenNamevoid = <NUM_LIT> ; int TokenNamevolatile = <NUM_LIT> ; int TokenNamewhile = <NUM_LIT> ; int TokenNameIntegerLiteral = <NUM_LIT> ; int TokenNameLongLiteral = <NUM_LIT> ; int TokenNameFloatingPointLiteral = <NUM_LIT> ; int TokenNameDoubleLiteral = <NUM_LIT> ; int TokenNameCharacterLiteral = <NUM_LIT> ; int TokenNameStringLiteral = <NUM_LIT> ; int TokenNamePLUS_PLUS = <NUM_LIT:1> ; int TokenNameMINUS_MINUS = <NUM_LIT:2> ; int TokenNameEQUAL_EQUAL = <NUM_LIT> ; int TokenNameLESS_EQUAL = <NUM_LIT> ; int TokenNameGREATER_EQUAL = <NUM_LIT> ; int TokenNameNOT_EQUAL = <NUM_LIT> ; int TokenNameLEFT_SHIFT = <NUM_LIT> ; int TokenNameRIGHT_SHIFT = <NUM_LIT:11> ; int TokenNameUNSIGNED_RIGHT_SHIFT = <NUM_LIT:12> ; int TokenNamePLUS_EQUAL = <NUM_LIT> ; int TokenNameMINUS_EQUAL = <NUM_LIT> ; int TokenNameMULTIPLY_EQUAL = <NUM_LIT> ; int TokenNameDIVIDE_EQUAL = <NUM_LIT> ; int TokenNameAND_EQUAL = <NUM_LIT> ; int TokenNameOR_EQUAL = <NUM_LIT> ; int TokenNameXOR_EQUAL = <NUM_LIT> ; int TokenNameREMAINDER_EQUAL = <NUM_LIT> ; int TokenNameLEFT_SHIFT_EQUAL = <NUM_LIT> ; int TokenNameRIGHT_SHIFT_EQUAL = <NUM_LIT> ; int TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL = <NUM_LIT> ; int TokenNameOR_OR = <NUM_LIT> ; int TokenNameAND_AND = <NUM_LIT> ; int TokenNamePLUS = <NUM_LIT:3> ; int TokenNameMINUS = <NUM_LIT:4> ; int TokenNameNOT = <NUM_LIT> ; int TokenNameREMAINDER = <NUM_LIT:9> ; int TokenNameXOR = <NUM_LIT> ; int TokenNameAND = <NUM_LIT> ; int TokenNameMULTIPLY = <NUM_LIT:8> ; int TokenNameOR = <NUM_LIT> ; int TokenNameTWIDDLE = <NUM_LIT> ; int TokenNameDIVIDE = <NUM_LIT:10> ; int TokenNameGREATER = <NUM_LIT> ; int TokenNameLESS = <NUM_LIT> ; int TokenNameLPAREN = <NUM_LIT:7> ; int TokenNameRPAREN = <NUM_LIT> ; int TokenNameLBRACE = <NUM_LIT> ; int TokenNameRBRACE = <NUM_LIT> ; int TokenNameLBRACKET = <NUM_LIT:15> ; int TokenNameRBRACKET = <NUM_LIT> ; int TokenNameSEMICOLON = <NUM_LIT> ; int TokenNameQUESTION = <NUM_LIT> ; int TokenNameCOLON = <NUM_LIT> ; int TokenNameCOMMA = <NUM_LIT> ; int TokenNameDOT = <NUM_LIT:6> ; int TokenNameEQUAL = <NUM_LIT> ; int TokenNameEOF = <NUM_LIT> ; int TokenNameERROR = <NUM_LIT> ; int TokenNameenum = <NUM_LIT> ; int TokenNameAT = <NUM_LIT> ; int TokenNameELLIPSIS = <NUM_LIT> ; int TokenNameconst = <NUM_LIT> ; int TokenNamegoto = <NUM_LIT> ; } </s>
<s> package org . eclipse . jdt . core . compiler ; import org . eclipse . jdt . core . IJavaProject ; public abstract class CompilationParticipant { public final static int READY_FOR_BUILD = <NUM_LIT:1> ; public final static int NEEDS_FULL_BUILD = <NUM_LIT:2> ; public int aboutToBuild ( IJavaProject project ) { return READY_FOR_BUILD ; } public void buildFinished ( IJavaProject project ) { } public void buildStarting ( BuildContext [ ] files , boolean isBatch ) { } public void cleanStarting ( IJavaProject project ) { } public boolean isActive ( IJavaProject project ) { return false ; } public boolean isAnnotationProcessor ( ) { return false ; } public void processAnnotations ( BuildContext [ ] files ) { } public void reconcile ( ReconcileContext context ) { } } </s>
<s> package org . eclipse . jdt . core . compiler ; import org . eclipse . jdt . core . compiler . InvalidInputException ; public interface IScanner { char [ ] getCurrentTokenSource ( ) ; char [ ] getRawTokenSource ( ) ; int getCurrentTokenStartPosition ( ) ; int getCurrentTokenEndPosition ( ) ; int getLineStart ( int lineNumber ) ; int getLineEnd ( int lineNumber ) ; int [ ] getLineEnds ( ) ; int getLineNumber ( int charPosition ) ; int getNextToken ( ) throws InvalidInputException ; char [ ] getSource ( ) ; void resetTo ( int startPosition , int endPosition ) ; void setSource ( char [ ] source ) ; } </s>
<s> package org . eclipse . jdt . core . compiler ; import java . util . HashMap ; import org . eclipse . jdt . core . ICompilationUnit ; import org . eclipse . jdt . core . IJavaElementDelta ; import org . eclipse . jdt . core . IJavaModelMarker ; import org . eclipse . jdt . core . JavaModelException ; import org . eclipse . jdt . core . dom . AST ; import org . eclipse . jdt . core . dom . ASTParser ; import org . eclipse . jdt . internal . core . CompilationUnit ; import org . eclipse . jdt . internal . core . JavaProject ; import org . eclipse . jdt . internal . core . ReconcileWorkingCopyOperation ; public class ReconcileContext { private ReconcileWorkingCopyOperation operation ; private CompilationUnit workingCopy ; public ReconcileContext ( ReconcileWorkingCopyOperation operation , CompilationUnit workingCopy ) { this . operation = operation ; this . workingCopy = workingCopy ; } public org . eclipse . jdt . core . dom . CompilationUnit getAST3 ( ) throws JavaModelException { if ( this . operation . astLevel != AST . JLS3 || ! this . operation . resolveBindings ) { ASTParser parser = ASTParser . newParser ( AST . JLS3 ) ; parser . setCompilerOptions ( this . workingCopy . getJavaProject ( ) . getOptions ( true ) ) ; if ( JavaProject . hasJavaNature ( this . workingCopy . getJavaProject ( ) . getProject ( ) ) ) parser . setResolveBindings ( true ) ; parser . setStatementsRecovery ( ( this . operation . reconcileFlags & ICompilationUnit . ENABLE_STATEMENTS_RECOVERY ) != <NUM_LIT:0> ) ; parser . setBindingsRecovery ( ( this . operation . reconcileFlags & ICompilationUnit . ENABLE_BINDINGS_RECOVERY ) != <NUM_LIT:0> ) ; parser . setSource ( this . workingCopy ) ; parser . setIgnoreMethodBodies ( ( this . operation . reconcileFlags & ICompilationUnit . IGNORE_METHOD_BODIES ) != <NUM_LIT:0> ) ; return ( org . eclipse . jdt . core . dom . CompilationUnit ) parser . createAST ( this . operation . progressMonitor ) ; } return this . operation . makeConsistent ( this . workingCopy ) ; } public org . eclipse . jdt . core . dom . CompilationUnit getAST4 ( ) throws JavaModelException { if ( this . operation . astLevel != AST . JLS4 || ! this . operation . resolveBindings ) { ASTParser parser = ASTParser . newParser ( AST . JLS4 ) ; parser . setCompilerOptions ( this . workingCopy . getJavaProject ( ) . getOptions ( true ) ) ; if ( JavaProject . hasJavaNature ( this . workingCopy . getJavaProject ( ) . getProject ( ) ) ) parser . setResolveBindings ( true ) ; parser . setStatementsRecovery ( ( this . operation . reconcileFlags & ICompilationUnit . ENABLE_STATEMENTS_RECOVERY ) != <NUM_LIT:0> ) ; parser . setBindingsRecovery ( ( this . operation . reconcileFlags & ICompilationUnit . ENABLE_BINDINGS_RECOVERY ) != <NUM_LIT:0> ) ; parser . setSource ( this . workingCopy ) ; parser . setIgnoreMethodBodies ( ( this . operation . reconcileFlags & ICompilationUnit . IGNORE_METHOD_BODIES ) != <NUM_LIT:0> ) ; return ( org . eclipse . jdt . core . dom . CompilationUnit ) parser . createAST ( this . operation . progressMonitor ) ; } return this . operation . makeConsistent ( this . workingCopy ) ; } public int getASTLevel ( ) { return this . operation . astLevel ; } public boolean isResolvingBindings ( ) { return this . operation . resolveBindings ; } public int getReconcileFlags ( ) { return this . operation . reconcileFlags ; } public IJavaElementDelta getDelta ( ) { return this . operation . deltaBuilder . delta ; } public CategorizedProblem [ ] getProblems ( String markerType ) { if ( this . operation . problems == null ) return null ; return ( CategorizedProblem [ ] ) this . operation . problems . get ( markerType ) ; } public ICompilationUnit getWorkingCopy ( ) { return this . workingCopy ; } public void resetAST ( ) { this . operation . ast = null ; putProblems ( IJavaModelMarker . JAVA_MODEL_PROBLEM_MARKER , null ) ; putProblems ( IJavaModelMarker . TASK_MARKER , null ) ; } public void putProblems ( String markerType , CategorizedProblem [ ] problems ) { if ( this . operation . problems == null ) this . operation . problems = new HashMap ( ) ; this . operation . problems . put ( markerType , problems ) ; } } </s>
<s> package org . eclipse . jdt . core . jdom ; public interface IDOMType extends IDOMMember { public void addSuperInterface ( String interfaceName ) throws IllegalArgumentException ; String [ ] getTypeParameters ( ) ; public String getName ( ) ; public String getSuperclass ( ) ; public String [ ] getSuperInterfaces ( ) ; public boolean isClass ( ) ; boolean isEnum ( ) ; boolean isAnnotation ( ) ; public void setClass ( boolean b ) ; public void setEnum ( boolean b ) ; public void setAnnotation ( boolean b ) ; void setTypeParameters ( String [ ] typeParameters ) ; public void setName ( String name ) throws IllegalArgumentException ; public void setSuperclass ( String superclassName ) ; public void setSuperInterfaces ( String [ ] interfaceNames ) ; } </s>
<s> package org . eclipse . jdt . core . jdom ; public interface IDOMCompilationUnit extends IDOMNode { public String getHeader ( ) ; public String getName ( ) ; public void setHeader ( String comment ) ; public void setName ( String name ) ; } </s>
<s> package org . eclipse . jdt . core . jdom ; public interface IDOMInitializer extends IDOMMember { public String getBody ( ) ; public String getName ( ) ; public void setBody ( String body ) ; public void setName ( String name ) ; } </s>
<s> package org . eclipse . jdt . core . jdom ; public interface IDOMImport extends IDOMNode { public String getName ( ) ; public boolean isOnDemand ( ) ; int getFlags ( ) ; void setFlags ( int flags ) ; public void setName ( String name ) ; } </s>
<s> package org . eclipse . jdt . core . jdom ; public interface IDOMMember extends IDOMNode { public String getComment ( ) ; public int getFlags ( ) ; public void setComment ( String comment ) ; public void setFlags ( int flags ) ; } </s>
<s> package org . eclipse . jdt . core . jdom ; public class DOMException extends RuntimeException { private static final long serialVersionUID = <NUM_LIT> ; public DOMException ( ) { } public DOMException ( String message ) { super ( message ) ; } } </s>
<s> package org . eclipse . jdt . core . jdom ; public interface IDOMMethod extends IDOMMember { public void addException ( String exceptionType ) throws IllegalArgumentException ; public void addParameter ( String type , String name ) throws IllegalArgumentException ; public String getBody ( ) ; public void setDefault ( String defaultValue ) ; public String getDefault ( ) ; public String [ ] getExceptions ( ) ; String [ ] getTypeParameters ( ) ; public String getName ( ) ; public String [ ] getParameterNames ( ) ; public String [ ] getParameterTypes ( ) ; public String getReturnType ( ) ; public boolean isConstructor ( ) ; public void setBody ( String body ) ; public void setConstructor ( boolean b ) ; public void setExceptions ( String [ ] exceptionTypes ) ; void setTypeParameters ( String [ ] typeParameters ) ; public void setName ( String name ) throws IllegalArgumentException ; public void setParameters ( String [ ] types , String [ ] names ) throws IllegalArgumentException ; public void setReturnType ( String type ) throws IllegalArgumentException ; } </s>
<s> package org . eclipse . jdt . core . jdom ; import org . eclipse . jdt . internal . core . jdom . * ; public class DOMFactory implements IDOMFactory { String lineSeparator ; public DOMFactory ( ) { this . lineSeparator = org . eclipse . jdt . internal . core . util . Util . getLineSeparator ( null , null ) ; } public IDOMCompilationUnit createCompilationUnit ( ) { return ( new DOMBuilder ( ) ) . createCompilationUnit ( ) ; } public IDOMCompilationUnit createCompilationUnit ( char [ ] sourceCode , String name ) { if ( sourceCode == null ) { return null ; } return ( new SimpleDOMBuilder ( ) ) . createCompilationUnit ( sourceCode , name . toCharArray ( ) ) ; } public IDOMCompilationUnit createCompilationUnit ( String sourceCode , String name ) { if ( sourceCode == null ) { return null ; } return ( new SimpleDOMBuilder ( ) ) . createCompilationUnit ( sourceCode . toCharArray ( ) , name . toCharArray ( ) ) ; } public IDOMField createField ( ) { return createField ( "<STR_LIT>" + this . lineSeparator ) ; } public IDOMField createField ( String sourceCode ) { if ( sourceCode == null ) { return null ; } return ( new DOMBuilder ( ) ) . createField ( sourceCode . toCharArray ( ) ) ; } public IDOMImport createImport ( ) { return ( new DOMBuilder ( ) ) . createImport ( ) ; } public IDOMImport createImport ( String sourceCode ) { if ( sourceCode == null ) { return null ; } return ( new DOMBuilder ( ) ) . createImport ( sourceCode . toCharArray ( ) ) ; } public IDOMInitializer createInitializer ( ) { return createInitializer ( "<STR_LIT>" + this . lineSeparator ) ; } public IDOMInitializer createInitializer ( String sourceCode ) { if ( sourceCode == null ) { return null ; } return ( new DOMBuilder ( ) ) . createInitializer ( sourceCode . toCharArray ( ) ) ; } public IDOMMethod createMethod ( ) { return createMethod ( "<STR_LIT>" + this . lineSeparator + "<STR_LIT:}>" + this . lineSeparator ) ; } public IDOMMethod createMethod ( String sourceCode ) { if ( sourceCode == null ) { return null ; } return ( new DOMBuilder ( ) ) . createMethod ( sourceCode . toCharArray ( ) ) ; } public IDOMPackage createPackage ( ) { return ( new DOMBuilder ( ) ) . createPackage ( ) ; } public IDOMPackage createPackage ( String sourceCode ) { if ( sourceCode == null ) { return null ; } return ( new DOMBuilder ( ) ) . createPackage ( sourceCode . toCharArray ( ) ) ; } public IDOMType createType ( ) { return createType ( "<STR_LIT>" + this . lineSeparator + "<STR_LIT:}>" + this . lineSeparator ) ; } public IDOMType createClass ( ) { return createType ( "<STR_LIT>" + this . lineSeparator + "<STR_LIT:}>" + this . lineSeparator ) ; } public IDOMType createInterface ( ) { return createType ( "<STR_LIT>" + this . lineSeparator + "<STR_LIT:}>" + this . lineSeparator ) ; } public IDOMType createType ( String sourceCode ) { if ( sourceCode == null ) { return null ; } return ( new DOMBuilder ( ) ) . createType ( sourceCode . toCharArray ( ) ) ; } } </s>
<s> package org . eclipse . jdt . core . jdom ; import java . util . Enumeration ; import org . eclipse . jdt . core . IJavaElement ; public interface IDOMNode extends Cloneable { public static int COMPILATION_UNIT = <NUM_LIT:1> ; public static int PACKAGE = <NUM_LIT:2> ; public static int IMPORT = <NUM_LIT:3> ; public static int TYPE = <NUM_LIT:4> ; public static int FIELD = <NUM_LIT:5> ; public static int METHOD = <NUM_LIT:6> ; public static int INITIALIZER = <NUM_LIT:7> ; public void addChild ( IDOMNode child ) throws DOMException , IllegalArgumentException ; public boolean canHaveChildren ( ) ; public Object clone ( ) ; public char [ ] getCharacters ( ) ; public IDOMNode getChild ( String name ) ; public Enumeration getChildren ( ) ; public String getContents ( ) ; public IDOMNode getFirstChild ( ) ; public IJavaElement getJavaElement ( IJavaElement parent ) throws IllegalArgumentException ; public String getName ( ) ; public IDOMNode getNextNode ( ) ; public int getNodeType ( ) ; public IDOMNode getParent ( ) ; public IDOMNode getPreviousNode ( ) ; public void insertSibling ( IDOMNode sibling ) throws DOMException , IllegalArgumentException ; public boolean isAllowableChild ( IDOMNode node ) ; public boolean isSignatureEqual ( IDOMNode node ) ; public void remove ( ) ; public void setName ( String name ) ; } </s>
<s> package org . eclipse . jdt . core . jdom ; public interface IDOMField extends IDOMMember { public String getInitializer ( ) ; public String getName ( ) ; public String getType ( ) ; public void setInitializer ( String initializer ) ; public void setName ( String name ) throws IllegalArgumentException ; public void setType ( String typeName ) throws IllegalArgumentException ; } </s>
<s> package org . eclipse . jdt . core . jdom ; public interface IDOMFactory { public IDOMCompilationUnit createCompilationUnit ( ) ; public IDOMCompilationUnit createCompilationUnit ( char [ ] sourceCode , String name ) ; public IDOMCompilationUnit createCompilationUnit ( String sourceCode , String name ) ; public IDOMField createField ( ) ; public IDOMField createField ( String sourceCode ) ; public IDOMImport createImport ( ) ; public IDOMImport createImport ( String sourceCode ) ; public IDOMInitializer createInitializer ( ) ; public IDOMInitializer createInitializer ( String sourceCode ) ; public IDOMMethod createMethod ( ) ; public IDOMMethod createMethod ( String sourceCode ) ; public IDOMPackage createPackage ( ) ; public IDOMPackage createPackage ( String sourceCode ) ; public IDOMType createType ( ) ; public IDOMType createClass ( ) ; public IDOMType createInterface ( ) ; public IDOMType createType ( String sourceCode ) ; } </s>
<s> package org . eclipse . jdt . core . jdom ; public interface IDOMPackage extends IDOMNode { public String getName ( ) ; public void setName ( String name ) ; } </s>
<s> package org . eclipse . jdt . core ; import org . eclipse . jdt . internal . compiler . classfmt . ClassFileConstants ; public final class Flags { public static final int AccDefault = ClassFileConstants . AccDefault ; public static final int AccPublic = ClassFileConstants . AccPublic ; public static final int AccPrivate = ClassFileConstants . AccPrivate ; public static final int AccProtected = ClassFileConstants . AccProtected ; public static final int AccStatic = ClassFileConstants . AccStatic ; public static final int AccFinal = ClassFileConstants . AccFinal ; public static final int AccSynchronized = ClassFileConstants . AccSynchronized ; public static final int AccVolatile = ClassFileConstants . AccVolatile ; public static final int AccTransient = ClassFileConstants . AccTransient ; public static final int AccNative = ClassFileConstants . AccNative ; public static final int AccInterface = ClassFileConstants . AccInterface ; public static final int AccAbstract = ClassFileConstants . AccAbstract ; public static final int AccStrictfp = ClassFileConstants . AccStrictfp ; public static final int AccSuper = ClassFileConstants . AccSuper ; public static final int AccSynthetic = ClassFileConstants . AccSynthetic ; public static final int AccDeprecated = ClassFileConstants . AccDeprecated ; public static final int AccBridge = ClassFileConstants . AccBridge ; public static final int AccVarargs = ClassFileConstants . AccVarargs ; public static final int AccEnum = ClassFileConstants . AccEnum ; public static final int AccAnnotation = ClassFileConstants . AccAnnotation ; private Flags ( ) { } public static boolean isAbstract ( int flags ) { return ( flags & AccAbstract ) != <NUM_LIT:0> ; } public static boolean isDeprecated ( int flags ) { return ( flags & AccDeprecated ) != <NUM_LIT:0> ; } public static boolean isFinal ( int flags ) { return ( flags & AccFinal ) != <NUM_LIT:0> ; } public static boolean isInterface ( int flags ) { return ( flags & AccInterface ) != <NUM_LIT:0> ; } public static boolean isNative ( int flags ) { return ( flags & AccNative ) != <NUM_LIT:0> ; } public static boolean isPackageDefault ( int flags ) { return ( flags & ( AccPublic | AccPrivate | AccProtected ) ) == <NUM_LIT:0> ; } public static boolean isPrivate ( int flags ) { return ( flags & AccPrivate ) != <NUM_LIT:0> ; } public static boolean isProtected ( int flags ) { return ( flags & AccProtected ) != <NUM_LIT:0> ; } public static boolean isPublic ( int flags ) { return ( flags & AccPublic ) != <NUM_LIT:0> ; } public static boolean isStatic ( int flags ) { return ( flags & AccStatic ) != <NUM_LIT:0> ; } public static boolean isSuper ( int flags ) { return ( flags & AccSuper ) != <NUM_LIT:0> ; } public static boolean isStrictfp ( int flags ) { return ( flags & AccStrictfp ) != <NUM_LIT:0> ; } public static boolean isSynchronized ( int flags ) { return ( flags & AccSynchronized ) != <NUM_LIT:0> ; } public static boolean isSynthetic ( int flags ) { return ( flags & AccSynthetic ) != <NUM_LIT:0> ; } public static boolean isTransient ( int flags ) { return ( flags & AccTransient ) != <NUM_LIT:0> ; } public static boolean isVolatile ( int flags ) { return ( flags & AccVolatile ) != <NUM_LIT:0> ; } public static boolean isBridge ( int flags ) { return ( flags & AccBridge ) != <NUM_LIT:0> ; } public static boolean isVarargs ( int flags ) { return ( flags & AccVarargs ) != <NUM_LIT:0> ; } public static boolean isEnum ( int flags ) { return ( flags & AccEnum ) != <NUM_LIT:0> ; } public static boolean isAnnotation ( int flags ) { return ( flags & AccAnnotation ) != <NUM_LIT:0> ; } public static String toString ( int flags ) { StringBuffer sb = new StringBuffer ( ) ; if ( isPublic ( flags ) ) sb . append ( "<STR_LIT>" ) ; if ( isProtected ( flags ) ) sb . append ( "<STR_LIT>" ) ; if ( isPrivate ( flags ) ) sb . append ( "<STR_LIT>" ) ; if ( isStatic ( flags ) ) sb . append ( "<STR_LIT>" ) ; if ( isAbstract ( flags ) ) sb . append ( "<STR_LIT>" ) ; if ( isFinal ( flags ) ) sb . append ( "<STR_LIT>" ) ; if ( isNative ( flags ) ) sb . append ( "<STR_LIT>" ) ; if ( isSynchronized ( flags ) ) sb . append ( "<STR_LIT>" ) ; if ( isTransient ( flags ) ) sb . append ( "<STR_LIT>" ) ; if ( isVolatile ( flags ) ) sb . append ( "<STR_LIT>" ) ; if ( isStrictfp ( flags ) ) sb . append ( "<STR_LIT>" ) ; int len = sb . length ( ) ; if ( len == <NUM_LIT:0> ) return "<STR_LIT>" ; sb . setLength ( len - <NUM_LIT:1> ) ; return sb . toString ( ) ; } } </s>
<s> package org . eclipse . jdt . core ; public interface ISourceReference { boolean exists ( ) ; String getSource ( ) throws JavaModelException ; ISourceRange getSourceRange ( ) throws JavaModelException ; ISourceRange getNameRange ( ) throws JavaModelException ; } </s>
<s> package org . eclipse . jdt . core ; import org . eclipse . core . runtime . IPath ; import org . eclipse . core . runtime . IProgressMonitor ; public interface IPackageFragmentRoot extends IParent , IJavaElement , IOpenable { int K_SOURCE = <NUM_LIT:1> ; int K_BINARY = <NUM_LIT:2> ; String DEFAULT_PACKAGEROOT_PATH = "<STR_LIT>" ; int NO_RESOURCE_MODIFICATION = <NUM_LIT:1> ; int ORIGINATING_PROJECT_CLASSPATH = <NUM_LIT:2> ; int OTHER_REFERRING_PROJECTS_CLASSPATH = <NUM_LIT:4> ; int DESTINATION_PROJECT_CLASSPATH = <NUM_LIT:8> ; int REPLACE = <NUM_LIT:16> ; void attachSource ( IPath sourcePath , IPath rootPath , IProgressMonitor monitor ) throws JavaModelException ; void copy ( IPath destination , int updateResourceFlags , int updateModelFlags , IClasspathEntry sibling , IProgressMonitor monitor ) throws JavaModelException ; IPackageFragment createPackageFragment ( String name , boolean force , IProgressMonitor monitor ) throws JavaModelException ; void delete ( int updateResourceFlags , int updateModelFlags , IProgressMonitor monitor ) throws JavaModelException ; int getKind ( ) throws JavaModelException ; Object [ ] getNonJavaResources ( ) throws JavaModelException ; IPackageFragment getPackageFragment ( String packageName ) ; IClasspathEntry getRawClasspathEntry ( ) throws JavaModelException ; IClasspathEntry getResolvedClasspathEntry ( ) throws JavaModelException ; IPath getSourceAttachmentPath ( ) throws JavaModelException ; IPath getSourceAttachmentRootPath ( ) throws JavaModelException ; public boolean isArchive ( ) ; boolean isExternal ( ) ; void move ( IPath destination , int updateResourceFlags , int updateModelFlags , IClasspathEntry sibling , IProgressMonitor monitor ) throws JavaModelException ; } </s>
<s> package org . eclipse . jdt . core ; public interface IPackageDeclaration extends IJavaElement , ISourceReference , IAnnotatable { String getElementName ( ) ; } </s>
<s> package org . eclipse . jdt . core ; import org . codehaus . jdt . groovy . integration . LanguageSupportFactory ; import org . eclipse . core . runtime . IProgressMonitor ; import org . eclipse . jdt . core . compiler . CharOperation ; import org . eclipse . jdt . internal . core . BufferManager ; import org . eclipse . jdt . internal . core . CompilationUnit ; import org . eclipse . jdt . internal . core . DefaultWorkingCopyOwner ; import org . eclipse . jdt . internal . core . ExternalJavaProject ; import org . eclipse . jdt . internal . core . PackageFragment ; import org . eclipse . jdt . internal . core . PackageFragmentRoot ; public abstract class WorkingCopyOwner { public static void setPrimaryBufferProvider ( WorkingCopyOwner primaryBufferProvider ) { DefaultWorkingCopyOwner . PRIMARY . primaryBufferProvider = primaryBufferProvider ; } public IBuffer createBuffer ( ICompilationUnit workingCopy ) { return BufferManager . createBuffer ( workingCopy ) ; } public IProblemRequestor getProblemRequestor ( ICompilationUnit workingCopy ) { return null ; } public String findSource ( String typeName , String packageName ) { return null ; } public boolean isPackage ( String [ ] pkg ) { return false ; } public final ICompilationUnit newWorkingCopy ( String name , IClasspathEntry [ ] classpath , IProblemRequestor problemRequestor , IProgressMonitor monitor ) throws JavaModelException { ExternalJavaProject project = new ExternalJavaProject ( classpath ) ; IPackageFragment parent = ( ( PackageFragmentRoot ) project . getPackageFragmentRoot ( project . getProject ( ) ) ) . getPackageFragment ( CharOperation . NO_STRINGS ) ; CompilationUnit result = LanguageSupportFactory . newCompilationUnit ( ( PackageFragment ) parent , name , this ) ; result . becomeWorkingCopy ( problemRequestor , monitor ) ; return result ; } public final ICompilationUnit newWorkingCopy ( String name , IClasspathEntry [ ] classpath , IProgressMonitor monitor ) throws JavaModelException { ExternalJavaProject project = new ExternalJavaProject ( classpath ) ; IPackageFragment parent = ( ( PackageFragmentRoot ) project . getPackageFragmentRoot ( project . getProject ( ) ) ) . getPackageFragment ( CharOperation . NO_STRINGS ) ; CompilationUnit result = LanguageSupportFactory . newCompilationUnit ( ( PackageFragment ) parent , name , this ) ; result . becomeWorkingCopy ( getProblemRequestor ( result ) , monitor ) ; return result ; } } </s>
<s> package org . eclipse . jdt . core . util ; public interface IRuntimeVisibleAnnotationsAttribute extends IClassFileAttribute { int getAnnotationsNumber ( ) ; IAnnotation [ ] getAnnotations ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IConstantPoolConstant { int CONSTANT_Class = <NUM_LIT:7> ; int CONSTANT_Fieldref = <NUM_LIT:9> ; int CONSTANT_Methodref = <NUM_LIT:10> ; int CONSTANT_InterfaceMethodref = <NUM_LIT:11> ; int CONSTANT_String = <NUM_LIT:8> ; int CONSTANT_Integer = <NUM_LIT:3> ; int CONSTANT_Float = <NUM_LIT:4> ; int CONSTANT_Long = <NUM_LIT:5> ; int CONSTANT_Double = <NUM_LIT:6> ; int CONSTANT_NameAndType = <NUM_LIT:12> ; int CONSTANT_Utf8 = <NUM_LIT:1> ; int CONSTANT_Methodref_SIZE = <NUM_LIT:5> ; int CONSTANT_Class_SIZE = <NUM_LIT:3> ; int CONSTANT_Double_SIZE = <NUM_LIT:9> ; int CONSTANT_Fieldref_SIZE = <NUM_LIT:5> ; int CONSTANT_Float_SIZE = <NUM_LIT:5> ; int CONSTANT_Integer_SIZE = <NUM_LIT:5> ; int CONSTANT_InterfaceMethodref_SIZE = <NUM_LIT:5> ; int CONSTANT_Long_SIZE = <NUM_LIT:9> ; int CONSTANT_String_SIZE = <NUM_LIT:3> ; int CONSTANT_Utf8_SIZE = <NUM_LIT:3> ; int CONSTANT_NameAndType_SIZE = <NUM_LIT:5> ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IInnerClassesAttribute extends IClassFileAttribute { int getNumberOfClasses ( ) ; IInnerClassesAttributeEntry [ ] getInnerClassAttributesEntries ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface ISignatureAttribute extends IClassFileAttribute { int getSignatureIndex ( ) ; char [ ] getSignature ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IStackMapFrame { int getFrameType ( ) ; int getOffsetDelta ( ) ; int getNumberOfLocals ( ) ; IVerificationTypeInfo [ ] getLocals ( ) ; int getNumberOfStackItems ( ) ; IVerificationTypeInfo [ ] getStackItems ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IAnnotationDefaultAttribute extends IClassFileAttribute { IAnnotationComponentValue getMemberValue ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public class ClassFormatException extends Exception { public static final int ERROR_MALFORMED_UTF8 = <NUM_LIT:1> ; public static final int ERROR_TRUNCATED_INPUT = <NUM_LIT:2> ; public static final int INVALID_CONSTANT_POOL_ENTRY = <NUM_LIT:3> ; public static final int TOO_MANY_BYTES = <NUM_LIT:4> ; public static final int INVALID_ARGUMENTS_FOR_INVOKEINTERFACE = <NUM_LIT:5> ; public static final int INVALID_BYTECODE = <NUM_LIT:6> ; public static final int INVALID_TAG_CONSTANT = <NUM_LIT:7> ; public static final int INVALID_MAGIC_NUMBER = <NUM_LIT:8> ; private static final long serialVersionUID = <NUM_LIT> ; public ClassFormatException ( int errorID ) { } public ClassFormatException ( String message ) { super ( message ) ; } public ClassFormatException ( String message , Throwable cause ) { super ( message , cause ) ; } } </s>
<s> package org . eclipse . jdt . core . util ; public abstract class ClassFileBytesDisassembler { public final static int DETAILED = <NUM_LIT:1> ; public final static int DEFAULT = <NUM_LIT:2> ; public final static int SYSTEM = <NUM_LIT:4> ; public final static int COMPACT = <NUM_LIT:8> ; public final static int WORKING_COPY = <NUM_LIT:16> ; public abstract String disassemble ( byte [ ] classFileBytes , String lineSeparator ) throws ClassFormatException ; public abstract String disassemble ( byte [ ] classFileBytes , String lineSeparator , int mode ) throws ClassFormatException ; public abstract String getDescription ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IConstantPool { int getConstantPoolCount ( ) ; int getEntryKind ( int index ) ; IConstantPoolEntry decodeEntry ( int index ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IAnnotation { int getTypeIndex ( ) ; char [ ] getTypeName ( ) ; int getComponentsNumber ( ) ; IAnnotationComponent [ ] getComponents ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IFieldInfo { IConstantValueAttribute getConstantValueAttribute ( ) ; int getAccessFlags ( ) ; char [ ] getName ( ) ; int getNameIndex ( ) ; char [ ] getDescriptor ( ) ; int getDescriptorIndex ( ) ; boolean hasConstantValueAttribute ( ) ; boolean isSynthetic ( ) ; boolean isDeprecated ( ) ; int getAttributeCount ( ) ; IClassFileAttribute [ ] getAttributes ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IConstantValueAttribute extends IClassFileAttribute { int getConstantValueIndex ( ) ; IConstantPoolEntry getConstantValue ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IAnnotationComponent { int getComponentNameIndex ( ) ; char [ ] getComponentName ( ) ; IAnnotationComponentValue getComponentValue ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IParameterAnnotation { int getAnnotationsNumber ( ) ; IAnnotation [ ] getAnnotations ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IEnclosingMethodAttribute extends IClassFileAttribute { char [ ] getEnclosingClass ( ) ; int getEnclosingClassIndex ( ) ; char [ ] getMethodDescriptor ( ) ; int getMethodDescriptorIndex ( ) ; char [ ] getMethodName ( ) ; int getMethodNameIndex ( ) ; int getMethodNameAndTypeIndex ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IClassFileReader { int ALL = <NUM_LIT> ; int CONSTANT_POOL = <NUM_LIT> ; int METHOD_INFOS = <NUM_LIT> + CONSTANT_POOL ; int FIELD_INFOS = <NUM_LIT> + CONSTANT_POOL ; int SUPER_INTERFACES = <NUM_LIT> + CONSTANT_POOL ; int CLASSFILE_ATTRIBUTES = <NUM_LIT> + CONSTANT_POOL ; int METHOD_BODIES = <NUM_LIT> ; int ALL_BUT_METHOD_BODIES = ALL & ~ METHOD_BODIES ; int getAccessFlags ( ) ; IFieldInfo [ ] getFieldInfos ( ) ; char [ ] [ ] getInterfaceNames ( ) ; int [ ] getInterfaceIndexes ( ) ; IInnerClassesAttribute getInnerClassesAttribute ( ) ; IMethodInfo [ ] getMethodInfos ( ) ; char [ ] getClassName ( ) ; int getClassIndex ( ) ; char [ ] getSuperclassName ( ) ; int getSuperclassIndex ( ) ; boolean isClass ( ) ; boolean isInterface ( ) ; ISourceAttribute getSourceFileAttribute ( ) ; IConstantPool getConstantPool ( ) ; int getMinorVersion ( ) ; int getMajorVersion ( ) ; int getAttributeCount ( ) ; IClassFileAttribute [ ] getAttributes ( ) ; int getMagic ( ) ; int getFieldsCount ( ) ; int getMethodsCount ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IExceptionAttribute extends IClassFileAttribute { int getExceptionsNumber ( ) ; char [ ] [ ] getExceptionNames ( ) ; int [ ] getExceptionIndexes ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface ILocalVariableTableEntry { int getStartPC ( ) ; int getLength ( ) ; int getNameIndex ( ) ; int getDescriptorIndex ( ) ; int getIndex ( ) ; char [ ] getName ( ) ; char [ ] getDescriptor ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface ILocalVariableTypeTableEntry { int getStartPC ( ) ; int getLength ( ) ; int getNameIndex ( ) ; int getSignatureIndex ( ) ; int getIndex ( ) ; char [ ] getName ( ) ; char [ ] getSignature ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IRuntimeVisibleParameterAnnotationsAttribute extends IClassFileAttribute { int getParametersNumber ( ) ; IParameterAnnotation [ ] getParameterAnnotations ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; import java . util . Comparator ; import org . eclipse . core . runtime . IProgressMonitor ; import org . eclipse . jdt . core . ICompilationUnit ; import org . eclipse . jdt . core . IJavaElement ; import org . eclipse . jdt . core . JavaModelException ; import org . eclipse . jdt . core . dom . AST ; import org . eclipse . jdt . core . dom . CompilationUnit ; import org . eclipse . jdt . internal . core . SortElementsOperation ; import org . eclipse . text . edits . TextEdit ; import org . eclipse . text . edits . TextEditGroup ; public final class CompilationUnitSorter { private CompilationUnitSorter ( ) { } private static void checkASTLevel ( int level ) { switch ( level ) { case AST . JLS2 : case AST . JLS3 : case AST . JLS4 : break ; default : throw new IllegalArgumentException ( ) ; } } public static final String RELATIVE_ORDER = "<STR_LIT>" ; public static void sort ( ICompilationUnit compilationUnit , int [ ] positions , Comparator comparator , int options , IProgressMonitor monitor ) throws JavaModelException { sort ( AST . JLS2 , compilationUnit , positions , comparator , options , monitor ) ; } public static void sort ( int level , ICompilationUnit compilationUnit , int [ ] positions , Comparator comparator , int options , IProgressMonitor monitor ) throws JavaModelException { if ( compilationUnit == null || comparator == null ) { throw new IllegalArgumentException ( ) ; } checkASTLevel ( level ) ; ICompilationUnit [ ] compilationUnits = new ICompilationUnit [ ] { compilationUnit } ; SortElementsOperation operation = new SortElementsOperation ( level , compilationUnits , positions , comparator ) ; operation . runOperation ( monitor ) ; } public static TextEdit sort ( CompilationUnit unit , Comparator comparator , int options , TextEditGroup group , IProgressMonitor monitor ) throws JavaModelException { if ( unit == null || comparator == null ) { throw new IllegalArgumentException ( ) ; } SortElementsOperation operation = new SortElementsOperation ( AST . JLS4 , new IJavaElement [ ] { unit . getJavaElement ( ) } , null , comparator ) ; return operation . calculateEdit ( unit , group ) ; } } </s>
<s> package org . eclipse . jdt . core . util ; public interface ICodeAttribute extends IClassFileAttribute { int getMaxLocals ( ) ; int getMaxStack ( ) ; ILineNumberAttribute getLineNumberAttribute ( ) ; ILocalVariableAttribute getLocalVariableAttribute ( ) ; IExceptionTableEntry [ ] getExceptionTable ( ) ; byte [ ] getBytecodes ( ) ; long getCodeLength ( ) ; int getAttributesCount ( ) ; IClassFileAttribute [ ] getAttributes ( ) ; int getExceptionTableLength ( ) ; void traverse ( IBytecodeVisitor visitor ) throws ClassFormatException ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface ILocalVariableAttribute extends IClassFileAttribute { int getLocalVariableTableLength ( ) ; ILocalVariableTableEntry [ ] getLocalVariableTable ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IOpcodeMnemonics { int NOP = <NUM_LIT:0x00> ; int ACONST_NULL = <NUM_LIT> ; int ICONST_M1 = <NUM_LIT> ; int ICONST_0 = <NUM_LIT> ; int ICONST_1 = <NUM_LIT> ; int ICONST_2 = <NUM_LIT> ; int ICONST_3 = <NUM_LIT> ; int ICONST_4 = <NUM_LIT> ; int ICONST_5 = <NUM_LIT> ; int LCONST_0 = <NUM_LIT> ; int LCONST_1 = <NUM_LIT> ; int FCONST_0 = <NUM_LIT> ; int FCONST_1 = <NUM_LIT> ; int FCONST_2 = <NUM_LIT> ; int DCONST_0 = <NUM_LIT> ; int DCONST_1 = <NUM_LIT> ; int BIPUSH = <NUM_LIT> ; int SIPUSH = <NUM_LIT> ; int LDC = <NUM_LIT> ; int LDC_W = <NUM_LIT> ; int LDC2_W = <NUM_LIT> ; int ILOAD = <NUM_LIT> ; int LLOAD = <NUM_LIT> ; int FLOAD = <NUM_LIT> ; int DLOAD = <NUM_LIT> ; int ALOAD = <NUM_LIT> ; int ILOAD_0 = <NUM_LIT> ; int ILOAD_1 = <NUM_LIT> ; int ILOAD_2 = <NUM_LIT> ; int ILOAD_3 = <NUM_LIT> ; int LLOAD_0 = <NUM_LIT> ; int LLOAD_1 = <NUM_LIT> ; int LLOAD_2 = <NUM_LIT> ; int LLOAD_3 = <NUM_LIT> ; int FLOAD_0 = <NUM_LIT> ; int FLOAD_1 = <NUM_LIT> ; int FLOAD_2 = <NUM_LIT> ; int FLOAD_3 = <NUM_LIT> ; int DLOAD_0 = <NUM_LIT> ; int DLOAD_1 = <NUM_LIT> ; int DLOAD_2 = <NUM_LIT> ; int DLOAD_3 = <NUM_LIT> ; int ALOAD_0 = <NUM_LIT> ; int ALOAD_1 = <NUM_LIT> ; int ALOAD_2 = <NUM_LIT> ; int ALOAD_3 = <NUM_LIT> ; int IALOAD = <NUM_LIT> ; int LALOAD = <NUM_LIT> ; int FALOAD = <NUM_LIT> ; int DALOAD = <NUM_LIT> ; int AALOAD = <NUM_LIT> ; int BALOAD = <NUM_LIT> ; int CALOAD = <NUM_LIT> ; int SALOAD = <NUM_LIT> ; int ISTORE = <NUM_LIT> ; int LSTORE = <NUM_LIT> ; int FSTORE = <NUM_LIT> ; int DSTORE = <NUM_LIT> ; int ASTORE = <NUM_LIT> ; int ISTORE_0 = <NUM_LIT> ; int ISTORE_1 = <NUM_LIT> ; int ISTORE_2 = <NUM_LIT> ; int ISTORE_3 = <NUM_LIT> ; int LSTORE_0 = <NUM_LIT> ; int LSTORE_1 = <NUM_LIT> ; int LSTORE_2 = <NUM_LIT> ; int LSTORE_3 = <NUM_LIT> ; int FSTORE_0 = <NUM_LIT> ; int FSTORE_1 = <NUM_LIT> ; int FSTORE_2 = <NUM_LIT> ; int FSTORE_3 = <NUM_LIT> ; int DSTORE_0 = <NUM_LIT> ; int DSTORE_1 = <NUM_LIT> ; int DSTORE_2 = <NUM_LIT> ; int DSTORE_3 = <NUM_LIT> ; int ASTORE_0 = <NUM_LIT> ; int ASTORE_1 = <NUM_LIT> ; int ASTORE_2 = <NUM_LIT> ; int ASTORE_3 = <NUM_LIT> ; int IASTORE = <NUM_LIT> ; int LASTORE = <NUM_LIT> ; int FASTORE = <NUM_LIT> ; int DASTORE = <NUM_LIT> ; int AASTORE = <NUM_LIT> ; int BASTORE = <NUM_LIT> ; int CASTORE = <NUM_LIT> ; int SASTORE = <NUM_LIT> ; int POP = <NUM_LIT> ; int POP2 = <NUM_LIT> ; int DUP = <NUM_LIT> ; int DUP_X1 = <NUM_LIT> ; int DUP_X2 = <NUM_LIT> ; int DUP2 = <NUM_LIT> ; int DUP2_X1 = <NUM_LIT> ; int DUP2_X2 = <NUM_LIT> ; int SWAP = <NUM_LIT> ; int IADD = <NUM_LIT> ; int LADD = <NUM_LIT> ; int FADD = <NUM_LIT> ; int DADD = <NUM_LIT> ; int ISUB = <NUM_LIT> ; int LSUB = <NUM_LIT> ; int FSUB = <NUM_LIT> ; int DSUB = <NUM_LIT> ; int IMUL = <NUM_LIT> ; int LMUL = <NUM_LIT> ; int FMUL = <NUM_LIT> ; int DMUL = <NUM_LIT> ; int IDIV = <NUM_LIT> ; int LDIV = <NUM_LIT> ; int FDIV = <NUM_LIT> ; int DDIV = <NUM_LIT> ; int IREM = <NUM_LIT> ; int LREM = <NUM_LIT> ; int FREM = <NUM_LIT> ; int DREM = <NUM_LIT> ; int INEG = <NUM_LIT> ; int LNEG = <NUM_LIT> ; int FNEG = <NUM_LIT> ; int DNEG = <NUM_LIT> ; int ISHL = <NUM_LIT> ; int LSHL = <NUM_LIT> ; int ISHR = <NUM_LIT> ; int LSHR = <NUM_LIT> ; int IUSHR = <NUM_LIT> ; int LUSHR = <NUM_LIT> ; int IAND = <NUM_LIT> ; int LAND = <NUM_LIT> ; int IOR = <NUM_LIT> ; int LOR = <NUM_LIT> ; int IXOR = <NUM_LIT> ; int LXOR = <NUM_LIT> ; int IINC = <NUM_LIT> ; int I2L = <NUM_LIT> ; int I2F = <NUM_LIT> ; int I2D = <NUM_LIT> ; int L2I = <NUM_LIT> ; int L2F = <NUM_LIT> ; int L2D = <NUM_LIT> ; int F2I = <NUM_LIT> ; int F2L = <NUM_LIT> ; int F2D = <NUM_LIT> ; int D2I = <NUM_LIT> ; int D2L = <NUM_LIT> ; int D2F = <NUM_LIT> ; int I2B = <NUM_LIT> ; int I2C = <NUM_LIT> ; int I2S = <NUM_LIT> ; int LCMP = <NUM_LIT> ; int FCMPL = <NUM_LIT> ; int FCMPG = <NUM_LIT> ; int DCMPL = <NUM_LIT> ; int DCMPG = <NUM_LIT> ; int IFEQ = <NUM_LIT> ; int IFNE = <NUM_LIT> ; int IFLT = <NUM_LIT> ; int IFGE = <NUM_LIT> ; int IFGT = <NUM_LIT> ; int IFLE = <NUM_LIT> ; int IF_ICMPEQ = <NUM_LIT> ; int IF_ICMPNE = <NUM_LIT> ; int IF_ICMPLT = <NUM_LIT> ; int IF_ICMPGE = <NUM_LIT> ; int IF_ICMPGT = <NUM_LIT> ; int IF_ICMPLE = <NUM_LIT> ; int IF_ACMPEQ = <NUM_LIT> ; int IF_ACMPNE = <NUM_LIT> ; int GOTO = <NUM_LIT> ; int JSR = <NUM_LIT> ; int RET = <NUM_LIT> ; int TABLESWITCH = <NUM_LIT> ; int LOOKUPSWITCH = <NUM_LIT> ; int IRETURN = <NUM_LIT> ; int LRETURN = <NUM_LIT> ; int FRETURN = <NUM_LIT> ; int DRETURN = <NUM_LIT> ; int ARETURN = <NUM_LIT> ; int RETURN = <NUM_LIT> ; int GETSTATIC = <NUM_LIT> ; int PUTSTATIC = <NUM_LIT> ; int GETFIELD = <NUM_LIT> ; int PUTFIELD = <NUM_LIT> ; int INVOKEVIRTUAL = <NUM_LIT> ; int INVOKESPECIAL = <NUM_LIT> ; int INVOKESTATIC = <NUM_LIT> ; int INVOKEINTERFACE = <NUM_LIT> ; int INVOKEDYNAMIC = <NUM_LIT> ; int NEW = <NUM_LIT> ; int NEWARRAY = <NUM_LIT> ; int ANEWARRAY = <NUM_LIT> ; int ARRAYLENGTH = <NUM_LIT> ; int ATHROW = <NUM_LIT> ; int CHECKCAST = <NUM_LIT> ; int INSTANCEOF = <NUM_LIT> ; int MONITORENTER = <NUM_LIT> ; int MONITOREXIT = <NUM_LIT> ; int WIDE = <NUM_LIT> ; int MULTIANEWARRAY = <NUM_LIT> ; int IFNULL = <NUM_LIT> ; int IFNONNULL = <NUM_LIT> ; int GOTO_W = <NUM_LIT> ; int JSR_W = <NUM_LIT> ; int BREAKPOINT = <NUM_LIT> ; int IMPDEP1 = <NUM_LIT> ; int IMPDEP2 = <NUM_LIT> ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IBytecodeVisitor { void _aaload ( int pc ) ; void _aastore ( int pc ) ; void _aconst_null ( int pc ) ; void _aload ( int pc , int index ) ; void _aload_0 ( int pc ) ; void _aload_1 ( int pc ) ; void _aload_2 ( int pc ) ; void _aload_3 ( int pc ) ; void _anewarray ( int pc , int index , IConstantPoolEntry constantClass ) ; void _areturn ( int pc ) ; void _arraylength ( int pc ) ; void _astore ( int pc , int index ) ; void _astore_0 ( int pc ) ; void _astore_1 ( int pc ) ; void _astore_2 ( int pc ) ; void _astore_3 ( int pc ) ; void _athrow ( int pc ) ; void _baload ( int pc ) ; void _bastore ( int pc ) ; void _bipush ( int pc , byte _byte ) ; void _caload ( int pc ) ; void _castore ( int pc ) ; void _checkcast ( int pc , int index , IConstantPoolEntry constantClass ) ; void _d2f ( int pc ) ; void _d2i ( int pc ) ; void _d2l ( int pc ) ; void _dadd ( int pc ) ; void _daload ( int pc ) ; void _dastore ( int pc ) ; void _dcmpg ( int pc ) ; void _dcmpl ( int pc ) ; void _dconst_0 ( int pc ) ; void _dconst_1 ( int pc ) ; void _ddiv ( int pc ) ; void _dload ( int pc , int index ) ; void _dload_0 ( int pc ) ; void _dload_1 ( int pc ) ; void _dload_2 ( int pc ) ; void _dload_3 ( int pc ) ; void _dmul ( int pc ) ; void _dneg ( int pc ) ; void _drem ( int pc ) ; void _dreturn ( int pc ) ; void _dstore ( int pc , int index ) ; void _dstore_0 ( int pc ) ; void _dstore_1 ( int pc ) ; void _dstore_2 ( int pc ) ; void _dstore_3 ( int pc ) ; void _dsub ( int pc ) ; void _dup ( int pc ) ; void _dup_x1 ( int pc ) ; void _dup_x2 ( int pc ) ; void _dup2 ( int pc ) ; void _dup2_x1 ( int pc ) ; void _dup2_x2 ( int pc ) ; void _f2d ( int pc ) ; void _f2i ( int pc ) ; void _f2l ( int pc ) ; void _fadd ( int pc ) ; void _faload ( int pc ) ; void _fastore ( int pc ) ; void _fcmpg ( int pc ) ; void _fcmpl ( int pc ) ; void _fconst_0 ( int pc ) ; void _fconst_1 ( int pc ) ; void _fconst_2 ( int pc ) ; void _fdiv ( int pc ) ; void _fload ( int pc , int index ) ; void _fload_0 ( int pc ) ; void _fload_1 ( int pc ) ; void _fload_2 ( int pc ) ; void _fload_3 ( int pc ) ; void _fmul ( int pc ) ; void _fneg ( int pc ) ; void _frem ( int pc ) ; void _freturn ( int pc ) ; void _fstore ( int pc , int index ) ; void _fstore_0 ( int pc ) ; void _fstore_1 ( int pc ) ; void _fstore_2 ( int pc ) ; void _fstore_3 ( int pc ) ; void _fsub ( int pc ) ; void _getfield ( int pc , int index , IConstantPoolEntry constantFieldref ) ; void _getstatic ( int pc , int index , IConstantPoolEntry constantFieldref ) ; void _goto ( int pc , int branchOffset ) ; void _goto_w ( int pc , int branchOffset ) ; void _i2b ( int pc ) ; void _i2c ( int pc ) ; void _i2d ( int pc ) ; void _i2f ( int pc ) ; void _i2l ( int pc ) ; void _i2s ( int pc ) ; void _iadd ( int pc ) ; void _iaload ( int pc ) ; void _iand ( int pc ) ; void _iastore ( int pc ) ; void _iconst_m1 ( int pc ) ; void _iconst_0 ( int pc ) ; void _iconst_1 ( int pc ) ; void _iconst_2 ( int pc ) ; void _iconst_3 ( int pc ) ; void _iconst_4 ( int pc ) ; void _iconst_5 ( int pc ) ; void _idiv ( int pc ) ; void _if_acmpeq ( int pc , int branchOffset ) ; void _if_acmpne ( int pc , int branchOffset ) ; void _if_icmpeq ( int pc , int branchOffset ) ; void _if_icmpne ( int pc , int branchOffset ) ; void _if_icmplt ( int pc , int branchOffset ) ; void _if_icmpge ( int pc , int branchOffset ) ; void _if_icmpgt ( int pc , int branchOffset ) ; void _if_icmple ( int pc , int branchOffset ) ; void _ifeq ( int pc , int branchOffset ) ; void _ifne ( int pc , int branchOffset ) ; void _iflt ( int pc , int branchOffset ) ; void _ifge ( int pc , int branchOffset ) ; void _ifgt ( int pc , int branchOffset ) ; void _ifle ( int pc , int branchOffset ) ; void _ifnonnull ( int pc , int branchOffset ) ; void _ifnull ( int pc , int branchOffset ) ; void _iinc ( int pc , int index , int _const ) ; void _iload ( int pc , int index ) ; void _iload_0 ( int pc ) ; void _iload_1 ( int pc ) ; void _iload_2 ( int pc ) ; void _iload_3 ( int pc ) ; void _imul ( int pc ) ; void _ineg ( int pc ) ; void _instanceof ( int pc , int index , IConstantPoolEntry constantClass ) ; void _invokedynamic ( int pc , int index , IConstantPoolEntry nameEntry , IConstantPoolEntry descriptorEntry ) ; void _invokeinterface ( int pc , int index , byte nargs , IConstantPoolEntry constantInterfaceMethodref ) ; void _invokespecial ( int pc , int index , IConstantPoolEntry constantMethodref ) ; void _invokestatic ( int pc , int index , IConstantPoolEntry constantMethodref ) ; void _invokevirtual ( int pc , int index , IConstantPoolEntry constantMethodref ) ; void _ior ( int pc ) ; void _irem ( int pc ) ; void _ireturn ( int pc ) ; void _ishl ( int pc ) ; void _ishr ( int pc ) ; void _istore ( int pc , int index ) ; void _istore_0 ( int pc ) ; void _istore_1 ( int pc ) ; void _istore_2 ( int pc ) ; void _istore_3 ( int pc ) ; void _isub ( int pc ) ; void _iushr ( int pc ) ; void _ixor ( int pc ) ; void _jsr ( int pc , int branchOffset ) ; void _jsr_w ( int pc , int branchOffset ) ; void _l2d ( int pc ) ; void _l2f ( int pc ) ; void _l2i ( int pc ) ; void _ladd ( int pc ) ; void _laload ( int pc ) ; void _land ( int pc ) ; void _lastore ( int pc ) ; void _lcmp ( int pc ) ; void _lconst_0 ( int pc ) ; void _lconst_1 ( int pc ) ; void _ldc ( int pc , int index , IConstantPoolEntry constantPoolEntry ) ; void _ldc_w ( int pc , int index , IConstantPoolEntry constantPoolEntry ) ; void _ldc2_w ( int pc , int index , IConstantPoolEntry constantPoolEntry ) ; void _ldiv ( int pc ) ; void _lload ( int pc , int index ) ; void _lload_0 ( int pc ) ; void _lload_1 ( int pc ) ; void _lload_2 ( int pc ) ; void _lload_3 ( int pc ) ; void _lmul ( int pc ) ; void _lneg ( int pc ) ; void _lookupswitch ( int pc , int defaultoffset , int npairs , int [ ] [ ] offset_pairs ) ; void _lor ( int pc ) ; void _lrem ( int pc ) ; void _lreturn ( int pc ) ; void _lshl ( int pc ) ; void _lshr ( int pc ) ; void _lstore ( int pc , int index ) ; void _lstore_0 ( int pc ) ; void _lstore_1 ( int pc ) ; void _lstore_2 ( int pc ) ; void _lstore_3 ( int pc ) ; void _lsub ( int pc ) ; void _lushr ( int pc ) ; void _lxor ( int pc ) ; void _monitorenter ( int pc ) ; void _monitorexit ( int pc ) ; void _multianewarray ( int pc , int index , int dimensions , IConstantPoolEntry constantClass ) ; void _new ( int pc , int index , IConstantPoolEntry constantClass ) ; void _newarray ( int pc , int atype ) ; void _nop ( int pc ) ; void _pop ( int pc ) ; void _pop2 ( int pc ) ; void _putfield ( int pc , int index , IConstantPoolEntry constantFieldref ) ; void _putstatic ( int pc , int index , IConstantPoolEntry constantFieldref ) ; void _ret ( int pc , int index ) ; void _return ( int pc ) ; void _saload ( int pc ) ; void _sastore ( int pc ) ; void _sipush ( int pc , short value ) ; void _swap ( int pc ) ; void _tableswitch ( int pc , int defaultoffset , int low , int high , int [ ] jump_offsets ) ; void _wide ( int pc , int opcode , int index ) ; void _wide ( int pc , int iincopcode , int index , int _const ) ; void _breakpoint ( int pc ) ; void _impdep1 ( int pc ) ; void _impdep2 ( int pc ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface ILocalVariableTypeTableAttribute extends IClassFileAttribute { int getLocalVariableTypeTableLength ( ) ; ILocalVariableTypeTableEntry [ ] getLocalVariableTypeTable ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public class OpcodeStringValues implements IOpcodeMnemonics { public static final String [ ] BYTECODE_NAMES = new String [ <NUM_LIT> ] ; static { BYTECODE_NAMES [ NOP ] = "<STR_LIT>" ; BYTECODE_NAMES [ ACONST_NULL ] = "<STR_LIT>" ; BYTECODE_NAMES [ ICONST_M1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ICONST_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ICONST_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ICONST_2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ICONST_3 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ICONST_4 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ICONST_5 ] = "<STR_LIT>" ; BYTECODE_NAMES [ LCONST_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ LCONST_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ FCONST_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ FCONST_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ FCONST_2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DCONST_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DCONST_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ BIPUSH ] = "<STR_LIT>" ; BYTECODE_NAMES [ SIPUSH ] = "<STR_LIT>" ; BYTECODE_NAMES [ LDC ] = "<STR_LIT>" ; BYTECODE_NAMES [ LDC_W ] = "<STR_LIT>" ; BYTECODE_NAMES [ LDC2_W ] = "<STR_LIT>" ; BYTECODE_NAMES [ ILOAD ] = "<STR_LIT>" ; BYTECODE_NAMES [ LLOAD ] = "<STR_LIT>" ; BYTECODE_NAMES [ FLOAD ] = "<STR_LIT>" ; BYTECODE_NAMES [ DLOAD ] = "<STR_LIT>" ; BYTECODE_NAMES [ ALOAD ] = "<STR_LIT>" ; BYTECODE_NAMES [ ILOAD_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ILOAD_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ILOAD_2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ILOAD_3 ] = "<STR_LIT>" ; BYTECODE_NAMES [ LLOAD_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ LLOAD_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ LLOAD_2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ LLOAD_3 ] = "<STR_LIT>" ; BYTECODE_NAMES [ FLOAD_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ FLOAD_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ FLOAD_2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ FLOAD_3 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DLOAD_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DLOAD_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DLOAD_2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DLOAD_3 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ALOAD_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ALOAD_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ALOAD_2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ALOAD_3 ] = "<STR_LIT>" ; BYTECODE_NAMES [ IALOAD ] = "<STR_LIT>" ; BYTECODE_NAMES [ LALOAD ] = "<STR_LIT>" ; BYTECODE_NAMES [ FALOAD ] = "<STR_LIT>" ; BYTECODE_NAMES [ DALOAD ] = "<STR_LIT>" ; BYTECODE_NAMES [ AALOAD ] = "<STR_LIT>" ; BYTECODE_NAMES [ BALOAD ] = "<STR_LIT>" ; BYTECODE_NAMES [ CALOAD ] = "<STR_LIT>" ; BYTECODE_NAMES [ SALOAD ] = "<STR_LIT>" ; BYTECODE_NAMES [ ISTORE ] = "<STR_LIT>" ; BYTECODE_NAMES [ LSTORE ] = "<STR_LIT>" ; BYTECODE_NAMES [ FSTORE ] = "<STR_LIT>" ; BYTECODE_NAMES [ DSTORE ] = "<STR_LIT>" ; BYTECODE_NAMES [ ASTORE ] = "<STR_LIT>" ; BYTECODE_NAMES [ ISTORE_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ISTORE_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ISTORE_2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ISTORE_3 ] = "<STR_LIT>" ; BYTECODE_NAMES [ LSTORE_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ LSTORE_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ LSTORE_2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ LSTORE_3 ] = "<STR_LIT>" ; BYTECODE_NAMES [ FSTORE_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ FSTORE_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ FSTORE_2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ FSTORE_3 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DSTORE_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DSTORE_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DSTORE_2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DSTORE_3 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ASTORE_0 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ASTORE_1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ASTORE_2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ ASTORE_3 ] = "<STR_LIT>" ; BYTECODE_NAMES [ IASTORE ] = "<STR_LIT>" ; BYTECODE_NAMES [ LASTORE ] = "<STR_LIT>" ; BYTECODE_NAMES [ FASTORE ] = "<STR_LIT>" ; BYTECODE_NAMES [ DASTORE ] = "<STR_LIT>" ; BYTECODE_NAMES [ AASTORE ] = "<STR_LIT>" ; BYTECODE_NAMES [ BASTORE ] = "<STR_LIT>" ; BYTECODE_NAMES [ CASTORE ] = "<STR_LIT>" ; BYTECODE_NAMES [ SASTORE ] = "<STR_LIT>" ; BYTECODE_NAMES [ POP ] = "<STR_LIT>" ; BYTECODE_NAMES [ POP2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DUP ] = "<STR_LIT>" ; BYTECODE_NAMES [ DUP_X1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DUP_X2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DUP2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DUP2_X1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ DUP2_X2 ] = "<STR_LIT>" ; BYTECODE_NAMES [ SWAP ] = "<STR_LIT>" ; BYTECODE_NAMES [ IADD ] = "<STR_LIT>" ; BYTECODE_NAMES [ LADD ] = "<STR_LIT>" ; BYTECODE_NAMES [ FADD ] = "<STR_LIT>" ; BYTECODE_NAMES [ DADD ] = "<STR_LIT>" ; BYTECODE_NAMES [ ISUB ] = "<STR_LIT>" ; BYTECODE_NAMES [ LSUB ] = "<STR_LIT>" ; BYTECODE_NAMES [ FSUB ] = "<STR_LIT>" ; BYTECODE_NAMES [ DSUB ] = "<STR_LIT>" ; BYTECODE_NAMES [ IMUL ] = "<STR_LIT>" ; BYTECODE_NAMES [ LMUL ] = "<STR_LIT>" ; BYTECODE_NAMES [ FMUL ] = "<STR_LIT>" ; BYTECODE_NAMES [ DMUL ] = "<STR_LIT>" ; BYTECODE_NAMES [ IDIV ] = "<STR_LIT>" ; BYTECODE_NAMES [ LDIV ] = "<STR_LIT>" ; BYTECODE_NAMES [ FDIV ] = "<STR_LIT>" ; BYTECODE_NAMES [ DDIV ] = "<STR_LIT>" ; BYTECODE_NAMES [ IREM ] = "<STR_LIT>" ; BYTECODE_NAMES [ LREM ] = "<STR_LIT>" ; BYTECODE_NAMES [ FREM ] = "<STR_LIT>" ; BYTECODE_NAMES [ DREM ] = "<STR_LIT>" ; BYTECODE_NAMES [ INEG ] = "<STR_LIT>" ; BYTECODE_NAMES [ LNEG ] = "<STR_LIT>" ; BYTECODE_NAMES [ FNEG ] = "<STR_LIT>" ; BYTECODE_NAMES [ DNEG ] = "<STR_LIT>" ; BYTECODE_NAMES [ ISHL ] = "<STR_LIT>" ; BYTECODE_NAMES [ LSHL ] = "<STR_LIT>" ; BYTECODE_NAMES [ ISHR ] = "<STR_LIT>" ; BYTECODE_NAMES [ LSHR ] = "<STR_LIT>" ; BYTECODE_NAMES [ IUSHR ] = "<STR_LIT>" ; BYTECODE_NAMES [ LUSHR ] = "<STR_LIT>" ; BYTECODE_NAMES [ IAND ] = "<STR_LIT>" ; BYTECODE_NAMES [ LAND ] = "<STR_LIT>" ; BYTECODE_NAMES [ IOR ] = "<STR_LIT>" ; BYTECODE_NAMES [ LOR ] = "<STR_LIT>" ; BYTECODE_NAMES [ IXOR ] = "<STR_LIT>" ; BYTECODE_NAMES [ LXOR ] = "<STR_LIT>" ; BYTECODE_NAMES [ IINC ] = "<STR_LIT>" ; BYTECODE_NAMES [ I2L ] = "<STR_LIT>" ; BYTECODE_NAMES [ I2F ] = "<STR_LIT>" ; BYTECODE_NAMES [ I2D ] = "<STR_LIT>" ; BYTECODE_NAMES [ L2I ] = "<STR_LIT>" ; BYTECODE_NAMES [ L2F ] = "<STR_LIT>" ; BYTECODE_NAMES [ L2D ] = "<STR_LIT>" ; BYTECODE_NAMES [ F2I ] = "<STR_LIT>" ; BYTECODE_NAMES [ F2L ] = "<STR_LIT>" ; BYTECODE_NAMES [ F2D ] = "<STR_LIT>" ; BYTECODE_NAMES [ D2I ] = "<STR_LIT>" ; BYTECODE_NAMES [ D2L ] = "<STR_LIT>" ; BYTECODE_NAMES [ D2F ] = "<STR_LIT>" ; BYTECODE_NAMES [ I2B ] = "<STR_LIT>" ; BYTECODE_NAMES [ I2C ] = "<STR_LIT>" ; BYTECODE_NAMES [ I2S ] = "<STR_LIT>" ; BYTECODE_NAMES [ LCMP ] = "<STR_LIT>" ; BYTECODE_NAMES [ FCMPL ] = "<STR_LIT>" ; BYTECODE_NAMES [ FCMPG ] = "<STR_LIT>" ; BYTECODE_NAMES [ DCMPL ] = "<STR_LIT>" ; BYTECODE_NAMES [ DCMPG ] = "<STR_LIT>" ; BYTECODE_NAMES [ IFEQ ] = "<STR_LIT>" ; BYTECODE_NAMES [ IFNE ] = "<STR_LIT>" ; BYTECODE_NAMES [ IFLT ] = "<STR_LIT>" ; BYTECODE_NAMES [ IFGE ] = "<STR_LIT>" ; BYTECODE_NAMES [ IFGT ] = "<STR_LIT>" ; BYTECODE_NAMES [ IFLE ] = "<STR_LIT>" ; BYTECODE_NAMES [ IF_ICMPEQ ] = "<STR_LIT>" ; BYTECODE_NAMES [ IF_ICMPNE ] = "<STR_LIT>" ; BYTECODE_NAMES [ IF_ICMPLT ] = "<STR_LIT>" ; BYTECODE_NAMES [ IF_ICMPGE ] = "<STR_LIT>" ; BYTECODE_NAMES [ IF_ICMPGT ] = "<STR_LIT>" ; BYTECODE_NAMES [ IF_ICMPLE ] = "<STR_LIT>" ; BYTECODE_NAMES [ IF_ACMPEQ ] = "<STR_LIT>" ; BYTECODE_NAMES [ IF_ACMPNE ] = "<STR_LIT>" ; BYTECODE_NAMES [ GOTO ] = "<STR_LIT>" ; BYTECODE_NAMES [ JSR ] = "<STR_LIT>" ; BYTECODE_NAMES [ RET ] = "<STR_LIT>" ; BYTECODE_NAMES [ TABLESWITCH ] = "<STR_LIT>" ; BYTECODE_NAMES [ LOOKUPSWITCH ] = "<STR_LIT>" ; BYTECODE_NAMES [ IRETURN ] = "<STR_LIT>" ; BYTECODE_NAMES [ LRETURN ] = "<STR_LIT>" ; BYTECODE_NAMES [ FRETURN ] = "<STR_LIT>" ; BYTECODE_NAMES [ DRETURN ] = "<STR_LIT>" ; BYTECODE_NAMES [ ARETURN ] = "<STR_LIT>" ; BYTECODE_NAMES [ RETURN ] = "<STR_LIT>" ; BYTECODE_NAMES [ GETSTATIC ] = "<STR_LIT>" ; BYTECODE_NAMES [ PUTSTATIC ] = "<STR_LIT>" ; BYTECODE_NAMES [ GETFIELD ] = "<STR_LIT>" ; BYTECODE_NAMES [ PUTFIELD ] = "<STR_LIT>" ; BYTECODE_NAMES [ INVOKEVIRTUAL ] = "<STR_LIT>" ; BYTECODE_NAMES [ INVOKESPECIAL ] = "<STR_LIT>" ; BYTECODE_NAMES [ INVOKESTATIC ] = "<STR_LIT>" ; BYTECODE_NAMES [ INVOKEINTERFACE ] = "<STR_LIT>" ; BYTECODE_NAMES [ INVOKEDYNAMIC ] = "<STR_LIT>" ; BYTECODE_NAMES [ NEW ] = "<STR_LIT>" ; BYTECODE_NAMES [ NEWARRAY ] = "<STR_LIT>" ; BYTECODE_NAMES [ ANEWARRAY ] = "<STR_LIT>" ; BYTECODE_NAMES [ ARRAYLENGTH ] = "<STR_LIT>" ; BYTECODE_NAMES [ ATHROW ] = "<STR_LIT>" ; BYTECODE_NAMES [ CHECKCAST ] = "<STR_LIT>" ; BYTECODE_NAMES [ INSTANCEOF ] = "<STR_LIT>" ; BYTECODE_NAMES [ MONITORENTER ] = "<STR_LIT>" ; BYTECODE_NAMES [ MONITOREXIT ] = "<STR_LIT>" ; BYTECODE_NAMES [ WIDE ] = "<STR_LIT>" ; BYTECODE_NAMES [ MULTIANEWARRAY ] = "<STR_LIT>" ; BYTECODE_NAMES [ IFNULL ] = "<STR_LIT>" ; BYTECODE_NAMES [ IFNONNULL ] = "<STR_LIT>" ; BYTECODE_NAMES [ GOTO_W ] = "<STR_LIT>" ; BYTECODE_NAMES [ JSR_W ] = "<STR_LIT>" ; BYTECODE_NAMES [ BREAKPOINT ] = "<STR_LIT>" ; BYTECODE_NAMES [ IMPDEP1 ] = "<STR_LIT>" ; BYTECODE_NAMES [ IMPDEP2 ] = "<STR_LIT>" ; } } </s>
<s> package org . eclipse . jdt . core . util ; public interface IStackMapTableAttribute extends IClassFileAttribute { int getNumberOfEntries ( ) ; IStackMapFrame [ ] getStackMapFrame ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface ILineNumberAttribute extends IClassFileAttribute { int getLineNumberTableLength ( ) ; int [ ] [ ] getLineNumberTable ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface ISourceAttribute extends IClassFileAttribute { int getSourceFileIndex ( ) ; char [ ] getSourceFileName ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IStackMapAttribute extends IClassFileAttribute { int getNumberOfEntries ( ) ; IStackMapFrame [ ] getStackMapFrame ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IAttributeNamesConstants { char [ ] SYNTHETIC = "<STR_LIT>" . toCharArray ( ) ; char [ ] CONSTANT_VALUE = "<STR_LIT>" . toCharArray ( ) ; char [ ] LINE_NUMBER = "<STR_LIT>" . toCharArray ( ) ; char [ ] LOCAL_VARIABLE = "<STR_LIT>" . toCharArray ( ) ; char [ ] INNER_CLASSES = "<STR_LIT>" . toCharArray ( ) ; char [ ] CODE = "<STR_LIT>" . toCharArray ( ) ; char [ ] EXCEPTIONS = "<STR_LIT>" . toCharArray ( ) ; char [ ] SOURCE = "<STR_LIT>" . toCharArray ( ) ; char [ ] DEPRECATED = "<STR_LIT>" . toCharArray ( ) ; char [ ] SIGNATURE = "<STR_LIT>" . toCharArray ( ) ; char [ ] ENCLOSING_METHOD = "<STR_LIT>" . toCharArray ( ) ; char [ ] LOCAL_VARIABLE_TYPE_TABLE = "<STR_LIT>" . toCharArray ( ) ; char [ ] RUNTIME_VISIBLE_ANNOTATIONS = "<STR_LIT>" . toCharArray ( ) ; char [ ] RUNTIME_INVISIBLE_ANNOTATIONS = "<STR_LIT>" . toCharArray ( ) ; char [ ] RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS = "<STR_LIT>" . toCharArray ( ) ; char [ ] RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS = "<STR_LIT>" . toCharArray ( ) ; char [ ] ANNOTATION_DEFAULT = "<STR_LIT>" . toCharArray ( ) ; char [ ] STACK_MAP_TABLE = "<STR_LIT>" . toCharArray ( ) ; char [ ] STACK_MAP = "<STR_LIT>" . toCharArray ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IRuntimeInvisibleParameterAnnotationsAttribute extends IClassFileAttribute { int getParametersNumber ( ) ; IParameterAnnotation [ ] getParameterAnnotations ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IConstantPoolEntry { int getKind ( ) ; int getClassInfoNameIndex ( ) ; int getClassIndex ( ) ; int getNameAndTypeIndex ( ) ; int getStringIndex ( ) ; String getStringValue ( ) ; int getIntegerValue ( ) ; float getFloatValue ( ) ; double getDoubleValue ( ) ; long getLongValue ( ) ; int getNameAndTypeInfoDescriptorIndex ( ) ; int getNameAndTypeInfoNameIndex ( ) ; char [ ] getClassInfoName ( ) ; char [ ] getClassName ( ) ; char [ ] getFieldName ( ) ; char [ ] getMethodName ( ) ; char [ ] getFieldDescriptor ( ) ; char [ ] getMethodDescriptor ( ) ; char [ ] getUtf8Value ( ) ; int getUtf8Length ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IInnerClassesAttributeEntry { int getAccessFlags ( ) ; int getInnerNameIndex ( ) ; int getOuterClassNameIndex ( ) ; int getInnerClassNameIndex ( ) ; char [ ] getInnerName ( ) ; char [ ] getOuterClassName ( ) ; char [ ] getInnerClassName ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; public interface IMethodInfo { char [ ] getDescriptor ( ) ; int getDescriptorIndex ( ) ; int getAccessFlags ( ) ; char [ ] getName ( ) ; int getNameIndex ( ) ; boolean isClinit ( ) ; boolean isConstructor ( ) ; boolean isSynthetic ( ) ; boolean isDeprecated ( ) ; ICodeAttribute getCodeAttribute ( ) ; IExceptionAttribute getExceptionAttribute ( ) ; int getAttributeCount ( ) ; IClassFileAttribute [ ] getAttributes ( ) ; } </s>
<s> package org . eclipse . jdt . core . util ; import java . io . File ; import java . io . IOException ; import java . util . Enumeration ; import java . util . HashMap ; import java . util . Iterator ; import java . util . LinkedHashSet ; import java . util . Map ; import java . util . PropertyResourceBundle ; import java . util . Set ; import org . eclipse . core . resources . IFile ; import org . eclipse . core . resources . IFolder ; import org . eclipse . core . resources . IProject ; import org . eclipse . core . runtime . CoreException ; import org . eclipse . core . runtime . IPath ; import org . eclipse . jdt . core . IClasspathEntry ; import org . eclipse . jdt . core . IJavaProject ; import org . eclipse . jdt . core . JavaCore ; import org . eclipse . jdt . core . JavaModelException ; import org . eclipse . jdt . internal . compiler . impl . CompilerOptions ; public class CompilerUtils { public static final int IsGrails = <NUM_LIT> ; public static void configureOptionsBasedOnNature ( CompilerOptions compilerOptions , IJavaProject javaProject ) { if ( javaProject == null ) { compilerOptions . buildGroovyFiles = <NUM_LIT:1> ; compilerOptions . groovyFlags = <NUM_LIT:0> ; return ; } IProject project = javaProject . getProject ( ) ; try { if ( isGroovyNaturedProject ( project ) ) { compilerOptions . storeAnnotations = true ; compilerOptions . buildGroovyFiles = <NUM_LIT:2> ; setGroovyClasspath ( compilerOptions , javaProject ) ; if ( isProbablyGrailsProject ( project ) ) { compilerOptions . groovyFlags = IsGrails ; } else { compilerOptions . groovyFlags = <NUM_LIT:0> ; } } else { compilerOptions . buildGroovyFiles = <NUM_LIT:1> ; compilerOptions . groovyFlags = <NUM_LIT:0> ; } } catch ( CoreException e ) { compilerOptions . buildGroovyFiles = <NUM_LIT:1> ; compilerOptions . groovyFlags = <NUM_LIT:0> ; } } public static void configureOptionsBasedOnNature ( Map optionMap , IJavaProject javaProject ) { IProject project = javaProject . getProject ( ) ; try { if ( isGroovyNaturedProject ( project ) ) { optionMap . put ( CompilerOptions . OPTIONG_BuildGroovyFiles , CompilerOptions . ENABLED ) ; setGroovyClasspath ( optionMap , javaProject ) ; if ( isProbablyGrailsProject ( project ) ) { optionMap . put ( CompilerOptions . OPTIONG_GroovyFlags , Integer . toString ( IsGrails ) ) ; } else { optionMap . put ( CompilerOptions . OPTIONG_GroovyFlags , "<STR_LIT:0>" ) ; } } else { optionMap . put ( CompilerOptions . OPTIONG_BuildGroovyFiles , CompilerOptions . DISABLED ) ; optionMap . put ( CompilerOptions . OPTIONG_GroovyFlags , "<STR_LIT:0>" ) ; } } catch ( CoreException e ) { e . printStackTrace ( ) ; optionMap . put ( CompilerOptions . OPTIONG_BuildGroovyFiles , CompilerOptions . DISABLED ) ; optionMap . put ( CompilerOptions . OPTIONG_GroovyFlags , "<STR_LIT:0>" ) ; } } private static boolean isProbablyGrailsProject ( IProject project ) { try { IFolder folder = project . getFolder ( "<STR_LIT>" ) ; return folder . exists ( ) ; } catch ( Exception e ) { return false ; } } public static void setGroovyClasspath ( CompilerOptions compilerOptions , IJavaProject javaProject ) { Map newOptions = new HashMap ( ) ; setGroovyClasspath ( newOptions , javaProject ) ; compilerOptions . groovyProjectName = javaProject . getProject ( ) . getName ( ) ; if ( ! newOptions . isEmpty ( ) ) { compilerOptions . set ( newOptions ) ; } } public static void setGroovyClasspath ( Map optionMap , IJavaProject javaProject ) { IFile file = javaProject . getProject ( ) . getFile ( "<STR_LIT>" ) ; if ( file . exists ( ) ) { try { PropertyResourceBundle prb = new PropertyResourceBundle ( file . getContents ( ) ) ; Enumeration e = prb . getKeys ( ) ; while ( e . hasMoreElements ( ) ) { String k = ( String ) e . nextElement ( ) ; String v = ( String ) prb . getObject ( k ) ; v = fixup ( v , javaProject ) ; if ( k . equals ( CompilerOptions . OPTIONG_GroovyClassLoaderPath ) ) { optionMap . put ( CompilerOptions . OPTIONG_GroovyClassLoaderPath , v ) ; } } } catch ( IOException ioe ) { System . err . println ( "<STR_LIT>" ) ; ioe . printStackTrace ( ) ; } catch ( CoreException ce ) { System . err . println ( "<STR_LIT>" ) ; ce . printStackTrace ( ) ; } catch ( Throwable t ) { System . err . println ( "<STR_LIT>" ) ; t . printStackTrace ( ) ; } } else { try { String classpath = calculateClasspath ( javaProject ) ; optionMap . put ( CompilerOptions . OPTIONG_GroovyClassLoaderPath , classpath ) ; } catch ( Throwable t ) { System . err . println ( "<STR_LIT>" ) ; t . printStackTrace ( ) ; } } optionMap . put ( CompilerOptions . OPTIONG_GroovyProjectName , javaProject . getProject ( ) . getName ( ) ) ; } private static String fixup ( String someString , IJavaProject javaProject ) { if ( someString . startsWith ( "<STR_LIT>" ) ) { someString = javaProject . getProject ( ) . getLocation ( ) . toOSString ( ) + File . separator + someString . substring ( "<STR_LIT>" . length ( ) ) ; } if ( someString . equals ( "<STR_LIT>" ) ) { someString = calculateClasspath ( javaProject ) ; } return someString ; } private static boolean isGroovyNaturedProject ( IProject project ) throws CoreException { return project . hasNature ( "<STR_LIT>" ) ; } private static String pathToString ( IPath path , IProject project ) { String realLocation = null ; if ( path != null ) { String prefix = path . segment ( <NUM_LIT:0> ) ; if ( prefix . equals ( project . getName ( ) ) ) { if ( path . segmentCount ( ) == <NUM_LIT:1> ) { IPath rawPath = project . getRawLocation ( ) ; if ( rawPath == null ) { System . err . println ( "<STR_LIT>" + project ) ; } else { realLocation = project . getRawLocation ( ) . toOSString ( ) ; } } else { IPath rawLocation = project . getFile ( path . removeFirstSegments ( <NUM_LIT:1> ) ) . getRawLocation ( ) ; if ( rawLocation != null ) { realLocation = rawLocation . toOSString ( ) ; } } } else { realLocation = path . toOSString ( ) ; } } return realLocation ; } public static String calculateClasspath ( IJavaProject javaProject ) { try { Set accumulatedPathEntries = new LinkedHashSet ( ) ; IProject project = javaProject . getProject ( ) ; String projectName = project . getName ( ) ; IPath defaultOutputPath = javaProject . getOutputLocation ( ) ; String defaultOutputLocation = pathToString ( defaultOutputPath , project ) ; IClasspathEntry [ ] cpes = javaProject . getResolvedClasspath ( true ) ; if ( cpes != null ) { for ( int i = <NUM_LIT:0> , max = cpes . length ; i < max ; i ++ ) { IClasspathEntry cpe = cpes [ i ] ; if ( cpe . getEntryKind ( ) == IClasspathEntry . CPE_SOURCE ) { continue ; } IPath cpePath = cpe . getPath ( ) ; String pathElement = null ; String segmentZero = cpePath . segment ( <NUM_LIT:0> ) ; if ( segmentZero . equals ( projectName ) ) { pathElement = project . getFile ( cpePath . removeFirstSegments ( <NUM_LIT:1> ) ) . getRawLocation ( ) . toOSString ( ) ; } else { if ( cpe . getEntryKind ( ) == IClasspathEntry . CPE_LIBRARY ) { try { IProject iproject = project . getWorkspace ( ) . getRoot ( ) . getProject ( segmentZero ) ; if ( iproject != null ) { IFile ifile = iproject . getFile ( cpePath . removeFirstSegments ( <NUM_LIT:1> ) ) ; IPath ipath = ( ifile == null ? null : ifile . getRawLocation ( ) ) ; pathElement = ( ipath == null ? null : ipath . toOSString ( ) ) ; } } catch ( Throwable t ) { t . printStackTrace ( ) ; } } if ( cpe . getEntryKind ( ) == IClasspathEntry . CPE_PROJECT ) { computeDependenciesFromProject ( project , segmentZero , accumulatedPathEntries ) ; } else { if ( pathElement == null ) { pathElement = cpe . getPath ( ) . toOSString ( ) ; } } } if ( pathElement != null ) { accumulatedPathEntries . add ( pathElement ) ; } } accumulatedPathEntries . add ( defaultOutputLocation ) ; StringBuilder sb = new StringBuilder ( ) ; Iterator iter = accumulatedPathEntries . iterator ( ) ; while ( iter . hasNext ( ) ) { sb . append ( ( String ) iter . next ( ) ) ; sb . append ( File . pathSeparator ) ; } String classpath = sb . toString ( ) ; return classpath ; } } catch ( JavaModelException jme ) { System . err . println ( "<STR_LIT>" + javaProject . getProject ( ) . getName ( ) + "<STR_LIT::>" ) ; jme . printStackTrace ( ) ; } return "<STR_LIT>" ; } private static void computeDependenciesFromProject ( IProject baseProject , String otherProject , Set accumulatedPathEntries ) throws JavaModelException { IProject iproject = baseProject . getWorkspace ( ) . getRoot ( ) . getProject ( otherProject ) ; IJavaProject ijp = JavaCore . create ( iproject ) ; accumulatedPathEntries . add ( pathToString ( ijp . getOutputLocation ( ) , iproject ) ) ; IClasspathEntry [ ] cpes = ijp . getResolvedClasspath ( true ) ; if ( cpes != null ) { for ( int j = <NUM_LIT:0> ; j < cpes . length ; j ++ ) { IClasspathEntry cpe = cpes [ j ] ; if ( cpe . getEntryKind ( ) == IClasspathEntry . CPE_SOURCE ) { continue ; } if ( cpe . isExported ( ) ) { IPath cpePath = cpes [ j ] . getPath ( ) ; String segmentZero = cpePath . segment ( <NUM_LIT:0> ) ; if ( segmentZero != null && segmentZero . equals ( otherProject ) ) { accumulatedPathEntries . add ( iproject . getFile ( cpePath . removeFirstSegments ( <NUM_LIT:1> ) ) . getRawLocation ( ) . toOSString ( ) ) ; } else { if ( cpe . getEntryKind ( ) == IClasspathEntry . CPE_PROJECT ) { computeDependenciesFromProject ( baseProject , segmentZero , accumulatedPathEntries ) ; } else { String otherPathElement = null ; if ( segmentZero != null && segmentZero . equals ( iproject . getName ( ) ) ) { otherPathElement = iproject . getFile ( cpePath . removeFirstSegments ( <NUM_LIT:1> ) ) . getRawLocation ( ) . toOSString ( ) ; } else { otherPathElement = cpePath . toOSString ( ) ; } accumulatedPathEntries . add ( otherPathElement ) ; } } } } } } } </s>