Package org.apache.kato.hprof.datalayer

Examples of org.apache.kato.hprof.datalayer.StaticFieldEntry


   */
  private ArrayList<JavaField> fields;
  @Override
  public List getDeclaredFields() {
    if (fields == null) {
      StaticFieldEntry staticFields[] = javaClass.getStaticFields();
      InstanceFieldEntry instanceFields[] = javaClass.getInstanceFields();
     
      fields = new ArrayList<JavaField>(staticFields.length + instanceFields.length);
     
      for (StaticFieldEntry f : staticFields) {
View Full Code Here


     * boxed. Other types are implementations of JavaObject, or null.
     */
    @Override
    public Object get(JavaObject arg0) throws CorruptDataException,
        MemoryAccessException {
      StaticFieldEntry field = (StaticFieldEntry) this.field;
     
      switch(field.getType()){
      case BasicType.OBJECT:
        return heap.getObjectByID(field.getIDField());
      case BasicType.BOOLEAN:
        return new Boolean(field.getBooleanField());
      case BasicType.CHAR:
        return new Character(field.getCharField());
      case BasicType.FLOAT:
        return new Float(field.getFloatField());
      case BasicType.DOUBLE:
        return new Double(field.getDoubleField());
      case BasicType.BYTE:
        return new Byte(field.getByteField());
      case BasicType.SHORT:
        return new Short(field.getShortField());
      case BasicType.INT:
        return new Integer(field.getIntegerField());
      case BasicType.LONG:
        return new Long(field.getLongField());
      default:
        throw new CorruptDataException(new CorruptDataImpl("Unexpected basic type of " + field.getType()+
            "encountered."));   
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.kato.hprof.datalayer.StaticFieldEntry

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.