Examples of ConstantPoolInfo


Examples of net.sf.rej.java.constantpool.ConstantPoolInfo

    }
  }
 
  private void splitSynchronize() {
    if (this.sync != null && isOpen) {
      ConstantPoolInfo cpi = getSelectedObject();
      this.sync.sync(cpi);
    }
  }
View Full Code Here

Examples of net.sf.rej.java.constantpool.ConstantPoolInfo

    super(nameIndex, pool);
  }

  @Override
  public String toString() {
    ConstantPoolInfo cpi = this.pool.get(this.constant);
    return "Constant: " + cpi.getValue();
  }
View Full Code Here

Examples of net.sf.rej.java.constantpool.ConstantPoolInfo

    ConstantPoolInfo cpi = this.pool.get(this.constant);
    return "Constant: " + cpi.getValue();
  }
 
  public String getValue() {
    ConstantPoolInfo cpi = this.pool.get(this.constant);
    return cpi.getValue();
  }
View Full Code Here

Examples of net.sf.rej.java.constantpool.ConstantPoolInfo

        ic.setCf(cf);
        agent.processClass(ic, cf);
       
        ConstantPool cp = cf.getPool();
        for (int i=0; i < cp.size(); i++) {
          ConstantPoolInfo cpi = cp.get(i);
          if (cpi != null) {
            agent.processConstantPoolInfo(ic, cpi);           
          }
        }
View Full Code Here

Examples of net.sf.rej.java.constantpool.ConstantPoolInfo

    public int getHandlerPc() {
        return this.handlerLabel.getPosition();
    }

    public String getType() {
        ConstantPoolInfo cpi = this.pool.get(this.catchType);
        if (cpi == null)
            return "(#" + this.catchType + ")";
        return cpi.getValue();
    }
View Full Code Here

Examples of net.sf.rej.java.constantpool.ConstantPoolInfo

                int index = destinationPool.optionalAddClassRef(ci.getName());
                copyParams.addValue(index);
                break;
            }
            case TYPE_CONSTANT_POOL_CONSTANT: {
              ConstantPoolInfo cpi = sourcePool.get(params.getInt(i));
              switch (cpi.getType()) {
              case ConstantPoolInfo.DOUBLE: {
                DoubleInfo di = (DoubleInfo)cpi;
                DoubleInfo diCopy = new DoubleInfo(di.getHighBytes(), di.getLowBytes(), destinationPool);
                int index = destinationPool.optionalAdd(diCopy);
                copyParams.addValue(index);
View Full Code Here

Examples of net.sf.rej.java.constantpool.ConstantPoolInfo

 
  public ConstantPoolInfo getConstant() {
    ConstantValueAttribute attr = this.attributes.getConstantValueAttribute();
    if (attr != null) {
      int index = attr.getConstantIndex();
      ConstantPoolInfo cpi = this.pool.get(index);
      return cpi;
    }
   
    return null;
  }
View Full Code Here

Examples of net.sf.rej.java.constantpool.ConstantPoolInfo

    public Imports getImports(ClassFile cf) {
    Imports imports = new Imports(cf.getPackageName());
    ConstantPool pool = cf.getPool();

    for (int i = 0; i < pool.size(); i++) {
      ConstantPoolInfo cpi = pool.get(i);
      if (cpi != null) {
        if (cpi.getType() == ConstantPoolInfo.CLASS) {
          // there can be array definitions here, too
          JavaType cls = new JavaType(cpi.getValue());
          imports.addType(cls.getType());
        } else if (cpi.getType() == ConstantPoolInfo.NAME_AND_TYPE) {
          NameAndTypeInfo nati = (NameAndTypeInfo) cpi;
          Descriptor desc = nati.getDescriptor();
          if (!desc.getReturn().isPrimitive()) {
            imports.addType(desc.getReturn().getType());
          }
View Full Code Here

Examples of net.sf.rej.java.constantpool.ConstantPoolInfo

        this.cp = pool;
        List<Wrapper> al = new ArrayList<Wrapper>();
        this.imports = EditorFacade.getInstance().getImports(this.cf);

        for (int i = 0; i < this.cp.size(); i++) {
            ConstantPoolInfo cpi = this.cp.get(i);
            if (cpi != null) {
                if (cpi.getType() == ConstantPoolInfo.FIELD_REF) {
                    al.add(createWrapper((RefInfo) cpi));
                }
            }
        }
        this.model = new DefaultComboBoxModel(al.toArray());
View Full Code Here

Examples of net.sf.rej.java.constantpool.ConstantPoolInfo

  }

  @Override
  public List<StackElement> getPushedElements(DecompilationContext dc) {
    List<StackElement> elements = new ArrayList<StackElement>();
    ConstantPoolInfo cpi = dc.getConstantPool().get(this.index);
    if (cpi instanceof IntegerInfo) {
      elements.add(new StackElement("value", StackElementType.INT));
    } else if (cpi instanceof FloatInfo) {
      elements.add(new StackElement("value", StackElementType.FLOAT));
    } else if (cpi instanceof StringInfo) {
      elements.add(new StackElement("value", StackElementType.REF));
    } else {
      throw new AssertionError("ldc_w points to an invalid item on the constant pool: " + cpi.getClass());
    }
    return elements;
  }
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.