1 package jrre.api.java.lang.reflect;
2
3 import jrre.classloader.classfile.access_flags.*;
4 import jrre.classloader.classfile.attributes.*;
5
6 public class FieldEntry{
7
8 private FieldAccessFlags accessFlags;
9 private int nameIndex, descriptorIndex, attributesCount;
10 private ConstantValueAttribute attributes;
11 private String name;
12
13 public FieldEntry(){
14
15 }
16
17 public FieldEntry(FieldAccessFlags accessFlags,int nameIndex,int descriptorIndex,int attributesCount,
18 ConstantValueAttribute attributes){
19 this.name = name;
20 this.accessFlags = accessFlags;
21 this.nameIndex = nameIndex;
22 this.descriptorIndex = descriptorIndex;
23 this.attributesCount = attributesCount;
24 this.attributes = attributes;
25 }
26 public void setName(String name){
27 this.name = name;
28 }
29 public String getName(){ return name; }
30
31 public FieldAccessFlags getFieldAccessFlags(){return accessFlags;}
32 public int getNameIndex(){return nameIndex;}
33 public int getDescriptorIndex(){return descriptorIndex;}
34 public int getAttributesCount(){return attributesCount;}
35 public Attribute getAttributes(){return attributes;}
36
37 public String toString(){
38 StringBuffer toReturn = new StringBuffer();
39 toReturn.append("\nFieldEntry: "+name);
40 toReturn.append("\n\tName Index: " + nameIndex);
41 toReturn.append("\n\tDescriptor Index: " + descriptorIndex);
42 toReturn.append("\n\t" + accessFlags.toString());
43 toReturn.append("\n\tAttributes Count: " + attributesCount);
44 if(attributesCount > 0) toReturn.append("\n\n\t" + attributes.toString());
45 return toReturn.toString();
46 }
47
48 }
This page was automatically generated by Maven