You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.6 KiB
58 lines
1.6 KiB
10 years ago
|
/*
|
||
|
* Fernflower - The Analytical Java Decompiler
|
||
|
* http://www.reversed-java.com
|
||
|
*
|
||
|
* (C) 2008 - 2010, Stiver
|
||
|
*
|
||
|
* This software is NEITHER public domain NOR free software
|
||
|
* as per GNU License. See license.txt for more details.
|
||
|
*
|
||
|
* This software is distributed WITHOUT ANY WARRANTY; without
|
||
|
* even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||
|
* A PARTICULAR PURPOSE.
|
||
|
*/
|
||
|
|
||
10 years ago
|
package org.jetbrains.java.decompiler.struct.attr;
|
||
10 years ago
|
|
||
|
import java.io.ByteArrayInputStream;
|
||
|
import java.io.DataInputStream;
|
||
|
import java.io.IOException;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
|
||
10 years ago
|
import org.jetbrains.java.decompiler.modules.decompiler.exps.AnnotationExprent;
|
||
|
import org.jetbrains.java.decompiler.struct.consts.ConstantPool;
|
||
10 years ago
|
|
||
10 years ago
|
public class StructAnnotationParameterAttribute extends StructGeneralAttribute {
|
||
10 years ago
|
|
||
|
private List<List<AnnotationExprent>> paramAnnotations;
|
||
|
|
||
|
public void initContent(ConstantPool pool) {
|
||
|
|
||
|
super.initContent(pool);
|
||
|
|
||
|
paramAnnotations = new ArrayList<List<AnnotationExprent>>();
|
||
|
DataInputStream data = new DataInputStream(new ByteArrayInputStream(info));
|
||
|
|
||
|
try {
|
||
|
int len = data.readUnsignedByte();
|
||
|
for(int i=0;i<len;i++) {
|
||
|
List<AnnotationExprent> lst = new ArrayList<AnnotationExprent>();
|
||
|
int annsize = data.readUnsignedShort();
|
||
|
|
||
|
for(int j=0;j<annsize;j++) {
|
||
|
lst.add(StructAnnotationAttribute.parseAnnotation(data, pool));
|
||
|
}
|
||
|
paramAnnotations.add(lst);
|
||
|
}
|
||
|
} catch(IOException ex) {
|
||
|
throw new RuntimeException(ex);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
public List<List<AnnotationExprent>> getParamAnnotations() {
|
||
|
return paramAnnotations;
|
||
|
}
|
||
|
}
|