1 16 19 20 package com.sun.org.apache.xalan.internal.xsltc.compiler; 21 22 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; 23 import com.sun.org.apache.bcel.internal.generic.InstructionList; 24 import com.sun.org.apache.bcel.internal.generic.PUSH; 25 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; 26 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator; 27 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; 28 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; 29 30 34 final class SimpleAttributeValue extends AttributeValue { 35 36 private String _value; 38 42 public SimpleAttributeValue(String value) { 43 _value = value; 44 } 45 46 50 public Type typeCheck(SymbolTable stable) throws TypeCheckError { 51 return _type = Type.String; 52 } 53 54 public String toString() { 55 return _value; 56 } 57 58 protected boolean contextDependent() { 59 return false; 60 } 61 62 68 public void translate(ClassGenerator classGen, MethodGenerator methodGen) { 69 final ConstantPoolGen cpg = classGen.getConstantPool(); 70 final InstructionList il = methodGen.getInstructionList(); 71 il.append(new PUSH(cpg, _value)); 72 } 73 } 74 | Popular Tags |