Package com.dragome.compiler.ast

Examples of com.dragome.compiler.ast.StringLiteral


  public void visit(ClassLiteral literal)
  {
    MethodBinding binding= MethodBinding.lookup("java.lang.Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;");
    MethodInvocation mi= new MethodInvocation(currentMethodDeclaration, binding);
    mi.addArgument(new StringLiteral(literal.getSignature().toString()));
    visit(mi);
  }
View Full Code Here


        {
          instruction= NumberLiteral.create(new Double(((ConstantDouble) constant).getBytes()));
        }
        else if (constant.getTag() == Constants.CONSTANT_Utf8)
        {
          instruction= new StringLiteral(((ConstantUtf8) constant).getBytes());
        }
        else if (constant.getTag() == Constants.CONSTANT_String)
        {
          int k= ((ConstantString) constant).getStringIndex();
          constant= constantPool.getConstant(k, Constants.CONSTANT_Utf8);
          instruction= new StringLiteral(((ConstantUtf8) constant).getBytes());
        }
        else if (constant.getTag() == Constants.CONSTANT_Class)
        {
          Signature signature= Project.getSingleton().getSignature(((ConstantClass) constant).getBytes(constantPool));
          instruction= new ClassLiteral(signature);
View Full Code Here

TOP

Related Classes of com.dragome.compiler.ast.StringLiteral

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.