private int type_index;
private ConstantPool constant_pool;
- private boolean isRuntimeVisible;
private List element_value_pairs;
* @param isRuntimeVisible
* @throws IOException
*/
- public static AnnotationEntry read(DataInputStream file, ConstantPool constant_pool, boolean isRuntimeVisible) throws IOException {
+ public static AnnotationEntry read(DataInputStream file, ConstantPool constant_pool) throws IOException {
- final AnnotationEntry annotationEntry = new AnnotationEntry(file.readUnsignedShort(), constant_pool, isRuntimeVisible);
+ final AnnotationEntry annotationEntry = new AnnotationEntry(file.readUnsignedShort(), constant_pool);
final int num_element_value_pairs = (file.readUnsignedShort());
annotationEntry.element_value_pairs = new ArrayList();
for (int i = 0; i < num_element_value_pairs; i++) {
return annotationEntry;
}
- public AnnotationEntry(int type_index, ConstantPool constant_pool, boolean isRuntimeVisible) {
+ public AnnotationEntry(int type_index, ConstantPool constant_pool) {
this.type_index = type_index;
this.constant_pool = constant_pool;
- this.isRuntimeVisible = isRuntimeVisible;
}
/**
* @param file Input stream
* @param constant_pool Array of constants
*/
- public Annotations(byte annotation_type, int name_index, int length, DataInputStream file, ConstantPool constant_pool, boolean isRuntimeVisible) throws IOException {
+ public Annotations(byte annotation_type, int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {
this(annotation_type, name_index, length, (AnnotationEntry[]) null, constant_pool);
final int annotation_table_length = (file.readUnsignedShort());
annotation_table = new AnnotationEntry[annotation_table_length];
for (int i = 0; i < annotation_table_length; i++) {
- annotation_table[i] = AnnotationEntry.read(file, constant_pool, isRuntimeVisible);
+ annotation_table[i] = AnnotationEntry.read(file, constant_pool);
}
}
case '@': // Annotation
// TODO isRuntimeVisible
return new AnnotationElementValue(ANNOTATION, AnnotationEntry.read(
- dis, cpool, false), cpool);
+ dis, cpool), cpool);
case '[': // Array
int numArrayVals = dis.readUnsignedShort();
ElementValue[] evalues = new ElementValue[numArrayVals];
annotation_table_length = (file.readUnsignedShort());
annotation_table = new AnnotationEntry[annotation_table_length];
for (int i = 0; i < annotation_table_length; i++) {
- // TODO isRuntimeVisible
- annotation_table[i] = AnnotationEntry.read(file, constant_pool, false);
+ annotation_table[i] = AnnotationEntry.read(file, constant_pool);
}
}
throws IOException
{
super(Constants.ATTR_RUNTIMEIN_VISIBLE_ANNOTATIONS, name_index, length,
- file, constant_pool, false);
+ file, constant_pool);
}
/**
throws IOException
{
super(Constants.ATTR_RUNTIME_VISIBLE_ANNOTATIONS, name_index, length,
- file, constant_pool, true);
+ file, constant_pool);
}
/**