signature:
public class JavaCharStream { /** * Read a character . */
public char readChar ( ) throws java . io . IOException { } }

implementation:
if ( inBuf > 0 ) { -- inBuf ; if ( ++ bufpos == bufsize ) bufpos = 0 ; return buffer [ bufpos ] ; } char c ; if ( ++ bufpos == available ) AdjustBuffSize ( ) ; if ( ( buffer [ bufpos ] = c = ReadByte ( ) ) == '\\' ) { UpdateLineColumn ( c ) ; int backSlashCnt = 1 ; for ( ; ; ) // Read all the backslashes
{ if ( ++ bufpos == available ) AdjustBuffSize ( ) ; try { if ( ( buffer [ bufpos ] = c = ReadByte ( ) ) != '\\' ) { UpdateLineColumn ( c ) ; // found a non - backslash char .
if ( ( c == 'u' ) && ( ( backSlashCnt & 1 ) == 1 ) ) { if ( -- bufpos < 0 ) bufpos = bufsize - 1 ; break ; } backup ( backSlashCnt ) ; return '\\' ; } } catch ( java . io . IOException e ) { if ( backSlashCnt > 1 ) backup ( backSlashCnt - 1 ) ; return '\\' ; } UpdateLineColumn ( c ) ; backSlashCnt ++ ; } // Here , we have seen an odd number of backslash ' s followed by a ' u '
try { while ( ( c = ReadByte ( ) ) == 'u' ) ++ column ; buffer [ bufpos ] = c = ( char ) ( hexval ( c ) << 12 | hexval ( ReadByte ( ) ) << 8 | hexval ( ReadByte ( ) ) << 4 | hexval ( ReadByte ( ) ) ) ; column += 4 ; } catch ( java . io . IOException e ) { throw new Error ( "Invalid escape character at line " + line + " column " + column + "." ) ; } if ( backSlashCnt == 1 ) return c ; else { backup ( backSlashCnt - 1 ) ; return '\\' ; } } else { UpdateLineColumn ( c ) ; return c ; }


signature:
public class OgnlParser { /** * sequence ( level 14) */
final public void expression ( ) throws ParseException { } }

implementation: assignmentExpression ( ) ; label_1 : while ( true ) { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 1 : ; break ; default : jj_la1 [ 0 ] = jj_gen ; break label_1 ; } jj_consume_token ( 1 ) ; ASTSequence jjtn001 = new ASTSequence ( JJTSEQUENCE ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { assignmentExpression ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } }


signature:
public class OgnlParser { /** * assignment expression ( level 13) */
final public void assignmentExpression ( ) throws ParseException { } }

implementation: conditionalTestExpression ( ) ; switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 2 : jj_consume_token ( 2 ) ; ASTAssign jjtn001 = new ASTAssign ( JJTASSIGN ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { assignmentExpression ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } break ; default : jj_la1 [ 1 ] = jj_gen ; ; }


signature:
public class OgnlParser { /** * logical or ( | | ) ( level 11) */
final public void logicalOrExpression ( ) throws ParseException { } }

implementation: logicalAndExpression ( ) ; label_2 : while ( true ) { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 5 : case 6 : ; break ; default : jj_la1 [ 3 ] = jj_gen ; break label_2 ; } switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 5 : jj_consume_token ( 5 ) ; break ; case 6 : jj_consume_token ( 6 ) ; break ; default : jj_la1 [ 4 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTOr jjtn001 = new ASTOr ( JJTOR ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { logicalAndExpression ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } }


signature:
public class OgnlParser { /** * logical and ( & & ) ( level 10) */
final public void logicalAndExpression ( ) throws ParseException { } }

implementation: inclusiveOrExpression ( ) ; label_3 : while ( true ) { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 7 : case 8 : ; break ; default : jj_la1 [ 5 ] = jj_gen ; break label_3 ; } switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 7 : jj_consume_token ( 7 ) ; break ; case 8 : jj_consume_token ( 8 ) ; break ; default : jj_la1 [ 6 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTAnd jjtn001 = new ASTAnd ( JJTAND ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { inclusiveOrExpression ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } }


signature:
public class OgnlParser { /** * bitwise or non - short - circuiting or ( | ) ( level 9) */
final public void inclusiveOrExpression ( ) throws ParseException { } }

implementation: exclusiveOrExpression ( ) ; label_4 : while ( true ) { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 9 : case 10 : ; break ; default : jj_la1 [ 7 ] = jj_gen ; break label_4 ; } switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 9 : jj_consume_token ( 9 ) ; break ; case 10 : jj_consume_token ( 10 ) ; break ; default : jj_la1 [ 8 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTBitOr jjtn001 = new ASTBitOr ( JJTBITOR ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { exclusiveOrExpression ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } }


signature:
public class OgnlParser { /** * exclusive or ( ^ ) ( level 8) */
final public void exclusiveOrExpression ( ) throws ParseException { } }

implementation: andExpression ( ) ; label_5 : while ( true ) { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 11 : case 12 : ; break ; default : jj_la1 [ 9 ] = jj_gen ; break label_5 ; } switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 11 : jj_consume_token ( 11 ) ; break ; case 12 : jj_consume_token ( 12 ) ; break ; default : jj_la1 [ 10 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTXor jjtn001 = new ASTXor ( JJTXOR ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { andExpression ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } }


signature:
public class OgnlParser { /** * bitwise or non - short - circuiting and ( & ) ( level 7) */
final public void andExpression ( ) throws ParseException { } }

implementation: equalityExpression ( ) ; label_6 : while ( true ) { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 13 : case 14 : ; break ; default : jj_la1 [ 11 ] = jj_gen ; break label_6 ; } switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 13 : jj_consume_token ( 13 ) ; break ; case 14 : jj_consume_token ( 14 ) ; break ; default : jj_la1 [ 12 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTBitAnd jjtn001 = new ASTBitAnd ( JJTBITAND ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { equalityExpression ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } }


signature:
public class OgnlParser { /** * equality / inequality ( = = / ! = ) ( level 6) */
final public void equalityExpression ( ) throws ParseException { } }

implementation: relationalExpression ( ) ; label_7 : while ( true ) { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 15 : case 16 : case 17 : case 18 : ; break ; default : jj_la1 [ 13 ] = jj_gen ; break label_7 ; } switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 15 : case 16 : switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 15 : jj_consume_token ( 15 ) ; break ; case 16 : jj_consume_token ( 16 ) ; break ; default : jj_la1 [ 14 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTEq jjtn001 = new ASTEq ( JJTEQ ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { relationalExpression ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } break ; case 17 : case 18 : switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 17 : jj_consume_token ( 17 ) ; break ; case 18 : jj_consume_token ( 18 ) ; break ; default : jj_la1 [ 15 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTNotEq jjtn002 = new ASTNotEq ( JJTNOTEQ ) ; boolean jjtc002 = true ; jjtree . openNodeScope ( jjtn002 ) ; try { relationalExpression ( ) ; } catch ( Throwable jjte002 ) { if ( jjtc002 ) { jjtree . clearNodeScope ( jjtn002 ) ; jjtc002 = false ; } else { jjtree . popNode ( ) ; } if ( jjte002 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte002 ; } } if ( jjte002 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte002 ; } } { if ( true ) throw ( Error ) jjte002 ; } } finally { if ( jjtc002 ) { jjtree . closeNodeScope ( jjtn002 , 2 ) ; } } break ; default : jj_la1 [ 16 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } }


signature:
public class OgnlParser { /** * boolean relational expressions ( level 5) */
final public void relationalExpression ( ) throws ParseException { } }

implementation: shiftExpression ( ) ; label_8 : while ( true ) { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 19 : case 20 : case 21 : case 22 : case 23 : case 24 : case 25 : case 26 : case 27 : case 28 : ; break ; default : jj_la1 [ 17 ] = jj_gen ; break label_8 ; } switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 19 : case 20 : switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 19 : jj_consume_token ( 19 ) ; break ; case 20 : jj_consume_token ( 20 ) ; break ; default : jj_la1 [ 18 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTLess jjtn001 = new ASTLess ( JJTLESS ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { shiftExpression ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } break ; case 21 : case 22 : switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 21 : jj_consume_token ( 21 ) ; break ; case 22 : jj_consume_token ( 22 ) ; break ; default : jj_la1 [ 19 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTGreater jjtn002 = new ASTGreater ( JJTGREATER ) ; boolean jjtc002 = true ; jjtree . openNodeScope ( jjtn002 ) ; try { shiftExpression ( ) ; } catch ( Throwable jjte002 ) { if ( jjtc002 ) { jjtree . clearNodeScope ( jjtn002 ) ; jjtc002 = false ; } else { jjtree . popNode ( ) ; } if ( jjte002 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte002 ; } } if ( jjte002 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte002 ; } } { if ( true ) throw ( Error ) jjte002 ; } } finally { if ( jjtc002 ) { jjtree . closeNodeScope ( jjtn002 , 2 ) ; } } break ; case 23 : case 24 : switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 23 : jj_consume_token ( 23 ) ; break ; case 24 : jj_consume_token ( 24 ) ; break ; default : jj_la1 [ 20 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTLessEq jjtn003 = new ASTLessEq ( JJTLESSEQ ) ; boolean jjtc003 = true ; jjtree . openNodeScope ( jjtn003 ) ; try { shiftExpression ( ) ; } catch ( Throwable jjte003 ) { if ( jjtc003 ) { jjtree . clearNodeScope ( jjtn003 ) ; jjtc003 = false ; } else { jjtree . popNode ( ) ; } if ( jjte003 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte003 ; } } if ( jjte003 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte003 ; } } { if ( true ) throw ( Error ) jjte003 ; } } finally { if ( jjtc003 ) { jjtree . closeNodeScope ( jjtn003 , 2 ) ; } } break ; case 25 : case 26 : switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 25 : jj_consume_token ( 25 ) ; break ; case 26 : jj_consume_token ( 26 ) ; break ; default : jj_la1 [ 21 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTGreaterEq jjtn004 = new ASTGreaterEq ( JJTGREATEREQ ) ; boolean jjtc004 = true ; jjtree . openNodeScope ( jjtn004 ) ; try { shiftExpression ( ) ; } catch ( Throwable jjte004 ) { if ( jjtc004 ) { jjtree . clearNodeScope ( jjtn004 ) ; jjtc004 = false ; } else { jjtree . popNode ( ) ; } if ( jjte004 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte004 ; } } if ( jjte004 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte004 ; } } { if ( true ) throw ( Error ) jjte004 ; } } finally { if ( jjtc004 ) { jjtree . closeNodeScope ( jjtn004 , 2 ) ; } } break ; case 27 : jj_consume_token ( 27 ) ; ASTIn jjtn005 = new ASTIn ( JJTIN ) ; boolean jjtc005 = true ; jjtree . openNodeScope ( jjtn005 ) ; try { shiftExpression ( ) ; } catch ( Throwable jjte005 ) { if ( jjtc005 ) { jjtree . clearNodeScope ( jjtn005 ) ; jjtc005 = false ; } else { jjtree . popNode ( ) ; } if ( jjte005 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte005 ; } } if ( jjte005 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte005 ; } } { if ( true ) throw ( Error ) jjte005 ; } } finally { if ( jjtc005 ) { jjtree . closeNodeScope ( jjtn005 , 2 ) ; } } break ; case 28 : jj_consume_token ( 28 ) ; jj_consume_token ( 27 ) ; ASTNotIn jjtn006 = new ASTNotIn ( JJTNOTIN ) ; boolean jjtc006 = true ; jjtree . openNodeScope ( jjtn006 ) ; try { shiftExpression ( ) ; } catch ( Throwable jjte006 ) { if ( jjtc006 ) { jjtree . clearNodeScope ( jjtn006 ) ; jjtc006 = false ; } else { jjtree . popNode ( ) ; } if ( jjte006 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte006 ; } } if ( jjte006 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte006 ; } } { if ( true ) throw ( Error ) jjte006 ; } } finally { if ( jjtc006 ) { jjtree . closeNodeScope ( jjtn006 , 2 ) ; } } break ; default : jj_la1 [ 22 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } }


signature:
public class OgnlParser { /** * bit shift expressions ( level 4) */
final public void shiftExpression ( ) throws ParseException { } }

implementation: additiveExpression ( ) ; label_9 : while ( true ) { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 29 : case 30 : case 31 : case 32 : case 33 : case 34 : ; break ; default : jj_la1 [ 23 ] = jj_gen ; break label_9 ; } switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 29 : case 30 : switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 29 : jj_consume_token ( 29 ) ; break ; case 30 : jj_consume_token ( 30 ) ; break ; default : jj_la1 [ 24 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTShiftLeft jjtn001 = new ASTShiftLeft ( JJTSHIFTLEFT ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { additiveExpression ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } break ; case 31 : case 32 : switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 31 : jj_consume_token ( 31 ) ; break ; case 32 : jj_consume_token ( 32 ) ; break ; default : jj_la1 [ 25 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTShiftRight jjtn002 = new ASTShiftRight ( JJTSHIFTRIGHT ) ; boolean jjtc002 = true ; jjtree . openNodeScope ( jjtn002 ) ; try { additiveExpression ( ) ; } catch ( Throwable jjte002 ) { if ( jjtc002 ) { jjtree . clearNodeScope ( jjtn002 ) ; jjtc002 = false ; } else { jjtree . popNode ( ) ; } if ( jjte002 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte002 ; } } if ( jjte002 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte002 ; } } { if ( true ) throw ( Error ) jjte002 ; } } finally { if ( jjtc002 ) { jjtree . closeNodeScope ( jjtn002 , 2 ) ; } } break ; case 33 : case 34 : switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 33 : jj_consume_token ( 33 ) ; break ; case 34 : jj_consume_token ( 34 ) ; break ; default : jj_la1 [ 26 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTUnsignedShiftRight jjtn003 = new ASTUnsignedShiftRight ( JJTUNSIGNEDSHIFTRIGHT ) ; boolean jjtc003 = true ; jjtree . openNodeScope ( jjtn003 ) ; try { additiveExpression ( ) ; } catch ( Throwable jjte003 ) { if ( jjtc003 ) { jjtree . clearNodeScope ( jjtn003 ) ; jjtc003 = false ; } else { jjtree . popNode ( ) ; } if ( jjte003 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte003 ; } } if ( jjte003 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte003 ; } } { if ( true ) throw ( Error ) jjte003 ; } } finally { if ( jjtc003 ) { jjtree . closeNodeScope ( jjtn003 , 2 ) ; } } break ; default : jj_la1 [ 27 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } }


signature:
public class OgnlParser { /** * binary addition / subtraction ( level 3) */
final public void additiveExpression ( ) throws ParseException { } }

implementation: multiplicativeExpression ( ) ; label_10 : while ( true ) { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 35 : case 36 : ; break ; default : jj_la1 [ 28 ] = jj_gen ; break label_10 ; } switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 35 : jj_consume_token ( 35 ) ; ASTAdd jjtn001 = new ASTAdd ( JJTADD ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { multiplicativeExpression ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } break ; case 36 : jj_consume_token ( 36 ) ; ASTSubtract jjtn002 = new ASTSubtract ( JJTSUBTRACT ) ; boolean jjtc002 = true ; jjtree . openNodeScope ( jjtn002 ) ; try { multiplicativeExpression ( ) ; } catch ( Throwable jjte002 ) { if ( jjtc002 ) { jjtree . clearNodeScope ( jjtn002 ) ; jjtc002 = false ; } else { jjtree . popNode ( ) ; } if ( jjte002 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte002 ; } } if ( jjte002 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte002 ; } } { if ( true ) throw ( Error ) jjte002 ; } } finally { if ( jjtc002 ) { jjtree . closeNodeScope ( jjtn002 , 2 ) ; } } break ; default : jj_la1 [ 29 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } }


signature:
public class OgnlParser { /** * multiplication / division / remainder ( level 2) */
final public void multiplicativeExpression ( ) throws ParseException { } }

implementation: unaryExpression ( ) ; label_11 : while ( true ) { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 37 : case 38 : case 39 : ; break ; default : jj_la1 [ 30 ] = jj_gen ; break label_11 ; } switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 37 : jj_consume_token ( 37 ) ; ASTMultiply jjtn001 = new ASTMultiply ( JJTMULTIPLY ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { unaryExpression ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } break ; case 38 : jj_consume_token ( 38 ) ; ASTDivide jjtn002 = new ASTDivide ( JJTDIVIDE ) ; boolean jjtc002 = true ; jjtree . openNodeScope ( jjtn002 ) ; try { unaryExpression ( ) ; } catch ( Throwable jjte002 ) { if ( jjtc002 ) { jjtree . clearNodeScope ( jjtn002 ) ; jjtc002 = false ; } else { jjtree . popNode ( ) ; } if ( jjte002 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte002 ; } } if ( jjte002 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte002 ; } } { if ( true ) throw ( Error ) jjte002 ; } } finally { if ( jjtc002 ) { jjtree . closeNodeScope ( jjtn002 , 2 ) ; } } break ; case 39 : jj_consume_token ( 39 ) ; ASTRemainder jjtn003 = new ASTRemainder ( JJTREMAINDER ) ; boolean jjtc003 = true ; jjtree . openNodeScope ( jjtn003 ) ; try { unaryExpression ( ) ; } catch ( Throwable jjte003 ) { if ( jjtc003 ) { jjtree . clearNodeScope ( jjtn003 ) ; jjtc003 = false ; } else { jjtree . popNode ( ) ; } if ( jjte003 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte003 ; } } if ( jjte003 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte003 ; } } { if ( true ) throw ( Error ) jjte003 ; } } finally { if ( jjtc003 ) { jjtree . closeNodeScope ( jjtn003 , 2 ) ; } } break ; default : jj_la1 [ 31 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } }


signature:
public class OgnlParser { /** * unary ( level 1) */
final public void unaryExpression ( ) throws ParseException { } }

implementation: StringBuffer sb ; Token t ; ASTInstanceof ionode ; switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 36 : jj_consume_token ( 36 ) ; ASTNegate jjtn001 = new ASTNegate ( JJTNEGATE ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { unaryExpression ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 1 ) ; } } break ; case 35 : jj_consume_token ( 35 ) ; unaryExpression ( ) ; break ; case 40 : jj_consume_token ( 40 ) ; ASTBitNegate jjtn002 = new ASTBitNegate ( JJTBITNEGATE ) ; boolean jjtc002 = true ; jjtree . openNodeScope ( jjtn002 ) ; try { unaryExpression ( ) ; } catch ( Throwable jjte002 ) { if ( jjtc002 ) { jjtree . clearNodeScope ( jjtn002 ) ; jjtc002 = false ; } else { jjtree . popNode ( ) ; } if ( jjte002 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte002 ; } } if ( jjte002 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte002 ; } } { if ( true ) throw ( Error ) jjte002 ; } } finally { if ( jjtc002 ) { jjtree . closeNodeScope ( jjtn002 , 1 ) ; } } break ; case 28 : case 41 : switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 41 : jj_consume_token ( 41 ) ; break ; case 28 : jj_consume_token ( 28 ) ; break ; default : jj_la1 [ 32 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } ASTNot jjtn003 = new ASTNot ( JJTNOT ) ; boolean jjtc003 = true ; jjtree . openNodeScope ( jjtn003 ) ; try { unaryExpression ( ) ; } catch ( Throwable jjte003 ) { if ( jjtc003 ) { jjtree . clearNodeScope ( jjtn003 ) ; jjtc003 = false ; } else { jjtree . popNode ( ) ; } if ( jjte003 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte003 ; } } if ( jjte003 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte003 ; } } { if ( true ) throw ( Error ) jjte003 ; } } finally { if ( jjtc003 ) { jjtree . closeNodeScope ( jjtn003 , 1 ) ; } } break ; case 4 : case 44 : case 46 : case 47 : case 48 : case 49 : case 50 : case 51 : case 52 : case 54 : case 56 : case 57 : case IDENT : case DYNAMIC_SUBSCRIPT : case CHAR_LITERAL : case BACK_CHAR_LITERAL : case STRING_LITERAL : case INT_LITERAL : case FLT_LITERAL : navigationChain ( ) ; switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 42 : jj_consume_token ( 42 ) ; t = jj_consume_token ( IDENT ) ; ASTInstanceof jjtn004 = new ASTInstanceof ( JJTINSTANCEOF ) ; boolean jjtc004 = true ; jjtree . openNodeScope ( jjtn004 ) ; try { jjtree . closeNodeScope ( jjtn004 , 1 ) ; jjtc004 = false ; sb = new StringBuffer ( t . image ) ; ionode = jjtn004 ; } finally { if ( jjtc004 ) { jjtree . closeNodeScope ( jjtn004 , 1 ) ; } } label_12 : while ( true ) { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 43 : ; break ; default : jj_la1 [ 33 ] = jj_gen ; break label_12 ; } jj_consume_token ( 43 ) ; t = jj_consume_token ( IDENT ) ; sb . append ( '.' ) . append ( t . image ) ; } ionode . setTargetType ( new String ( sb ) ) ; break ; default : jj_la1 [ 34 ] = jj_gen ; ; } break ; default : jj_la1 [ 35 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; }


signature:
public class OgnlParser { /** * navigation chain : property references , method calls , projections , selections , etc . */
final public void navigationChain ( ) throws ParseException { } }

implementation: primaryExpression ( ) ; label_13 : while ( true ) { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 43 : case 44 : case 52 : case DYNAMIC_SUBSCRIPT : ; break ; default : jj_la1 [ 36 ] = jj_gen ; break label_13 ; } switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 43 : jj_consume_token ( 43 ) ; ASTChain jjtn001 = new ASTChain ( JJTCHAIN ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case IDENT : if ( jj_2_1 ( 2 ) ) { methodCall ( ) ; } else { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case IDENT : propertyName ( ) ; break ; default : jj_la1 [ 37 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } } break ; case 54 : if ( jj_2_2 ( 2 ) ) { projection ( ) ; } else { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 54 : selection ( ) ; break ; default : jj_la1 [ 38 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } } break ; case 44 : jj_consume_token ( 44 ) ; expression ( ) ; jj_consume_token ( 45 ) ; break ; default : jj_la1 [ 39 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } break ; case 52 : case DYNAMIC_SUBSCRIPT : ASTChain jjtn002 = new ASTChain ( JJTCHAIN ) ; boolean jjtc002 = true ; jjtree . openNodeScope ( jjtn002 ) ; try { index ( ) ; } catch ( Throwable jjte002 ) { if ( jjtc002 ) { jjtree . clearNodeScope ( jjtn002 ) ; jjtc002 = false ; } else { jjtree . popNode ( ) ; } if ( jjte002 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte002 ; } } if ( jjte002 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte002 ; } } { if ( true ) throw ( Error ) jjte002 ; } } finally { if ( jjtc002 ) { jjtree . closeNodeScope ( jjtn002 , 2 ) ; } } break ; case 44 : jj_consume_token ( 44 ) ; expression ( ) ; ASTEval jjtn003 = new ASTEval ( JJTEVAL ) ; boolean jjtc003 = true ; jjtree . openNodeScope ( jjtn003 ) ; try { jj_consume_token ( 45 ) ; } finally { if ( jjtc003 ) { jjtree . closeNodeScope ( jjtn003 , 2 ) ; } } break ; default : jj_la1 [ 40 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } }


signature:
public class OgnlParser { /** * Apply an expression to all elements of a collection , creating a new collection
 * as the result . */
final public void projection ( ) throws ParseException { } }

implementation:
/* @ bgen ( jjtree ) Project */
ASTProject jjtn000 = new ASTProject ( JJTPROJECT ) ; boolean jjtc000 = true ; jjtree . openNodeScope ( jjtn000 ) ; try { jj_consume_token ( 54 ) ; expression ( ) ; jj_consume_token ( 55 ) ; } catch ( Throwable jjte000 ) { if ( jjtc000 ) { jjtree . clearNodeScope ( jjtn000 ) ; jjtc000 = false ; } else { jjtree . popNode ( ) ; } if ( jjte000 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte000 ; } } if ( jjte000 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte000 ; } } { if ( true ) throw ( Error ) jjte000 ; } } finally { if ( jjtc000 ) { jjtree . closeNodeScope ( jjtn000 , true ) ; } }


signature:
public class OgnlParser { /** * Apply a boolean expression to all elements of a collection , creating a new collection
 * containing those elements for which the expression returned true . */
final public void selectAll ( ) throws ParseException { } }

implementation:
/* @ bgen ( jjtree ) Select */
ASTSelect jjtn000 = new ASTSelect ( JJTSELECT ) ; boolean jjtc000 = true ; jjtree . openNodeScope ( jjtn000 ) ; try { jj_consume_token ( 54 ) ; jj_consume_token ( 3 ) ; expression ( ) ; jj_consume_token ( 55 ) ; } catch ( Throwable jjte000 ) { if ( jjtc000 ) { jjtree . clearNodeScope ( jjtn000 ) ; jjtc000 = false ; } else { jjtree . popNode ( ) ; } if ( jjte000 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte000 ; } } if ( jjte000 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte000 ; } } { if ( true ) throw ( Error ) jjte000 ; } } finally { if ( jjtc000 ) { jjtree . closeNodeScope ( jjtn000 , true ) ; } }


signature:
public class OgnlParser { /** * Apply a boolean expression to all elements of a collection , creating a new collection
 * containing those elements for the first element for which the expression returned true . */
final public void selectFirst ( ) throws ParseException { } }

implementation:
/* @ bgen ( jjtree ) SelectFirst */
ASTSelectFirst jjtn000 = new ASTSelectFirst ( JJTSELECTFIRST ) ; boolean jjtc000 = true ; jjtree . openNodeScope ( jjtn000 ) ; try { jj_consume_token ( 54 ) ; jj_consume_token ( 11 ) ; expression ( ) ; jj_consume_token ( 55 ) ; } catch ( Throwable jjte000 ) { if ( jjtc000 ) { jjtree . clearNodeScope ( jjtn000 ) ; jjtc000 = false ; } else { jjtree . popNode ( ) ; } if ( jjte000 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte000 ; } } if ( jjte000 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte000 ; } } { if ( true ) throw ( Error ) jjte000 ; } } finally { if ( jjtc000 ) { jjtree . closeNodeScope ( jjtn000 , true ) ; } }


signature:
public class OgnlParser { /** * Apply a boolean expression to all elements of a collection , creating a new collection
 * containing those elements for the first element for which the expression returned true . */
final public void selectLast ( ) throws ParseException { } }

implementation:
/* @ bgen ( jjtree ) SelectLast */
ASTSelectLast jjtn000 = new ASTSelectLast ( JJTSELECTLAST ) ; boolean jjtc000 = true ; jjtree . openNodeScope ( jjtn000 ) ; try { jj_consume_token ( 54 ) ; jj_consume_token ( 58 ) ; expression ( ) ; jj_consume_token ( 55 ) ; } catch ( Throwable jjte000 ) { if ( jjtc000 ) { jjtree . clearNodeScope ( jjtn000 ) ; jjtc000 = false ; } else { jjtree . popNode ( ) ; } if ( jjte000 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte000 ; } } if ( jjte000 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte000 ; } } { if ( true ) throw ( Error ) jjte000 ; } } finally { if ( jjtc000 ) { jjtree . closeNodeScope ( jjtn000 , true ) ; } }


signature:
public class OgnlOps { /** * Compares two objects for equality , even if it has to convert one of them to the other type .
 * If both objects are numeric they are converted to the widest type and compared . If one is
 * non - numeric and one is numeric the non - numeric is converted to double and compared to the
 * double numeric value . If both are non - numeric and Comparable and the types are compatible
 * ( i . e . v1 is of the same or superclass of v2 ' s type ) they are compared with
 * Comparable . compareTo ( ) . If both values are non - numeric and not Comparable or of incompatible
 * classes this will throw and IllegalArgumentException .
 * @ param v1
 * First value to compare
 * @ param v2
 * second value to compare
 * @ return integer describing the comparison between the two objects . A negative number
 * indicates that v1 < v2 . Positive indicates that v1 > v2 . Zero indicates v1 = = v2.
 * @ throws IllegalArgumentException
 * if the objects are both non - numeric yet of incompatible types or do not implement
 * Comparable . */
public static int compareWithConversion ( Object v1 , Object v2 ) { } }

implementation:
int result ; if ( v1 == v2 ) { result = 0 ; } else { int t1 = getNumericType ( v1 ) , t2 = getNumericType ( v2 ) , type = getNumericType ( t1 , t2 , true ) ; switch ( type ) { case BIGINT : result = bigIntValue ( v1 ) . compareTo ( bigIntValue ( v2 ) ) ; break ; case BIGDEC : result = bigDecValue ( v1 ) . compareTo ( bigDecValue ( v2 ) ) ; break ; case NONNUMERIC : if ( ( t1 == NONNUMERIC ) && ( t2 == NONNUMERIC ) ) { if ( ( v1 instanceof Comparable ) && v1 . getClass ( ) . isAssignableFrom ( v2 . getClass ( ) ) ) { result = ( ( Comparable ) v1 ) . compareTo ( v2 ) ; break ; } else { throw new IllegalArgumentException ( "invalid comparison: " + v1 . getClass ( ) . getName ( ) + " and " + v2 . getClass ( ) . getName ( ) ) ; } } // else fall through
case FLOAT : case DOUBLE : double dv1 = doubleValue ( v1 ) , dv2 = doubleValue ( v2 ) ; return ( dv1 == dv2 ) ? 0 : ( ( dv1 < dv2 ) ? - 1 : 1 ) ; default : long lv1 = longValue ( v1 ) , lv2 = longValue ( v2 ) ; return ( lv1 == lv2 ) ? 0 : ( ( lv1 < lv2 ) ? - 1 : 1 ) ; } } return result ;


signature:
public class OgnlOps { /** * Returns true if object1 is equal to object2 in either the sense that they are the same object
 * or , if both are non - null if they are equal in the < CODE > equals ( ) < / CODE > sense .
 * @ param object1
 * First object to compare
 * @ param object2
 * Second object to compare
 * @ return true if v1 = = v2 */
public static boolean isEqual ( Object object1 , Object object2 ) { } }

implementation:
boolean result = false ; if ( object1 == object2 ) { result = true ; } else { if ( ( object1 != null ) && object1 . getClass ( ) . isArray ( ) ) { if ( ( object2 != null ) && object2 . getClass ( ) . isArray ( ) && ( object2 . getClass ( ) == object1 . getClass ( ) ) ) { result = ( Array . getLength ( object1 ) == Array . getLength ( object2 ) ) ; if ( result ) { for ( int i = 0 , icount = Array . getLength ( object1 ) ; result && ( i < icount ) ; i ++ ) { result = isEqual ( Array . get ( object1 , i ) , Array . get ( object2 , i ) ) ; } } } } else { // Check for converted equivalence first , then equals ( ) equivalence
result = ( object1 != null ) && ( object2 != null ) && ( object1 . equals ( object2 ) || ( compareWithConversion ( object1 , object2 ) == 0 ) ) ; } } return result ;


signature:
public class OgnlOps { /** * Evaluates the given object as a boolean : if it is a Boolean object , it ' s easy ; if it ' s a
 * Number or a Character , returns true for non - zero objects ; and otherwise returns true for
 * non - null objects .
 * @ param value
 * an object to interpret as a boolean
 * @ return the boolean value implied by the given object */
public static boolean booleanValue ( Object value ) { } }

implementation: if ( value == null ) return false ; Class c = value . getClass ( ) ; if ( c == Boolean . class ) return ( ( Boolean ) value ) . booleanValue ( ) ; if ( c == String . class ) return Boolean . parseBoolean ( String . valueOf ( value ) ) ; if ( c == Character . class ) return ( ( Character ) value ) . charValue ( ) != 0 ; if ( value instanceof Number ) return ( ( Number ) value ) . doubleValue ( ) != 0 ; return true ; // non - null


signature:
public class OgnlOps { /** * Evaluates the given object as a long integer .
 * @ param value
 * an object to interpret as a long integer
 * @ return the long integer value implied by the given object
 * @ throws NumberFormatException
 * if the given object can ' t be understood as a long integer */
public static long longValue ( Object value ) throws NumberFormatException { } }

implementation: if ( value == null ) return 0L ; Class c = value . getClass ( ) ; if ( c . getSuperclass ( ) == Number . class ) return ( ( Number ) value ) . longValue ( ) ; if ( c == Boolean . class ) return ( ( Boolean ) value ) . booleanValue ( ) ? 1 : 0 ; if ( c == Character . class ) return ( ( Character ) value ) . charValue ( ) ; return Long . parseLong ( stringValue ( value , true ) ) ;


signature:
public class OgnlOps { /** * Evaluates the given object as a double - precision floating - point number .
 * @ param value
 * an object to interpret as a double
 * @ return the double value implied by the given object
 * @ throws NumberFormatException
 * if the given object can ' t be understood as a double */
public static double doubleValue ( Object value ) throws NumberFormatException { } }

implementation: if ( value == null ) return 0.0 ; Class c = value . getClass ( ) ; if ( c . getSuperclass ( ) == Number . class ) return ( ( Number ) value ) . doubleValue ( ) ; if ( c == Boolean . class ) return ( ( Boolean ) value ) . booleanValue ( ) ? 1 : 0 ; if ( c == Character . class ) return ( ( Character ) value ) . charValue ( ) ; String s = stringValue ( value , true ) ; return ( s . length ( ) == 0 ) ? 0.0 : Double . parseDouble ( s ) ;


signature:
public class OgnlOps { /** * Evaluates the given object as a BigInteger .
 * @ param value
 * an object to interpret as a BigInteger
 * @ return the BigInteger value implied by the given object
 * @ throws NumberFormatException
 * if the given object can ' t be understood as a BigInteger */
public static BigInteger bigIntValue ( Object value ) throws NumberFormatException { } }

implementation: if ( value == null ) return BigInteger . valueOf ( 0L ) ; Class c = value . getClass ( ) ; if ( c == BigInteger . class ) return ( BigInteger ) value ; if ( c == BigDecimal . class ) return ( ( BigDecimal ) value ) . toBigInteger ( ) ; if ( c . getSuperclass ( ) == Number . class ) return BigInteger . valueOf ( ( ( Number ) value ) . longValue ( ) ) ; if ( c == Boolean . class ) return BigInteger . valueOf ( ( ( Boolean ) value ) . booleanValue ( ) ? 1 : 0 ) ; if ( c == Character . class ) return BigInteger . valueOf ( ( ( Character ) value ) . charValue ( ) ) ; return new BigInteger ( stringValue ( value , true ) ) ;


signature:
public class OgnlOps { /** * Evaluates the given object as a BigDecimal .
 * @ param value
 * an object to interpret as a BigDecimal
 * @ return the BigDecimal value implied by the given object
 * @ throws NumberFormatException
 * if the given object can ' t be understood as a BigDecimal */
public static BigDecimal bigDecValue ( Object value ) throws NumberFormatException { } }

implementation: if ( value == null ) return BigDecimal . valueOf ( 0L ) ; Class c = value . getClass ( ) ; if ( c == BigDecimal . class ) return ( BigDecimal ) value ; if ( c == BigInteger . class ) return new BigDecimal ( ( BigInteger ) value ) ; if ( c == Boolean . class ) return BigDecimal . valueOf ( ( ( Boolean ) value ) . booleanValue ( ) ? 1 : 0 ) ; if ( c == Character . class ) return BigDecimal . valueOf ( ( ( Character ) value ) . charValue ( ) ) ; return new BigDecimal ( stringValue ( value , true ) ) ;


signature:
public class OgnlOps { /** * Evaluates the given object as a String and trims it if the trim flag is true .
 * @ param value
 * an object to interpret as a String
 * @ return the String value implied by the given object as returned by the toString ( ) method , or
 * " null " if the object is null . */
public static String stringValue ( Object value , boolean trim ) { } }

implementation: String result ; if ( value == null ) { result = OgnlRuntime . NULL_STRING ; } else { result = value . toString ( ) ; if ( trim ) { result = result . trim ( ) ; } } return result ;


signature:
public class OgnlOps { /** * Returns a constant from the NumericTypes interface that represents the numeric type of the
 * given object .
 * @ param value
 * an object that needs to be interpreted as a number
 * @ return the appropriate constant from the NumericTypes interface */
public static int getNumericType ( Object value ) { } }

implementation: if ( value != null ) { Class c = value . getClass ( ) ; if ( c == Integer . class ) return INT ; if ( c == Double . class ) return DOUBLE ; if ( c == Boolean . class ) return BOOL ; if ( c == Byte . class ) return BYTE ; if ( c == Character . class ) return CHAR ; if ( c == Short . class ) return SHORT ; if ( c == Long . class ) return LONG ; if ( c == Float . class ) return FLOAT ; if ( c == BigInteger . class ) return BIGINT ; if ( c == BigDecimal . class ) return BIGDEC ; } return NONNUMERIC ;


signature: public class OgnlOps { public static Object convertValue ( char value , Class toType , boolean preventNull ) { } }

implementation: return convertValue ( new Character ( value ) , toType , preventNull ) ;


signature: public class OgnlOps { public static Object toArray ( char value , Class toType , boolean preventNull ) { } }

implementation: return toArray ( new Character ( value ) , toType , preventNull ) ;


signature:
public class OgnlOps { /** * Returns the value converted numerically to the given class type This method also detects when
 * arrays are being converted and converts the components of one array to the type of the other .
 * @ param value
 * an object to be converted to the given type
 * @ param toType
 * class type to be converted to
 * @ return converted value of the type given , or value if the value cannot be converted to the
 * given type . */
public static Object convertValue ( Object value , Class toType ) { } }

implementation: return convertValue ( value , toType , false ) ;


signature:
public class OgnlOps { /** * Converts the specified value to a primitive integer value .
 * < ul >
 * < li > Null values will cause a - 1 to be returned . < / li >
 * < li > { @ link Number } instances have their intValue ( ) methods invoked . < / li >
 * < li > All other types result in calling Integer . parseInt ( value . toString ( ) ) ; < / li >
 * < / ul >
 * @ param value
 * The object to get the value of .
 * @ return A valid integer . */
public static int getIntValue ( Object value ) { } }

implementation: try { if ( value == null ) return - 1 ; if ( Number . class . isInstance ( value ) ) { return ( ( Number ) value ) . intValue ( ) ; } String str = String . class . isInstance ( value ) ? ( String ) value : value . toString ( ) ; return Integer . parseInt ( str ) ; } catch ( Throwable t ) { throw new RuntimeException ( "Error converting " + value + " to integer:" , t ) ; }


signature:
public class OgnlOps { /** * Returns the constant from the NumericTypes interface that best expresses the type of an
 * operation , which can be either numeric or not , on the two given types .
 * @ param t1
 * type of one argument to an operator
 * @ param t2
 * type of the other argument
 * @ param canBeNonNumeric
 * whether the operator can be interpreted as non - numeric
 * @ return the appropriate constant from the NumericTypes interface */
public static int getNumericType ( int t1 , int t2 , boolean canBeNonNumeric ) { } }

implementation:
if ( t1 == t2 ) return t1 ; if ( canBeNonNumeric && ( t1 == NONNUMERIC || t2 == NONNUMERIC || t1 == CHAR || t2 == CHAR ) ) return NONNUMERIC ; if ( t1 == NONNUMERIC ) t1 = DOUBLE ; // Try to interpret strings as doubles . . .
if ( t2 == NONNUMERIC ) t2 = DOUBLE ; // Try to interpret strings as doubles . . .
if ( t1 >= MIN_REAL_TYPE ) { if ( t2 >= MIN_REAL_TYPE ) return Math . max ( t1 , t2 ) ; if ( t2 < INT ) return t1 ; if ( t2 == BIGINT ) return BIGDEC ; return Math . max ( DOUBLE , t1 ) ; } else if ( t2 >= MIN_REAL_TYPE ) { if ( t1 < INT ) return t2 ; if ( t1 == BIGINT ) return BIGDEC ; return Math . max ( DOUBLE , t2 ) ; } else return Math . max ( t1 , t2 ) ;


signature:
public class OgnlOps { /** * Returns the constant from the NumericTypes interface that best expresses the type of an
 * operation , which can be either numeric or not , on the two given objects .
 * @ param v1
 * one argument to an operator
 * @ param v2
 * the other argument
 * @ param canBeNonNumeric
 * whether the operator can be interpreted as non - numeric
 * @ return the appropriate constant from the NumericTypes interface */
public static int getNumericType ( Object v1 , Object v2 , boolean canBeNonNumeric ) { } }

implementation: return getNumericType ( getNumericType ( v1 ) , getNumericType ( v2 ) , canBeNonNumeric ) ;


signature:
public class OgnlOps { /** * Returns a new Number object of an appropriate type to hold the given integer value . The type
 * of the returned object is consistent with the given type argument , which is a constant from
 * the NumericTypes interface .
 * @ param type
 * the nominal numeric type of the result , a constant from the NumericTypes interface
 * @ param value
 * the integer value to convert to a Number object
 * @ return a Number object with the given value , of type implied by the type argument */
public static Number newInteger ( int type , long value ) { } }

implementation:
switch ( type ) { case BOOL : case CHAR : case INT : return new Integer ( ( int ) value ) ; case FLOAT : if ( ( long ) ( float ) value == value ) { return new Float ( ( float ) value ) ; } // else fall through :
case DOUBLE : if ( ( long ) ( double ) value == value ) { return new Double ( ( double ) value ) ; } // else fall through :
case LONG : return new Long ( value ) ; case BYTE : return new Byte ( ( byte ) value ) ; case SHORT : return new Short ( ( short ) value ) ; default : return BigInteger . valueOf ( value ) ; }


signature:
public class OgnlOps { /** * Returns a new Number object of an appropriate type to hold the given real value . The type of
 * the returned object is always either Float or Double , and is only Float if the given type tag
 * ( a constant from the NumericTypes interface ) is FLOAT .
 * @ param type
 * the nominal numeric type of the result , a constant from the NumericTypes interface
 * @ param value
 * the real value to convert to a Number object
 * @ return a Number object with the given value , of type implied by the type argument */
public static Number newReal ( int type , double value ) { } }

implementation: if ( type == FLOAT ) return new Float ( ( float ) value ) ; return new Double ( value ) ;


signature:
public class OgnlOps { /** * Utility method that converts incoming exceptions to { @ link RuntimeException }
 * instances - or casts them if they already are .
 * @ param t
 * The exception to cast .
 * @ return The exception cast to a { @ link RuntimeException } . */
public static RuntimeException castToRuntime ( Throwable t ) { } }

implementation: if ( RuntimeException . class . isInstance ( t ) ) return ( RuntimeException ) t ; if ( OgnlException . class . isInstance ( t ) ) throw new UnsupportedCompilationException ( "Error evluating expression: " + t . getMessage ( ) , t ) ; return new RuntimeException ( t ) ;


signature:
public class EnhancedClassLoader { /** * Overridden methods */
public Class defineClass ( String enhancedClassName , byte [ ] byteCode ) { } }

implementation: return defineClass ( enhancedClassName , byteCode , 0 , byteCode . length ) ;


signature:
public class OgnlContext { /** * Gets the current class type being evaluated on the stack , as set by { @ link # setCurrentType ( Class ) } .
 * @ return The current object type , may be null . */
public Class getCurrentType ( ) { } }

implementation: if ( _typeStack . isEmpty ( ) ) return null ; return ( Class ) _typeStack . get ( _typeStack . size ( ) - 1 ) ;


signature:
public class OgnlContext { /** * Represents the last known object type on the evaluation stack , will be the value of
 * the last known { @ link # getCurrentType ( ) } .
 * @ return The previous type of object on the stack , may be null . */
public Class getPreviousType ( ) { } }

implementation: if ( _typeStack . isEmpty ( ) ) return null ; if ( _typeStack . size ( ) > 1 ) return _typeStack . get ( _typeStack . size ( ) - 2 ) ; else return null ;


signature:
public class OgnlContext { /** * Returns the Evaluation at the relative index given . This should be zero or a negative number
 * as a relative reference back up the evaluation stack . Therefore getEvaluation ( 0 ) returns the
 * current Evaluation . */
public Evaluation getEvaluation ( int relativeIndex ) { } }

implementation: Evaluation result = null ; if ( relativeIndex <= 0 ) { result = _currentEvaluation ; while ( ( ++ relativeIndex < 0 ) && ( result != null ) ) { result = result . getParent ( ) ; } } return result ;


signature:
public class OgnlContext { /** * Pushes a new Evaluation onto the stack . This is done before a node evaluates . When evaluation
 * is complete it should be popped from the stack via < code > popEvaluation ( ) < / code > . */
public void pushEvaluation ( Evaluation value ) { } }

implementation: if ( _currentEvaluation != null ) { _currentEvaluation . addChild ( value ) ; } else { setRootEvaluation ( value ) ; } setCurrentEvaluation ( value ) ;


signature:
public class OgnlContext { /** * Pops the current Evaluation off of the top of the stack . This is done after a node has
 * completed its evaluation . */
public Evaluation popEvaluation ( ) { } }

implementation: Evaluation result ; result = _currentEvaluation ; setCurrentEvaluation ( result . getParent ( ) ) ; if ( _currentEvaluation == null ) { setLastEvaluation ( getKeepLastEvaluation ( ) ? result : null ) ; setRootEvaluation ( null ) ; setCurrentNode ( null ) ; } return result ;


signature:
public class ExpressionCompiler { /** * Used by { @ link # castExpression ( ognl . OgnlContext , ognl . Node , String ) } to store the cast java
 * source string in to the current { @ link OgnlContext } . This will either add to the existing
 * string present if it already exists or create a new instance and store it using the static key
 * of { @ link # PRE _ CAST } .
 * @ param context
 * The current execution context .
 * @ param cast
 * The java source string to store in to the context . */
public static void addCastString ( OgnlContext context , String cast ) { } }

implementation: String value = ( String ) context . get ( PRE_CAST ) ; if ( value != null ) value = cast + value ; else value = cast ; context . put ( PRE_CAST , value ) ;


signature:
public class ExpressionCompiler { /** * Returns the appropriate casting expression ( minus parens ) for the specified class type .
 * For instance , if given an { @ link Integer } object the string < code > " java . lang . Integer " < / code >
 * would be returned . For an array of primitive ints < code > " int [ ] " < / code > and so on . .
 * @ param type The class to cast a string expression for .
 * @ return The converted raw string version of the class name . */
public static String getCastString ( Class type ) { } }

implementation: if ( type == null ) return null ; return type . isArray ( ) ? type . getComponentType ( ) . getName ( ) + "[]" : type . getName ( ) ;


signature:
public class ExpressionCompiler { /** * Convenience method called by many different property / method resolving AST types to get a root expression
 * resolving string for the given node . The callers are mostly ignorant and rely on this method to properly
 * determine if the expression should be cast at all and take the appropriate actions if it should .
 * @ param expression
 * The node to check and generate a root expression to if necessary .
 * @ param root
 * The root object for this execution .
 * @ param context
 * The current execution context .
 * @ return Either an empty string or a root path java source string compatible with javassist compilations
 * from the root object up to the specified { @ link Node } . */
public static String getRootExpression ( Node expression , Object root , OgnlContext context ) { } }

implementation: String rootExpr = "" ; if ( ! shouldCast ( expression ) ) return rootExpr ; if ( ( ! ASTList . class . isInstance ( expression ) && ! ASTVarRef . class . isInstance ( expression ) && ! ASTStaticMethod . class . isInstance ( expression ) && ! ASTStaticField . class . isInstance ( expression ) && ! ASTConst . class . isInstance ( expression ) && ! ExpressionNode . class . isInstance ( expression ) && ! ASTCtor . class . isInstance ( expression ) && ! ASTStaticMethod . class . isInstance ( expression ) && root != null ) || ( root != null && ASTRootVarRef . class . isInstance ( expression ) ) ) { Class castClass = OgnlRuntime . getCompiler ( ) . getRootExpressionClass ( expression , context ) ; if ( castClass . isArray ( ) || ASTRootVarRef . class . isInstance ( expression ) || ASTThisVarRef . class . isInstance ( expression ) ) { rootExpr = "((" + getCastString ( castClass ) + ")$2)" ; if ( ASTProperty . class . isInstance ( expression ) && ! ( ( ASTProperty ) expression ) . isIndexedAccess ( ) ) rootExpr += "." ; } else if ( ( ASTProperty . class . isInstance ( expression ) && ( ( ASTProperty ) expression ) . isIndexedAccess ( ) ) || ASTChain . class . isInstance ( expression ) ) { rootExpr = "((" + getCastString ( castClass ) + ")$2)" ; } else { rootExpr = "((" + getCastString ( castClass ) + ")$2)." ; } } return rootExpr ;


signature:
public class ExpressionCompiler { /** * Used by { @ link # getRootExpression ( ognl . Node , Object , ognl . OgnlContext ) } to determine if the expression
 * needs to be cast at all .
 * @ param expression
 * The node to check against .
 * @ return Yes if the node type should be cast - false otherwise . */
public static boolean shouldCast ( Node expression ) { } }

implementation: if ( ASTChain . class . isInstance ( expression ) ) { Node child = expression . jjtGetChild ( 0 ) ; if ( ASTConst . class . isInstance ( child ) || ASTStaticMethod . class . isInstance ( child ) || ASTStaticField . class . isInstance ( child ) || ( ASTVarRef . class . isInstance ( child ) && ! ASTRootVarRef . class . isInstance ( child ) ) ) return false ; } return ! ASTConst . class . isInstance ( expression ) ;


signature:
public class ExpressionCompiler { /** * Helper utility method used by compiler to help resolve class - > method mappings
 * during method calls to { @ link OgnlExpressionCompiler # getSuperOrInterfaceClass ( java . lang . reflect . Method , Class ) } .
 * @ param m
 * The method to check for existance of .
 * @ param clazz
 * The class to check for the existance of a matching method definition to the method passed in .
 * @ return True if the class contains the specified method , false otherwise . */
public boolean containsMethod ( Method m , Class clazz ) { } }

implementation: Method [ ] methods = clazz . getMethods ( ) ; if ( methods == null ) return false ; for ( int i = 0 ; i < methods . length ; i ++ ) { if ( methods [ i ] . getName ( ) . equals ( m . getName ( ) ) && methods [ i ] . getReturnType ( ) == m . getReturnType ( ) ) { Class [ ] parms = m . getParameterTypes ( ) ; if ( parms == null ) continue ; Class [ ] mparms = methods [ i ] . getParameterTypes ( ) ; if ( mparms == null || mparms . length != parms . length ) continue ; boolean parmsMatch = true ; for ( int p = 0 ; p < parms . length ; p ++ ) { if ( parms [ p ] != mparms [ p ] ) { parmsMatch = false ; break ; } } if ( ! parmsMatch ) continue ; Class [ ] exceptions = m . getExceptionTypes ( ) ; if ( exceptions == null ) continue ; Class [ ] mexceptions = methods [ i ] . getExceptionTypes ( ) ; if ( mexceptions == null || mexceptions . length != exceptions . length ) continue ; boolean exceptionsMatch = true ; for ( int e = 0 ; e < exceptions . length ; e ++ ) { if ( exceptions [ e ] != mexceptions [ e ] ) { exceptionsMatch = false ; break ; } } if ( ! exceptionsMatch ) continue ; return true ; } } return false ;


signature:
public class ExpressionCompiler { /** * / * ( non - Javadoc )
 * @ see ognl . enhance . OgnlExpressionCompiler # compileExpression ( ognl . OgnlContext , ognl . Node , java . lang . Object ) */
public void compileExpression ( OgnlContext context , Node expression , Object root ) throws Exception { } }

implementation:
// System . out . println ( " Compiling expr class " + expression . getClass ( ) . getName ( ) + " and root " + root ) ;
if ( expression . getAccessor ( ) != null ) return ; String getBody , setBody ; EnhancedClassLoader loader = getClassLoader ( context ) ; ClassPool pool = getClassPool ( context , loader ) ; CtClass newClass = pool . makeClass ( expression . getClass ( ) . getName ( ) + expression . hashCode ( ) + _classCounter ++ + "Accessor" ) ; newClass . addInterface ( getCtClass ( ExpressionAccessor . class ) ) ; CtClass ognlClass = getCtClass ( OgnlContext . class ) ; CtClass objClass = getCtClass ( Object . class ) ; CtMethod valueGetter = new CtMethod ( objClass , "get" , new CtClass [ ] { ognlClass , objClass } , newClass ) ; CtMethod valueSetter = new CtMethod ( CtClass . voidType , "set" , new CtClass [ ] { ognlClass , objClass , objClass } , newClass ) ; CtField nodeMember = null ; // will only be set if uncompilable exception is thrown
CtClass nodeClass = getCtClass ( Node . class ) ; CtMethod setExpression = null ; try { getBody = generateGetter ( context , newClass , objClass , pool , valueGetter , expression , root ) ; } catch ( UnsupportedCompilationException uc ) { // uc . printStackTrace ( ) ;
nodeMember = new CtField ( nodeClass , "_node" , newClass ) ; newClass . addField ( nodeMember ) ; getBody = generateOgnlGetter ( newClass , valueGetter , nodeMember ) ; if ( setExpression == null ) { setExpression = CtNewMethod . setter ( "setExpression" , nodeMember ) ; newClass . addMethod ( setExpression ) ; } } try { setBody = generateSetter ( context , newClass , objClass , pool , valueSetter , expression , root ) ; } catch ( UnsupportedCompilationException uc ) { // uc . printStackTrace ( ) ;
if ( nodeMember == null ) { nodeMember = new CtField ( nodeClass , "_node" , newClass ) ; newClass . addField ( nodeMember ) ; } setBody = generateOgnlSetter ( newClass , valueSetter , nodeMember ) ; if ( setExpression == null ) { setExpression = CtNewMethod . setter ( "setExpression" , nodeMember ) ; newClass . addMethod ( setExpression ) ; } } try { newClass . addConstructor ( CtNewConstructor . defaultConstructor ( newClass ) ) ; Class clazz = pool . toClass ( newClass ) ; newClass . detach ( ) ; expression . setAccessor ( ( ExpressionAccessor ) clazz . newInstance ( ) ) ; // need to set expression on node if the field was just defined .
if ( nodeMember != null ) { expression . getAccessor ( ) . setExpression ( expression ) ; } } catch ( Throwable t ) { // t . printStackTrace ( ) ;
throw new RuntimeException ( "Error compiling expression on object " + root + " with expression node " + expression + " getter body: " + getBody + " setter body: " + setBody , t ) ; }


signature:
public class ExpressionCompiler { /** * Fail safe getter creation when normal compilation fails .
 * @ param clazz
 * The javassist class the new method should be attached to .
 * @ param valueGetter
 * The method definition the generated code will be contained within .
 * @ param node
 * The root expression node .
 * @ return The generated source string for this method , the method will still be
 * added via the javassist API either way so this is really a convenience
 * for exception reporting / debugging .
 * @ throws Exception
 * If a javassist error occurs . */
protected String generateOgnlGetter ( CtClass clazz , CtMethod valueGetter , CtField node ) throws Exception { } }

implementation: String body = "return " + node . getName ( ) + ".getValue($1, $2);" ; valueGetter . setBody ( body ) ; clazz . addMethod ( valueGetter ) ; return body ;


signature:
public class ExpressionCompiler { /** * Fail safe setter creation when normal compilation fails .
 * @ param clazz
 * The javassist class the new method should be attached to .
 * @ param valueSetter
 * The method definition the generated code will be contained within .
 * @ param node
 * The root expression node .
 * @ return The generated source string for this method , the method will still be
 * added via the javassist API either way so this is really a convenience
 * for exception reporting / debugging .
 * @ throws Exception
 * If a javassist error occurs . */
protected String generateOgnlSetter ( CtClass clazz , CtMethod valueSetter , CtField node ) throws Exception { } }

implementation: String body = node . getName ( ) + ".setValue($1, $2, $3);" ; valueSetter . setBody ( body ) ; clazz . addMethod ( valueSetter ) ; return body ;


signature:
public class ExpressionCompiler { /** * Creates a { @ link ClassLoader } instance compatible with the javassist classloader and normal
 * OGNL class resolving semantics .
 * @ param context
 * The current execution context .
 * @ return The created { @ link ClassLoader } instance . */
protected EnhancedClassLoader getClassLoader ( OgnlContext context ) { } }

implementation: EnhancedClassLoader ret = ( EnhancedClassLoader ) _loaders . get ( context . getClassResolver ( ) ) ; if ( ret != null ) return ret ; ClassLoader classLoader = new ContextClassLoader ( OgnlContext . class . getClassLoader ( ) , context ) ; ret = new EnhancedClassLoader ( classLoader ) ; _loaders . put ( context . getClassResolver ( ) , ret ) ; return ret ;


signature:
public class ExpressionCompiler { /** * Gets either a new or existing { @ link ClassPool } for use in compiling javassist
 * classes . A new class path object is inserted in to the returned { @ link ClassPool } using
 * the passed in < code > loader < / code > instance if a new pool needs to be created .
 * @ param context
 * The current execution context .
 * @ param loader
 * The { @ link ClassLoader } instance to use - as returned by { @ link # getClassLoader ( ognl . OgnlContext ) } .
 * @ return The existing or new { @ link ClassPool } instance . */
protected ClassPool getClassPool ( OgnlContext context , EnhancedClassLoader loader ) { } }

implementation: if ( _pool != null ) return _pool ; _pool = ClassPool . getDefault ( ) ; _pool . insertClassPath ( new LoaderClassPath ( loader . getParent ( ) ) ) ; return _pool ;


signature:
public class JJTOgnlParserState { /** * / * Returns the node on the top of the stack , and remove it from the
 * stack . */
public Node popNode ( ) { } }

implementation: if ( -- sp < mk ) { mk = ( ( Integer ) marks . remove ( marks . size ( ) - 1 ) ) . intValue ( ) ; } return ( Node ) nodes . remove ( nodes . size ( ) - 1 ) ;


signature:
public class SimpleNode { /** * Override this method if you want to customize how the node dumps out its children . */
public void dump ( PrintWriter writer , String prefix ) { } }

implementation: writer . println ( toString ( prefix ) ) ; if ( _children != null ) { for ( int i = 0 ; i < _children . length ; ++ i ) { SimpleNode n = ( SimpleNode ) _children [ i ] ; if ( n != null ) { n . dump ( writer , prefix + "  " ) ; } } }


signature:
public class SimpleNode { /** * This method may be called from subclasses ' jjtClose methods . It flattens the tree under this node by eliminating any children that are of the same class as this
 * node and copying their children to this node . */
protected void flattenTree ( ) { } }

implementation: boolean shouldFlatten = false ; int newSize = 0 ; for ( int i = 0 ; i < _children . length ; ++ i ) if ( _children [ i ] . getClass ( ) == getClass ( ) ) { shouldFlatten = true ; newSize += _children [ i ] . jjtGetNumChildren ( ) ; } else ++ newSize ; if ( shouldFlatten ) { Node [ ] newChildren = new Node [ newSize ] ; int j = 0 ; for ( int i = 0 ; i < _children . length ; ++ i ) { Node c = _children [ i ] ; if ( c . getClass ( ) == getClass ( ) ) { for ( int k = 0 ; k < c . jjtGetNumChildren ( ) ; ++ k ) newChildren [ j ++ ] = c . jjtGetChild ( k ) ; } else newChildren [ j ++ ] = c ; } if ( j != newSize ) throw new Error ( "Assertion error: " + j + " != " + newSize ) ; _children = newChildren ; }


signature:
public class ObjectPropertyAccessor { /** * Returns OgnlRuntime . NotFound if the property does not exist . */
public Object getPossibleProperty ( Map context , Object target , String name ) throws OgnlException { } }

implementation: Object result ; OgnlContext ognlContext = ( OgnlContext ) context ; try { if ( ( result = OgnlRuntime . getMethodValue ( ognlContext , target , name , true ) ) == OgnlRuntime . NotFound ) { result = OgnlRuntime . getFieldValue ( ognlContext , target , name , true ) ; } } catch ( IntrospectionException ex ) { throw new OgnlException ( name , ex ) ; } catch ( OgnlException ex ) { throw ex ; } catch ( Exception ex ) { throw new OgnlException ( name , ex ) ; } return result ;


signature:
public class ObjectPropertyAccessor { /** * Returns OgnlRuntime . NotFound if the property does not exist . */
public Object setPossibleProperty ( Map context , Object target , String name , Object value ) throws OgnlException { } }

implementation: Object result = null ; OgnlContext ognlContext = ( OgnlContext ) context ; try { if ( ! OgnlRuntime . setMethodValue ( ognlContext , target , name , value , true ) ) { result = OgnlRuntime . setFieldValue ( ognlContext , target , name , value ) ? null : OgnlRuntime . NotFound ; } if ( result == OgnlRuntime . NotFound ) { Method m = OgnlRuntime . getWriteMethod ( target . getClass ( ) , name ) ; if ( m != null ) { result = m . invoke ( target , new Object [ ] { value } ) ; } } } catch ( IntrospectionException ex ) { throw new OgnlException ( name , ex ) ; } catch ( OgnlException ex ) { throw ex ; } catch ( Exception ex ) { throw new OgnlException ( name , ex ) ; } return result ;


signature:
public class Evaluation { /** * Adds a child to the list of children of this evaluation . The
 * parent of the child is set to the receiver and the children
 * references are modified in the receiver to reflect the new child .
 * The lastChild of the receiver is set to the child , and the
 * firstChild is set also if child is the first ( or only ) child . */
public void addChild ( Evaluation child ) { } }

implementation: if ( firstChild == null ) { firstChild = lastChild = child ; } else { if ( firstChild == lastChild ) { firstChild . next = child ; lastChild = child ; lastChild . previous = firstChild ; } else { child . previous = lastChild ; lastChild . next = child ; lastChild = child ; } } child . parent = this ;


signature:
public class Evaluation { /** * Reinitializes this Evaluation to the parameters specified . */
public void init ( SimpleNode node , Object source , boolean setOperation ) { } }

implementation: this . node = node ; this . source = source ; this . setOperation = setOperation ; result = null ; exception = null ; parent = null ; next = null ; previous = null ; firstChild = null ; lastChild = null ;


signature:
public class ContextClassLoader { /** * Overridden methods */
protected Class findClass ( String name ) throws ClassNotFoundException { } }

implementation: if ( ( context != null ) && ( context . getClassResolver ( ) != null ) ) { return context . getClassResolver ( ) . classForName ( name , context ) ; } return super . findClass ( name ) ;


signature:
public class IntHashMap { /** * Protected methods */
protected void rehash ( ) { } }

implementation: int oldCapacity = table . length ; Entry oldTable [ ] = table ; int newCapacity = oldCapacity * 2 + 1 ; Entry newTable [ ] = new Entry [ newCapacity ] ; threshold = ( int ) ( newCapacity * loadFactor ) ; table = newTable ; for ( int i = oldCapacity ; i -- > 0 ; ) { for ( Entry old = oldTable [ i ] ; old != null ; ) { Entry e = old ; int index = ( e . hash & 0x7FFFFFFF ) % newCapacity ; old = old . next ; e . next = newTable [ index ] ; newTable [ index ] = e ; } }


signature:
public class OgnlParserTokenManager { /** * Converts an escape sequence into a character value . */
private char escapeChar ( ) { } }

implementation:
int ofs = image . length ( ) - 1 ; switch ( image . charAt ( ofs ) ) { case 'n' : return '\n' ; case 'r' : return '\r' ; case 't' : return '\t' ; case 'b' : return '\b' ; case 'f' : return '\f' ; case '\\' : return '\\' ; case '\'' : return '\'' ; case '\"' : return '\"' ; } // Otherwise , it ' s an octal number . Find the backslash and convert .
while ( image . charAt ( -- ofs ) != '\\' ) { } int value = 0 ; while ( ++ ofs < image . length ( ) ) value = ( value << 3 ) | ( image . charAt ( ofs ) - '0' ) ; return ( char ) value ;


signature:
public class Ognl { /** * Parses the given OGNL expression and returns a tree representation of the expression that can
 * be used by < CODE > Ognl < / CODE > static methods .
 * @ param expression
 * the OGNL expression to be parsed
 * @ return a tree representation of the expression
 * @ throws ExpressionSyntaxException
 * if the expression is malformed
 * @ throws OgnlException
 * if there is a pathological environmental problem */
public static Object parseExpression ( String expression ) throws OgnlException { } }

implementation: try { OgnlParser parser = new OgnlParser ( new StringReader ( expression ) ) ; return parser . topLevelExpression ( ) ; } catch ( ParseException e ) { throw new ExpressionSyntaxException ( expression , e ) ; } catch ( TokenMgrError e ) { throw new ExpressionSyntaxException ( expression , e ) ; }


signature:
public class Ognl { /** * Parses and compiles the given expression using the { @ link ognl . enhance . OgnlExpressionCompiler } returned
 * from { @ link ognl . OgnlRuntime # getCompiler ( ) } .
 * @ param context
 * The context to use .
 * @ param root
 * The root object for the given expression .
 * @ param expression
 * The expression to compile .
 * @ return The node with a compiled accessor set on { @ link ognl . Node # getAccessor ( ) } if compilation
 * was successfull . In instances where compilation wasn ' t possible because of a partially null
 * expression the { @ link ExpressionAccessor } instance may be null and the compilation of this expression
 * still possible at some as yet indertermined point in the future .
 * @ throws Exception If a compilation error occurs . */
public static Node compileExpression ( OgnlContext context , Object root , String expression ) throws Exception { } }

implementation: Node expr = ( Node ) Ognl . parseExpression ( expression ) ; OgnlRuntime . compileExpression ( context , expr , root ) ; return expr ;


signature:
public class Ognl { /** * Creates and returns a new standard naming context for evaluating an OGNL expression .
 * @ param root
 * the root of the object graph
 * @ return a new Map with the keys < CODE > root < / CODE > and < CODE > context < / CODE > set
 * appropriately
 * @ deprecated it will be removed soon */
@ Deprecated public static Map createDefaultContext ( Object root ) { } }

implementation: return addDefaultContext ( root , null , null , null , new OgnlContext ( null , null , null ) ) ;


signature:
public class Ognl { /** * Creates and returns a new standard naming context for evaluating an OGNL expression .
 * @ param root
 * The root of the object graph .
 * @ param classResolver
 * The resolver used to instantiate { @ link Class } instances referenced in the expression .
 * @ return a new OgnlContext with the keys < CODE > root < / CODE > and < CODE > context < / CODE > set
 * appropriately
 * @ deprecated it will be removed soon */
@ Deprecated public static Map createDefaultContext ( Object root , ClassResolver classResolver ) { } }

implementation: return addDefaultContext ( root , null , classResolver , null , new OgnlContext ( classResolver , null , null ) ) ;


signature:
public class Ognl { /** * Creates and returns a new standard naming context for evaluating an OGNL expression .
 * @ param root
 * The root of the object graph .
 * @ param memberAccess
 * Java security handling object to determine semantics for accessing normally private / protected
 * methods / fields .
 * @ param classResolver
 * The resolver used to instantiate { @ link Class } instances referenced in the expression .
 * @ param converter
 * Converter used to convert return types of an expression in to their desired types .
 * @ return a new Map with the keys < CODE > root < / CODE > and < CODE > context < / CODE > set
 * appropriately */
public static Map createDefaultContext ( Object root , MemberAccess memberAccess , ClassResolver classResolver , TypeConverter converter ) { } }

implementation: return addDefaultContext ( root , memberAccess , classResolver , converter , new OgnlContext ( classResolver , converter , memberAccess ) ) ;


signature:
public class Ognl { /** * Creates and returns a new standard naming context for evaluating an OGNL expression .
 * @ param root
 * The root of the object graph .
 * @ param memberAccess
 * Java security handling object to determine semantics for accessing normally private / protected
 * methods / fields .
 * @ return a new Map with the keys < CODE > root < / CODE > and < CODE > context < / CODE > set
 * appropriately */
public static Map createDefaultContext ( Object root , MemberAccess memberAccess ) { } }

implementation: return addDefaultContext ( root , memberAccess , null , null , new OgnlContext ( null , null , memberAccess ) ) ;


signature:
public class Ognl { /** * Appends the standard naming context for evaluating an OGNL expression into the context given
 * so that cached maps can be used as a context .
 * @ param root
 * the root of the object graph
 * @ param context
 * the context to which OGNL context will be added .
 * @ return Context Map with the keys < CODE > root < / CODE > and < CODE > context < / CODE > set
 * appropriately
 * @ deprecated will be removed soon */
@ Deprecated public static Map addDefaultContext ( Object root , Map context ) { } }

implementation: return addDefaultContext ( root , null , null , null , context ) ;


signature:
public class Ognl { /** * Appends the standard naming context for evaluating an OGNL expression into the context given
 * so that cached maps can be used as a context .
 * @ param root
 * The root of the object graph .
 * @ param classResolver
 * The resolver used to instantiate { @ link Class } instances referenced in the expression .
 * @ param context
 * The context to which OGNL context will be added .
 * @ return Context Map with the keys < CODE > root < / CODE > and < CODE > context < / CODE > set
 * appropriately */
public static Map addDefaultContext ( Object root , ClassResolver classResolver , Map context ) { } }

implementation: return addDefaultContext ( root , null , classResolver , null , context ) ;


signature:
public class Ognl { /** * Appends the standard naming context for evaluating an OGNL expression into the context given
 * so that cached maps can be used as a context .
 * @ param root
 * the root of the object graph
 * @ param memberAccess
 * Definition for handling private / protected access .
 * @ param classResolver
 * The class loading resolver that should be used to resolve class references .
 * @ param converter
 * The type converter to be used by default .
 * @ param context
 * Default context to use , if not an { @ link OgnlContext } will be dumped into
 * a new { @ link OgnlContext } object .
 * @ return Context Map with the keys < CODE > root < / CODE > and < CODE > context < / CODE > set
 * appropriately */
public static Map addDefaultContext ( Object root , MemberAccess memberAccess , ClassResolver classResolver , TypeConverter converter , Map context ) { } }

implementation: OgnlContext result ; if ( context instanceof OgnlContext ) { result = ( OgnlContext ) context ; } else { result = new OgnlContext ( memberAccess , classResolver , converter , context ) ; } result . setRoot ( root ) ; return result ;


signature:
public class Ognl { /** * Gets the currently configured { @ link TypeConverter } for the given context - if any .
 * @ param context
 * The context to get the converter from .
 * @ return The converter - or null if none found . */
public static TypeConverter getTypeConverter ( Map context ) { } }

implementation: if ( context instanceof OgnlContext ) { return ( ( OgnlContext ) context ) . getTypeConverter ( ) ; } return null ;


signature:
public class Ognl { /** * Sets the root object to use for all expressions in the given context - doesn ' t necessarily replace
 * root object instances explicitly passed in to other expression resolving methods on this class .
 * @ param context
 * The context to store the root object in .
 * @ param root
 * The root object . */
public static void setRoot ( Map context , Object root ) { } }

implementation: context . put ( OgnlContext . ROOT_CONTEXT_KEY , root ) ;


signature:
public class Ognl { /** * Evaluates the given OGNL expression tree to extract a value from the given root object . The
 * default context is set for the given context and root via < CODE > addDefaultContext ( ) < / CODE > .
 * @ param tree
 * the OGNL expression tree to evaluate , as returned by parseExpression ( )
 * @ param context
 * the naming context for the evaluation
 * @ param root
 * the root object for the OGNL expression
 * @ return the result of evaluating the expression
 * @ throws MethodFailedException
 * if the expression called a method which failed
 * @ throws NoSuchPropertyException
 * if the expression referred to a nonexistent property
 * @ throws InappropriateExpressionException
 * if the expression can ' t be used in this context
 * @ throws OgnlException
 * if there is a pathological environmental problem */
public static Object getValue ( Object tree , Map context , Object root ) throws OgnlException { } }

implementation: return getValue ( tree , context , root , null ) ;


signature:
public class Ognl { /** * Evaluates the given OGNL expression tree to extract a value from the given root object . The
 * default context is set for the given context and root via < CODE > addDefaultContext ( ) < / CODE > .
 * @ param tree
 * the OGNL expression tree to evaluate , as returned by parseExpression ( )
 * @ param context
 * the naming context for the evaluation
 * @ param root
 * the root object for the OGNL expression
 * @ param resultType
 * the converted type of the resultant object , using the context ' s type converter
 * @ return the result of evaluating the expression
 * @ throws MethodFailedException
 * if the expression called a method which failed
 * @ throws NoSuchPropertyException
 * if the expression referred to a nonexistent property
 * @ throws InappropriateExpressionException
 * if the expression can ' t be used in this context
 * @ throws OgnlException
 * if there is a pathological environmental problem */
public static Object getValue ( Object tree , Map context , Object root , Class resultType ) throws OgnlException { } }

implementation: Object result ; OgnlContext ognlContext = ( OgnlContext ) addDefaultContext ( root , context ) ; Node node = ( Node ) tree ; if ( node . getAccessor ( ) != null ) result = node . getAccessor ( ) . get ( ognlContext , root ) ; else result = node . getValue ( ognlContext , root ) ; if ( resultType != null ) { result = getTypeConverter ( context ) . convertValue ( context , root , null , null , result , resultType ) ; } return result ;


signature:
public class Ognl { /** * Gets the value represented by the given pre - compiled expression on the specified root
 * object .
 * @ param expression
 * The pre - compiled expression , as found in { @ link Node # getAccessor ( ) } .
 * @ param context
 * The ognl context .
 * @ param root
 * The object to retrieve the expression value from .
 * @ return
 * The value . */
public static Object getValue ( ExpressionAccessor expression , OgnlContext context , Object root ) { } }

implementation: return expression . get ( context , root ) ;


signature:
public class Ognl { /** * Gets the value represented by the given pre - compiled expression on the specified root
 * object .
 * @ param expression
 * The pre - compiled expression , as found in { @ link Node # getAccessor ( ) } .
 * @ param context
 * The ognl context .
 * @ param root
 * The object to retrieve the expression value from .
 * @ param resultType
 * The desired object type that the return value should be converted to using the { @ link # getTypeConverter ( java . util . Map ) } } .
 * @ return
 * The value . */
public static Object getValue ( ExpressionAccessor expression , OgnlContext context , Object root , Class resultType ) { } }

implementation: return getTypeConverter ( context ) . convertValue ( context , root , null , null , expression . get ( context , root ) , resultType ) ;


signature:
public class Ognl { /** * Evaluates the given OGNL expression to extract a value from the given root object in a given
 * context
 * @ see # parseExpression ( String )
 * @ see # getValue ( Object , Object )
 * @ param expression
 * the OGNL expression to be parsed
 * @ param context
 * the naming context for the evaluation
 * @ param root
 * the root object for the OGNL expression
 * @ return the result of evaluating the expression
 * @ throws MethodFailedException
 * if the expression called a method which failed
 * @ throws NoSuchPropertyException
 * if the expression referred to a nonexistent property
 * @ throws InappropriateExpressionException
 * if the expression can ' t be used in this context
 * @ throws OgnlException
 * if there is a pathological environmental problem */
public static Object getValue ( String expression , Map context , Object root ) throws OgnlException { } }

implementation: return getValue ( expression , context , root , null ) ;


signature:
public class Ognl { /** * Evaluates the given OGNL expression tree to extract a value from the given root object .
 * @ param tree
 * the OGNL expression tree to evaluate , as returned by parseExpression ( )
 * @ param root
 * the root object for the OGNL expression
 * @ return the result of evaluating the expression
 * @ throws MethodFailedException
 * if the expression called a method which failed
 * @ throws NoSuchPropertyException
 * if the expression referred to a nonexistent property
 * @ throws InappropriateExpressionException
 * if the expression can ' t be used in this context
 * @ throws OgnlException
 * if there is a pathological environmental problem
 * @ deprecated it will be removed soon */
@ Deprecated public static Object getValue ( Object tree , Object root ) throws OgnlException { } }

implementation: return getValue ( tree , root , null ) ;


signature:
public class Ognl { /** * Evaluates the given OGNL expression tree to extract a value from the given root object .
 * @ param tree
 * the OGNL expression tree to evaluate , as returned by parseExpression ( )
 * @ param root
 * the root object for the OGNL expression
 * @ param resultType
 * the converted type of the resultant object , using the context ' s type converter
 * @ return the result of evaluating the expression
 * @ throws MethodFailedException
 * if the expression called a method which failed
 * @ throws NoSuchPropertyException
 * if the expression referred to a nonexistent property
 * @ throws InappropriateExpressionException
 * if the expression can ' t be used in this context
 * @ throws OgnlException
 * if there is a pathological environmental problem */
public static Object getValue ( Object tree , Object root , Class resultType ) throws OgnlException { } }

implementation: return getValue ( tree , createDefaultContext ( root ) , root , resultType ) ;


signature:
public class Ognl { /** * Convenience method that combines calls to < code > parseExpression < / code > and
 * < code > getValue < / code > .
 * @ see # parseExpression ( String )
 * @ see # getValue ( Object , Object )
 * @ param expression
 * the OGNL expression to be parsed
 * @ param root
 * the root object for the OGNL expression
 * @ return the result of evaluating the expression
 * @ throws ExpressionSyntaxException
 * if the expression is malformed
 * @ throws MethodFailedException
 * if the expression called a method which failed
 * @ throws NoSuchPropertyException
 * if the expression referred to a nonexistent property
 * @ throws InappropriateExpressionException
 * if the expression can ' t be used in this context
 * @ throws OgnlException
 * if there is a pathological environmental problem */
public static Object getValue ( String expression , Object root ) throws OgnlException { } }

implementation: return getValue ( expression , root , null ) ;


signature:
public class Ognl { /** * Convenience method that combines calls to < code > parseExpression < / code > and
 * < code > getValue < / code > .
 * @ see # parseExpression ( String )
 * @ see # getValue ( Object , Object )
 * @ param expression
 * the OGNL expression to be parsed
 * @ param root
 * the root object for the OGNL expression
 * @ param resultType
 * the converted type of the resultant object , using the context ' s type converter
 * @ return the result of evaluating the expression
 * @ throws ExpressionSyntaxException
 * if the expression is malformed
 * @ throws MethodFailedException
 * if the expression called a method which failed
 * @ throws NoSuchPropertyException
 * if the expression referred to a nonexistent property
 * @ throws InappropriateExpressionException
 * if the expression can ' t be used in this context
 * @ throws OgnlException
 * if there is a pathological environmental problem */
public static Object getValue ( String expression , Object root , Class resultType ) throws OgnlException { } }

implementation: return getValue ( parseExpression ( expression ) , root , resultType ) ;


signature:
public class Ognl { /** * Evaluates the given OGNL expression tree to insert a value into the object graph rooted at
 * the given root object . The default context is set for the given context and root via < CODE > addDefaultContext ( ) < / CODE > .
 * @ param tree
 * the OGNL expression tree to evaluate , as returned by parseExpression ( )
 * @ param context
 * the naming context for the evaluation
 * @ param root
 * the root object for the OGNL expression
 * @ param value
 * the value to insert into the object graph
 * @ throws MethodFailedException
 * if the expression called a method which failed
 * @ throws NoSuchPropertyException
 * if the expression referred to a nonexistent property
 * @ throws InappropriateExpressionException
 * if the expression can ' t be used in this context
 * @ throws OgnlException
 * if there is a pathological environmental problem */
public static void setValue ( Object tree , Map context , Object root , Object value ) throws OgnlException { } }

implementation: OgnlContext ognlContext = ( OgnlContext ) addDefaultContext ( root , context ) ; Node n = ( Node ) tree ; if ( n . getAccessor ( ) != null ) { n . getAccessor ( ) . set ( ognlContext , root , value ) ; return ; } n . setValue ( ognlContext , root , value ) ;


signature:
public class Ognl { /** * Sets the value given using the pre - compiled expression on the specified root
 * object .
 * @ param expression
 * The pre - compiled expression , as found in { @ link Node # getAccessor ( ) } .
 * @ param context
 * The ognl context .
 * @ param root
 * The object to set the expression value on .
 * @ param value
 * The value to set . */
public static void setValue ( ExpressionAccessor expression , OgnlContext context , Object root , Object value ) { } }

implementation: expression . set ( context , root , value ) ;


signature:
public class Ognl { /** * Evaluates the given OGNL expression tree to insert a value into the object graph rooted at
 * the given root object .
 * @ param tree
 * the OGNL expression tree to evaluate , as returned by parseExpression ( )
 * @ param root
 * the root object for the OGNL expression
 * @ param value
 * the value to insert into the object graph
 * @ throws MethodFailedException
 * if the expression called a method which failed
 * @ throws NoSuchPropertyException
 * if the expression referred to a nonexistent property
 * @ throws InappropriateExpressionException
 * if the expression can ' t be used in this context
 * @ throws OgnlException
 * if there is a pathological environmental problem */
public static void setValue ( Object tree , Object root , Object value ) throws OgnlException { } }

implementation: setValue ( tree , createDefaultContext ( root ) , root , value ) ;


signature:
public class Ognl { /** * Convenience method that combines calls to < code > parseExpression < / code > and
 * < code > setValue < / code > .
 * @ see # parseExpression ( String )
 * @ see # setValue ( Object , Object , Object )
 * @ param expression
 * the OGNL expression to be parsed
 * @ param root
 * the root object for the OGNL expression
 * @ param value
 * the value to insert into the object graph
 * @ throws ExpressionSyntaxException
 * if the expression is malformed
 * @ throws MethodFailedException
 * if the expression called a method which failed
 * @ throws NoSuchPropertyException
 * if the expression referred to a nonexistent property
 * @ throws InappropriateExpressionException
 * if the expression can ' t be used in this context
 * @ throws OgnlException
 * if there is a pathological environmental problem */
public static void setValue ( String expression , Object root , Object value ) throws OgnlException { } }

implementation: setValue ( parseExpression ( expression ) , root , value ) ;


signature:
public class Ognl { /** * Checks if the specified { @ link Node } instance represents a constant
 * expression .
 * @ param tree
 * The { @ link Node } to check .
 * @ param context
 * The context to use .
 * @ return True if the node is a constant - false otherwise .
 * @ throws OgnlException If an error occurs checking the expression . */
public static boolean isConstant ( Object tree , Map context ) throws OgnlException { } }

implementation: return ( ( SimpleNode ) tree ) . isConstant ( ( OgnlContext ) addDefaultContext ( null , context ) ) ;


signature:
public class Ognl { /** * Checks if the specified expression represents a constant expression .
 * @ param expression
 * The expression to check .
 * @ param context
 * The context to use .
 * @ return True if the node is a constant - false otherwise .
 * @ throws OgnlException If an error occurs checking the expression . */
public static boolean isConstant ( String expression , Map context ) throws OgnlException { } }

implementation: return isConstant ( parseExpression ( expression ) , context ) ;


signature:
public class FileWatchServices { /** * Returns default watch service identifier based on operating system .
 * @ return watch service id */
public static String getDefaultWatchServiceId ( ) { } }

implementation: String result = "polling" ; String osName = System . getProperty ( "os.name" ) ; if ( osName != null ) { osName = osName . toLowerCase ( Locale . ENGLISH ) ; if ( osName . contains ( "windows" ) || osName . contains ( "linux" ) ) { result = isAtLeastJava7 ( ) ? "jdk7" : "jnotify" ; } else if ( osName . contains ( "mac" ) ) { result = "jnotify" ; } } return result ;


signature:
public class AbstractPlay2StartServerMojo { /** * startTimeout in milliseconds */
protected void waitForServerStarted ( String rootUrl , JavaRunnable runner , int startTimeout , boolean spawned ) throws MojoExecutionException , IOException { } }

implementation:
long endTimeMillis = startTimeout > 0 ? System . currentTimeMillis ( ) + startTimeout : 0L ; boolean started = false ; URL connectUrl = new URL ( rootUrl ) ; int verifyWaitDelay = 1000 ; while ( ! started ) { if ( startTimeout > 0 && endTimeMillis - System . currentTimeMillis ( ) < 0L ) { if ( spawned ) { InternalPlay2StopMojo internalStop = new InternalPlay2StopMojo ( ) ; internalStop . project = project ; try { internalStop . execute ( ) ; } catch ( MojoExecutionException e ) { // just ignore
} catch ( MojoFailureException e ) { // just ignore
} } throw new MojoExecutionException ( String . format ( "Failed to start Play! server in %d ms" , Integer . valueOf ( startTimeout ) ) ) ; } BuildException runnerException = runner . getException ( ) ; if ( runnerException != null ) { throw new MojoExecutionException ( "Play! server start exception" , runnerException ) ; } try { URLConnection conn = connectUrl . openConnection ( ) ; if ( startTimeout > 0 ) { int connectTimeOut = Long . valueOf ( Math . min ( endTimeMillis - System . currentTimeMillis ( ) , Integer . valueOf ( Integer . MAX_VALUE ) . longValue ( ) ) ) . intValue ( ) ; if ( connectTimeOut > 0 ) { conn . setConnectTimeout ( connectTimeOut ) ; } } connectUrl . openConnection ( ) . getContent ( ) ; started = true ; } catch ( Exception e ) { // return false ;
} if ( ! started ) { long sleepTime = verifyWaitDelay ; if ( startTimeout > 0 ) { sleepTime = Math . min ( sleepTime , endTimeMillis - System . currentTimeMillis ( ) ) ; } if ( sleepTime > 0 ) { try { Thread . sleep ( sleepTime ) ; } catch ( InterruptedException e ) { throw new MojoExecutionException ( "?" , e ) ; } } } }


signature:
public class JDK7FileWatchService { /** * { @ inheritDoc } */
@ Override public FileWatcher watch ( List < File > filesToWatch , FileWatchCallback watchCallback ) throws FileWatchException { } }

implementation: List < File > dirsToWatch = new ArrayList < File > ( filesToWatch . size ( ) ) ; for ( File file : filesToWatch ) { if ( file . exists ( ) ) { if ( file . isDirectory ( ) ) { dirsToWatch . add ( file ) ; } else { if ( log != null && log . isWarnEnabled ( ) ) { log . warn ( String . format ( "[jdk7] \"%s\" is not a directory, will not be watched." , file . getAbsolutePath ( ) ) ) ; } } } else { if ( log != null && log . isWarnEnabled ( ) ) { log . warn ( String . format ( "[jdk7] \"%s\" does not exist, will not be watched." , file . getAbsolutePath ( ) ) ) ; } } } try { JDK7FileWatcher result = new JDK7FileWatcher ( log , dirsToWatch , watchCallback ) ; Thread thread = new Thread ( result , "jdk7-play-watch-service" ) ; thread . setDaemon ( true ) ; thread . start ( ) ; return result ; } catch ( IOException e ) { throw new FileWatchException ( "JDK7FileWatcher initialization failed" , e ) ; }


signature:
public class Play2RoutesSourcePositionMapper { /** * Performs mapping from the position in generated source file to the position in { @ code routes } file it was
 * generated from . < br >
 * < br >
 * Returns :
 * < ul >
 * < li > position in { @ code routes } file < / li >
 * < li > { @ code null } value if file of the input position is not recognized as generated from { @ code routes } file < / li >
 * < / ul >
 * @ param p compilation error / warning position in generated file
 * @ return position in { @ code routes } file or { @ code null } value if file of the input position is not recognized as
 * generated from { @ code routes } file
 * @ throws IOException I / O exception during generated or original source file reading */
@ Override public SourcePosition map ( SourcePosition p ) throws IOException { } }

implementation:
SourcePosition result = null ; File generatedFile = p . getFile ( ) ; if ( generatedFile != null && generatedFile . isFile ( ) ) { String [ ] generatedFileLines = readFileAsString ( generatedFile ) . split ( "\n" ) ; if ( generatedFileLines [ 0 ] . startsWith ( Play2RoutesGeneratedSource . SOURCE_PREFIX ) // play 2.2 . x - 2.3 . x
|| Arrays . asList ( generatedFileLines ) . contains ( GENERATOR_LINE ) ) // play 2.4 . x +
{ Play2RoutesGeneratedSource generatedSource = new Play2RoutesGeneratedSource ( generatedFileLines ) ; String sourceFileName = generatedSource . getSourceFileName ( ) ; if ( sourceFileName != null ) { File sourceFile = new File ( sourceFileName ) ; if ( sourceFile . isFile ( ) ) { int sourceLine = generatedSource . mapLine ( p . getLine ( ) ) ; String [ ] sourceFileLines = readFileAsString ( sourceFile ) . split ( "\n" ) ; if ( sourceFileLines . length >= sourceLine ) { String sourceLineContent = sourceFileLines [ sourceLine - 1 ] ; if ( sourceLineContent . endsWith ( "\r" ) ) // remove trailing CR ( on Windows )
{ sourceLineContent = sourceLineContent . substring ( 0 , sourceLineContent . length ( ) - 1 ) ; } result = new Play2RoutesSourcePosition ( sourceLine , sourceLineContent , sourceFile ) ; } } } } } return result ;