/[classpath]/gjdoc/src/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.java
ViewVC logotype

Diff of /gjdoc/src/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by julian, Mon Dec 13 17:39:51 2004 UTC revision 1.2 by julian, Sat Oct 22 12:38:50 2005 UTC
# Line 33  class IdentifierExpression Line 33  class IdentifierExpression
33     public ConstantExpression evaluate(Context context)     public ConstantExpression evaluate(Context context)
34        throws IllegalExpressionException        throws IllegalExpressionException
35     {     {
36        Object value = context.getEvaluatorEnvironment().getValue(identifier);        Object value = context.getEvaluatorEnvironment().getValue(identifier, context.getVisitedFields());
37    
38        if (value instanceof Byte) {        if (value instanceof Byte) {
39           return new ConstantByte(((Byte)value).byteValue());           return new ConstantByte(((Byte)value).byteValue());
# Line 62  class IdentifierExpression Line 62  class IdentifierExpression
62        else if (value instanceof String) {        else if (value instanceof String) {
63           return new ConstantString((String)value);           return new ConstantString((String)value);
64        }        }
65          else if (null != value) {
66             throw new IllegalExpressionException("Unsupported type " + value.getClass().getName() + " for identifier " + identifier);
67          }
68        else {        else {
69           throw new IllegalExpressionException("Unsupported type for identifier " + identifier);           throw new IllegalExpressionException("Cannot resolve identifier " + identifier);
70        }        }
71     }     }
72  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26