Search in sources :

Example 31 with Annotation

use of com.android.dx.rop.annotation.Annotation in project J2ME-Loader by nikita36078.

the class AnnotationUtils method makeAnnotationDefault.

/**
 * Constructs a standard {@code AnnotationDefault} annotation.
 *
 * @param defaults {@code non-null;} the defaults, itself as an annotation
 * @return {@code non-null;} the constructed annotation
 */
public static Annotation makeAnnotationDefault(Annotation defaults) {
    Annotation result = new Annotation(ANNOTATION_DEFAULT_TYPE, SYSTEM);
    result.put(new NameValuePair(VALUE_STRING, new CstAnnotation(defaults)));
    result.setImmutable();
    return result;
}
Also used : NameValuePair(com.android.dx.rop.annotation.NameValuePair) CstAnnotation(com.android.dx.rop.cst.CstAnnotation) Annotation(com.android.dx.rop.annotation.Annotation) CstAnnotation(com.android.dx.rop.cst.CstAnnotation)

Example 32 with Annotation

use of com.android.dx.rop.annotation.Annotation in project J2ME-Loader by nikita36078.

the class AnnotationUtils method makeSourceDebugExtension.

/**
 * Constructs a standard {@code SourceDebugExtension} annotation.
 *
 * @param smapString {@code non-null;} the SMAP string associated with
 * @return {@code non-null;} the annotation
 */
public static Annotation makeSourceDebugExtension(CstString smapString) {
    Annotation result = new Annotation(SOURCE_DEBUG_EXTENSION_TYPE, SYSTEM);
    result.put(new NameValuePair(VALUE_STRING, smapString));
    result.setImmutable();
    return result;
}
Also used : NameValuePair(com.android.dx.rop.annotation.NameValuePair) Annotation(com.android.dx.rop.annotation.Annotation) CstAnnotation(com.android.dx.rop.cst.CstAnnotation)

Aggregations

Annotation (com.android.dx.rop.annotation.Annotation)32 CstAnnotation (com.android.dx.rop.cst.CstAnnotation)21 NameValuePair (com.android.dx.rop.annotation.NameValuePair)19 Annotations (com.android.dx.rop.annotation.Annotations)10 CstArray (com.android.dx.rop.cst.CstArray)8 CstString (com.android.dx.rop.cst.CstString)8 CstType (com.android.dx.rop.cst.CstType)8 AttRuntimeInvisibleAnnotations (com.android.dx.cf.attrib.AttRuntimeInvisibleAnnotations)6 AttRuntimeInvisibleParameterAnnotations (com.android.dx.cf.attrib.AttRuntimeInvisibleParameterAnnotations)6 AttRuntimeVisibleAnnotations (com.android.dx.cf.attrib.AttRuntimeVisibleAnnotations)6 AttRuntimeVisibleParameterAnnotations (com.android.dx.cf.attrib.AttRuntimeVisibleParameterAnnotations)6 AttributeList (com.android.dx.cf.iface.AttributeList)4 AnnotationsList (com.android.dx.rop.annotation.AnnotationsList)4 CstNat (com.android.dx.rop.cst.CstNat)4 TypeList (com.android.dx.rop.type.TypeList)4 AttAnnotationDefault (com.android.dx.cf.attrib.AttAnnotationDefault)2 AttEnclosingMethod (com.android.dx.cf.attrib.AttEnclosingMethod)2 Method (com.android.dx.cf.iface.Method)2 MethodList (com.android.dx.cf.iface.MethodList)2 ParseException (com.android.dx.cf.iface.ParseException)2