本文整理了Java中com.android.dx.rop.annotation.NameValuePair.<init>()
方法的一些代码示例,展示了NameValuePair.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NameValuePair.<init>()
方法的具体详情如下:
包路径:com.android.dx.rop.annotation.NameValuePair
类名称:NameValuePair
方法名:<init>
[英]Construct an instance.
[中]构造一个实例。
代码示例来源:origin: linkedin/dexmaker
/**
* Set an annotation element of this instance.
* If there is a preexisting element with the same name, it will be
* replaced by this method.
*
* @param element {@code non-null;} the annotation element to be set.
*/
public void set(Element element) {
if (element == null) {
throw new NullPointerException("element == null");
}
CstString pairName = new CstString(element.getName());
Constant pairValue = Element.toConstant(element.getValue());
NameValuePair nameValuePair = new NameValuePair(pairName, pairValue);
elements.put(element.getName(), nameValuePair);
}
代码示例来源: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 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/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.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 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: 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.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: 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: 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: 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: 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: 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;
}
内容来源于网络,如有侵权,请联系作者删除!