Examples of INSTANCEOF


Examples of com.bacoder.parser.java.api.InstanceOf

        return infixExpression;
      }
    }

    if (hasTerminalNode(context, JavaParser.INSTANCEOF)) {
      InstanceOf instanceOf = createNode(context, InstanceOf.class);

      ExpressionContext expressionContext = getChild(context, ExpressionContext.class);
      if (expressionContext != null) {
        instanceOf.setExpression(getAdapter(ExpressionAdapter.class).adapt(expressionContext));
      }

      TypeContext typeContext = getChild(context, TypeContext.class);
      if (typeContext != null) {
        instanceOf.setType(getAdapter(TypeAdapter.class).adapt(typeContext));
      }

      return instanceOf;
    }
View Full Code Here

Examples of lombok.ast.InstanceOf

      }
      set(node, inv);
    }
   
    @Override public void visitTypeTest(JCInstanceOf node) {
      InstanceOf io = new InstanceOf();
      io.rawTypeReference(toTree(node.getType(), FlagKey.TYPE_REFERENCE));
      io.rawObjectReference(toTree(node.getExpression()));
      set(node, io);
    }
View Full Code Here

Examples of lombok.ast.InstanceOf

    return current;
  }
 
  public Node createInstanceOfExpression(Node operand, Node type) {
    if (type == null) return operand;
    return posify(new InstanceOf().rawObjectReference(operand).rawTypeReference(type));
  }
View Full Code Here

Examples of org.allspice.bytecode.instructions.InstanceOf

      Var x = new Var(0,TypeName.OBJECT) ;
      MethodDef md = new MethodDef(TypeName.BOOLEAN,"getFoo",x) ;
      md = md.setStatic(true) ;
      md = md.addInstructions(
          new Load(x),
          new InstanceOf(new TypeName(type)),
          new Return(TypeCode.BOOLEAN)
          ) ;
      cd = cd.addMethod(md) ;
    }
    return cd ;
View Full Code Here

Examples of org.allspice.bytecode.instructions.InstanceOf

  }

  public static void createInstanceOf(EvaluationContext context,
      final Expr e, final String type, InstList l) throws CompilerException {
    context.compile(null,e, l) ;
    l.add(new InstanceOf(context.fullyQualified(type))) ;
  }
View Full Code Here

Examples of org.apache.bcel.generic.INSTANCEOF

                                                                           2));
            if (i > 0) {
                targetInstructions.add(ih);
            }

            il.append(new INSTANCEOF(cp.addClass(hierarchyTop)));
            BranchInstruction bi = InstructionFactory.createBranchInstruction(Constants.IFEQ,
                                                                              null);
            il.append(bi);
            branchInstructions.add(bi);
View Full Code Here

Examples of org.apache.bcel.generic.INSTANCEOF

                                         cp);

        il.append(InstructionConstants.ACONST_NULL);
        il.append(InstructionFactory.createStore(Type.OBJECT, 2));
        il.append(InstructionFactory.createLoad(Type.OBJECT, 1));
        il.append(new INSTANCEOF(cp.addClass(new ObjectType(className))));
        BranchInstruction ifeq_6 = InstructionFactory.createBranchInstruction(Constants.IFEQ,
                                                                              null);
        il.append(ifeq_6);
        il.append(InstructionFactory.createLoad(Type.OBJECT, 1));
        il.append(instFactory.createCheckCast(new ObjectType(className)));
        il.append(InstructionFactory.createStore(Type.OBJECT, 2));
        InstructionHandle ih_14 = il.append(InstructionFactory.createLoad(Type.OBJECT,
                                                                          2));
        il.append(new INSTANCEOF(cp.addClass(new ObjectType("java.lang.Cloneable"))));
        BranchInstruction ifne_18 = InstructionFactory.createBranchInstruction(Constants.IFNE,
                                                                               null);
        il.append(ifne_18);
        il.append(instFactory.createFieldAccess("java.lang.System",
                                                "out",
View Full Code Here

Examples of org.apache.bcel.generic.INSTANCEOF

                                                                           2));
            if (i > 0) {
                targetInstructions.add(ih);
            }

            il.append(new INSTANCEOF(cp.addClass(hierarchyTop)));
            BranchInstruction bi = InstructionFactory.createBranchInstruction(Constants.IFEQ,
                                                                              null);
            il.append(bi);
            branchInstructions.add(bi);
View Full Code Here

Examples of org.apache.bcel.generic.INSTANCEOF

                                         cp);

        il.append(InstructionConstants.ACONST_NULL);
        il.append(InstructionFactory.createStore(Type.OBJECT, 2));
        il.append(InstructionFactory.createLoad(Type.OBJECT, 1));
        il.append(new INSTANCEOF(cp.addClass(new ObjectType(className))));
        BranchInstruction ifeq_6 = InstructionFactory.createBranchInstruction(Constants.IFEQ,
                                                                              null);
        il.append(ifeq_6);
        il.append(InstructionFactory.createLoad(Type.OBJECT, 1));
        il.append(instFactory.createCheckCast(new ObjectType(className)));
        il.append(InstructionFactory.createStore(Type.OBJECT, 2));
        InstructionHandle ih_14 = il.append(InstructionFactory.createLoad(Type.OBJECT,
                                                                          2));
        il.append(new INSTANCEOF(cp.addClass(new ObjectType("java.lang.Cloneable"))));
        BranchInstruction ifne_18 = InstructionFactory.createBranchInstruction(Constants.IFNE,
                                                                               null);
        il.append(ifne_18);
        il.append(instFactory.createFieldAccess("java.lang.System",
                                                "out",
View Full Code Here

Examples of org.aspectj.apache.bcel.generic.INSTANCEOF

    public static Instruction createInstanceof(InstructionFactory fact, ReferenceType t) {
    int cpoolEntry =
      (t instanceof ArrayType)
      ? fact.getConstantPool().addArrayClass((ArrayType)t)
      : fact.getConstantPool().addClass((ObjectType)t);
    return new INSTANCEOF(cpoolEntry);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.