com.android.dx.rop.annotation.Annotation.put()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(8.6k)|赞(0)|评价(0)|浏览(88)

本文整理了Java中com.android.dx.rop.annotation.Annotation.put()方法的一些代码示例,展示了Annotation.put()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Annotation.put()方法的具体详情如下:
包路径:com.android.dx.rop.annotation.Annotation
类名称:Annotation
方法名:put

Annotation.put介绍

[英]Put an element into the set of (name, value) pairs for this instance. If there is a preexisting element with the same name, it will be replaced by this method.
[中]将元素放入此实例的(名称、值)对集中。如果存在具有相同名称的先前存在的元素,则该元素将被此方法替换。

代码示例

代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx

/**
 * 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;
}

代码示例来源:origin: dragome/dragome-sdk

/**
 * Constructs a standard {@code EnclosingMethod} annotation.
 * 
 * @param method {@code non-null;} the enclosing method
 * @return {@code non-null;} the annotation
 */
public static Annotation makeEnclosingMethod(CstMethodRef method) {
  Annotation result = new Annotation(ENCLOSING_METHOD_TYPE, SYSTEM);
  result.put(new NameValuePair(VALUE_UTF, method));
  result.setImmutable();
  return result;
}

代码示例来源:origin: nikita36078/J2ME-Loader

/**
 * Constructs a standard {@code EnclosingMethod} annotation.
 *
 * @param method {@code non-null;} the enclosing method
 * @return {@code non-null;} the annotation
 */
public static Annotation makeEnclosingMethod(CstMethodRef method) {
  Annotation result = new Annotation(ENCLOSING_METHOD_TYPE, SYSTEM);
  result.put(new NameValuePair(VALUE_STRING, method));
  result.setImmutable();
  return result;
}

代码示例来源:origin: com.android.tools.build/builder

/**
 * Constructs a standard {@code EnclosingClass} annotation.
 *
 * @param clazz {@code non-null;} the enclosing class
 * @return {@code non-null;} the annotation
 */
public static Annotation makeEnclosingClass(CstType clazz) {
  Annotation result = new Annotation(ENCLOSING_CLASS_TYPE, SYSTEM);
  result.put(new NameValuePair(VALUE_STRING, clazz));
  result.setImmutable();
  return result;
}

代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx

/**
 * Constructs a standard {@code EnclosingClass} annotation.
 *
 * @param clazz {@code non-null;} the enclosing class
 * @return {@code non-null;} the annotation
 */
public static Annotation makeEnclosingClass(CstType clazz) {
  Annotation result = new Annotation(ENCLOSING_CLASS_TYPE, SYSTEM);
  result.put(new NameValuePair(VALUE_STRING, clazz));
  result.setImmutable();
  return result;
}

代码示例来源:origin: com.android/dx

/**
 * Constructs a standard {@code EnclosingMethod} annotation.
 *
 * @param method {@code non-null;} the enclosing method
 * @return {@code non-null;} the annotation
 */
public static Annotation makeEnclosingMethod(CstMethodRef method) {
  Annotation result = new Annotation(ENCLOSING_METHOD_TYPE, SYSTEM);
  result.put(new NameValuePair(VALUE_STRING, method));
  result.setImmutable();
  return result;
}

代码示例来源:origin: nikita36078/J2ME-Loader

/**
 * 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;
}

代码示例来源:origin: com.android.tools.build/builder

/**
 * Constructs a standard {@code EnclosingMethod} annotation.
 *
 * @param method {@code non-null;} the enclosing method
 * @return {@code non-null;} the annotation
 */
public static Annotation makeEnclosingMethod(CstMethodRef method) {
  Annotation result = new Annotation(ENCLOSING_METHOD_TYPE, SYSTEM);
  result.put(new NameValuePair(VALUE_STRING, method));
  result.setImmutable();
  return result;
}

代码示例来源:origin: com.android/dx

/**
 * Constructs a standard {@code EnclosingClass} annotation.
 *
 * @param clazz {@code non-null;} the enclosing class
 * @return {@code non-null;} the annotation
 */
public static Annotation makeEnclosingClass(CstType clazz) {
  Annotation result = new Annotation(ENCLOSING_CLASS_TYPE, SYSTEM);
  result.put(new NameValuePair(VALUE_STRING, clazz));
  result.setImmutable();
  return result;
}

代码示例来源:origin: nikita36078/J2ME-Loader

/**
 * Constructs a standard {@code EnclosingClass} annotation.
 *
 * @param clazz {@code non-null;} the enclosing class
 * @return {@code non-null;} the annotation
 */
public static Annotation makeEnclosingClass(CstType clazz) {
  Annotation result = new Annotation(ENCLOSING_CLASS_TYPE, SYSTEM);
  result.put(new NameValuePair(VALUE_STRING, clazz));
  result.setImmutable();
  return result;
}

代码示例来源:origin: com.google.android.tools/dx

/**
 * Constructs a standard {@code EnclosingMethod} annotation.
 *
 * @param method {@code non-null;} the enclosing method
 * @return {@code non-null;} the annotation
 */
public static Annotation makeEnclosingMethod(CstMethodRef method) {
  Annotation result = new Annotation(ENCLOSING_METHOD_TYPE, SYSTEM);
  result.put(new NameValuePair(VALUE_STRING, method));
  result.setImmutable();
  return result;
}

代码示例来源:origin: dragome/dragome-sdk

/**
 * Constructs a standard {@code EnclosingClass} annotation.
 * 
 * @param clazz {@code non-null;} the enclosing class
 * @return {@code non-null;} the annotation
 */
public static Annotation makeEnclosingClass(CstType clazz) {
  Annotation result = new Annotation(ENCLOSING_CLASS_TYPE, SYSTEM);
  result.put(new NameValuePair(VALUE_UTF, clazz));
  result.setImmutable();
  return result;
}

代码示例来源:origin: com.android/dx

/**
 * Constructs a standard {@code Throws} annotation.
 *
 * @param types {@code non-null;} the list of thrown types
 * @return {@code non-null;} the annotation
 */
public static Annotation makeThrows(TypeList types) {
  CstArray array = makeCstArray(types);
  Annotation result = new Annotation(THROWS_TYPE, SYSTEM);
  result.put(new NameValuePair(VALUE_STRING, array));
  result.setImmutable();
  return result;
}

代码示例来源:origin: dragome/dragome-sdk

/**
 * Constructs a standard {@code MemberClasses} annotation.
 * 
 * @param types {@code non-null;} the list of (the types of) the member classes
 * @return {@code non-null;} the annotation
 */
public static Annotation makeMemberClasses(TypeList types) {
  CstArray array = makeCstArray(types);
  Annotation result = new Annotation(MEMBER_CLASSES_TYPE, SYSTEM);
  result.put(new NameValuePair(VALUE_UTF, array));
  result.setImmutable();
  return result;
}

代码示例来源:origin: com.google.android.tools/dx

/**
 * 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;
}

代码示例来源:origin: com.android/dx

/**
 * 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;
}

代码示例来源:origin: nikita36078/J2ME-Loader

/**
 * 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;
}

代码示例来源:origin: gdpancheng/LoonAndroid3

/**
 * 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;
}

代码示例来源:origin: com.google.dexmaker/dexmaker-dx

/**
 * 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;
}

代码示例来源:origin: dragome/dragome-sdk

/**
 * 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_UTF, new CstAnnotation(defaults)));
  result.setImmutable();
  return result;
}

相关文章