本文整理汇总了Java中org.jf.dexlib.EncodedValue.AnnotationEncodedSubValue类的典型用法代码示例。如果您正苦于以下问题:Java AnnotationEncodedSubValue类的具体用法?Java AnnotationEncodedSubValue怎么用?Java AnnotationEncodedSubValue使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AnnotationEncodedSubValue类属于org.jf.dexlib.EncodedValue包,在下文中一共展示了AnnotationEncodedSubValue类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AnnotationItem
import org.jf.dexlib.EncodedValue.AnnotationEncodedSubValue; //导入依赖的package包/类
/**
* Creates a new <code>AnnotationItem</code> with the given values
* @param dexFile The <code>DexFile</code> that this item belongs to
* @param visibility The visibility of this annotation
* @param annotationValue The value of this annotation
*/
private AnnotationItem(DexFile dexFile, AnnotationVisibility visibility,
AnnotationEncodedSubValue annotationValue) {
super(dexFile);
this.visibility = visibility;
this.annotationValue = annotationValue;
}
示例2: writeTo
import org.jf.dexlib.EncodedValue.AnnotationEncodedSubValue; //导入依赖的package包/类
public static void writeTo(IndentingWriter writer, AnnotationEncodedSubValue encodedAnnotation)
throws IOException {
writer.write(".subannotation ");
ReferenceFormatter.writeTypeReference(writer, encodedAnnotation.annotationType);
writer.write('\n');
writeElementsTo(writer, encodedAnnotation);
writer.write(".end subannotation");
}
示例3: writeElementsTo
import org.jf.dexlib.EncodedValue.AnnotationEncodedSubValue; //导入依赖的package包/类
public static void writeElementsTo(IndentingWriter writer, AnnotationEncodedSubValue encodedAnnotation)
throws IOException {
writer.indent(4);
for (int i=0; i<encodedAnnotation.names.length; i++) {
writer.write(encodedAnnotation.names[i].getStringValue());
writer.write(" = ");
EncodedValueAdaptor.writeTo(writer, encodedAnnotation.values[i]);
writer.write('\n');
}
writer.deindent(4);
}
示例4: readItem
import org.jf.dexlib.EncodedValue.AnnotationEncodedSubValue; //导入依赖的package包/类
/** {@inheritDoc} */
protected void readItem(Input in, ReadContext readContext) {
visibility = AnnotationVisibility.fromByte(in.readByte());
annotationValue = new AnnotationEncodedSubValue(dexFile, in);
}
示例5: getEncodedAnnotation
import org.jf.dexlib.EncodedValue.AnnotationEncodedSubValue; //导入依赖的package包/类
/**
* @return The encoded annotation value of this annotation
*/
public AnnotationEncodedSubValue getEncodedAnnotation() {
return annotationValue;
}
示例6: internAnnotationItem
import org.jf.dexlib.EncodedValue.AnnotationEncodedSubValue; //导入依赖的package包/类
/**
* Returns an <code>AnnotationItem</code> for the given values, and that has been interned into the given
* <code>DexFile</code>
* @param dexFile The <code>DexFile</code> that this item belongs to
* @param visibility The visibility of this annotation
* @param annotationValue The value of this annotation
* @return an <code>AnnotationItem</code> for the given values, and that has been interned into the given
* <code>DexFile</code>
*/
public static AnnotationItem internAnnotationItem(DexFile dexFile, AnnotationVisibility visibility,
AnnotationEncodedSubValue annotationValue) {
AnnotationItem annotationItem = new AnnotationItem(dexFile, visibility, annotationValue);
return dexFile.AnnotationsSection.intern(annotationItem);
}
示例7: getInternedAnnotationItem
import org.jf.dexlib.EncodedValue.AnnotationEncodedSubValue; //导入依赖的package包/类
/**
* Returns an <code>AnnotationItem</code> for the given values, and that has been interned into the given
* <code>DexFile</code>
* @param dexFile The <code>DexFile</code> that this item belongs to
* @param visibility The visibility of this annotation
* @param annotationValue The value of this annotation
* @return an <code>AnnotationItem</code> for the given values, and that has been interned into the given
* <code>DexFile</code>
*/
public static AnnotationItem getInternedAnnotationItem(DexFile dexFile, AnnotationVisibility visibility,
AnnotationEncodedSubValue annotationValue) {
AnnotationItem annotationItem = new AnnotationItem(dexFile, visibility, annotationValue);
return dexFile.AnnotationsSection.intern(annotationItem);
}