org.eclipse.jdt.internal.core.util.Util.getAnnotationMemberValue()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(12.0k)|赞(0)|评价(0)|浏览(180)

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

Util.getAnnotationMemberValue介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

  1. public IMemberValuePair[] getMemberValuePairs() throws JavaModelException {
  2. Object info = getElementInfo();
  3. if (info instanceof AnnotationInfo)
  4. return ((AnnotationInfo) info).members;
  5. IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs();
  6. int length = binaryAnnotations.length;
  7. IMemberValuePair[] result = new IMemberValuePair[length];
  8. for (int i = 0; i < length; i++) {
  9. IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i];
  10. MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName()));
  11. memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue());
  12. result[i] = memberValuePair;
  13. }
  14. return result;
  15. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

  1. public IMemberValuePair[] getMemberValuePairs() throws JavaModelException {
  2. Object info = getElementInfo();
  3. if (info instanceof AnnotationInfo)
  4. return ((AnnotationInfo) info).members;
  5. IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs();
  6. int length = binaryAnnotations.length;
  7. IMemberValuePair[] result = new IMemberValuePair[length];
  8. for (int i = 0; i < length; i++) {
  9. IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i];
  10. MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName()));
  11. memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue());
  12. result[i] = memberValuePair;
  13. }
  14. return result;
  15. }

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

  1. public IMemberValuePair[] getMemberValuePairs() throws JavaModelException {
  2. Object info = getElementInfo();
  3. if (info instanceof AnnotationInfo)
  4. return ((AnnotationInfo) info).members;
  5. IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs();
  6. int length = binaryAnnotations.length;
  7. IMemberValuePair[] result = new IMemberValuePair[length];
  8. for (int i = 0; i < length; i++) {
  9. IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i];
  10. MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName()));
  11. memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue());
  12. result[i] = memberValuePair;
  13. }
  14. return result;
  15. }

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

  1. public IMemberValuePair[] getMemberValuePairs() throws JavaModelException {
  2. Object info = getElementInfo();
  3. if (info instanceof AnnotationInfo)
  4. return ((AnnotationInfo) info).members;
  5. IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs();
  6. int length = binaryAnnotations.length;
  7. IMemberValuePair[] result = new IMemberValuePair[length];
  8. for (int i = 0; i < length; i++) {
  9. IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i];
  10. MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName()));
  11. memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue());
  12. result[i] = memberValuePair;
  13. }
  14. return result;
  15. }

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

  1. @Override
  2. public IMemberValuePair[] getMemberValuePairs() throws JavaModelException {
  3. Object info = getElementInfo();
  4. if (info instanceof AnnotationInfo)
  5. return ((AnnotationInfo) info).members;
  6. IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs();
  7. int length = binaryAnnotations.length;
  8. IMemberValuePair[] result = new IMemberValuePair[length];
  9. for (int i = 0; i < length; i++) {
  10. IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i];
  11. MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName()));
  12. memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue());
  13. result[i] = memberValuePair;
  14. }
  15. return result;
  16. }

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

  1. public IMemberValuePair[] getMemberValuePairs() throws JavaModelException {
  2. Object info = getElementInfo();
  3. if (info instanceof AnnotationInfo)
  4. return ((AnnotationInfo) info).members;
  5. IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs();
  6. int length = binaryAnnotations.length;
  7. IMemberValuePair[] result = new IMemberValuePair[length];
  8. for (int i = 0; i < length; i++) {
  9. IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i];
  10. MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName()));
  11. memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue());
  12. result[i] = memberValuePair;
  13. }
  14. return result;
  15. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

  1. public IMemberValuePair getDefaultValue() throws JavaModelException {
  2. IBinaryMethod info = (IBinaryMethod) getElementInfo();
  3. Object defaultValue = info.getDefaultValue();
  4. if (defaultValue == null)
  5. return null;
  6. MemberValuePair memberValuePair = new MemberValuePair(getElementName());
  7. memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, defaultValue);
  8. return memberValuePair;
  9. }
  10. /*

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

  1. @Override
  2. public IMemberValuePair getDefaultValue() throws JavaModelException {
  3. IBinaryMethod info = (IBinaryMethod) getElementInfo();
  4. Object defaultValue = info.getDefaultValue();
  5. if (defaultValue == null)
  6. return null;
  7. MemberValuePair memberValuePair = new MemberValuePair(getElementName());
  8. memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, defaultValue);
  9. return memberValuePair;
  10. }
  11. /*

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

  1. public IMemberValuePair getDefaultValue() throws JavaModelException {
  2. IBinaryMethod info = (IBinaryMethod) getElementInfo();
  3. Object defaultValue = info.getDefaultValue();
  4. if (defaultValue == null)
  5. return null;
  6. MemberValuePair memberValuePair = new MemberValuePair(getElementName());
  7. memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, defaultValue);
  8. return memberValuePair;
  9. }
  10. /*

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

  1. public IMemberValuePair getDefaultValue() throws JavaModelException {
  2. IBinaryMethod info = (IBinaryMethod) getElementInfo();
  3. Object defaultValue = info.getDefaultValue();
  4. if (defaultValue == null)
  5. return null;
  6. MemberValuePair memberValuePair = new MemberValuePair(getElementName());
  7. memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, defaultValue);
  8. return memberValuePair;
  9. }
  10. /*

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

  1. public IMemberValuePair getDefaultValue() throws JavaModelException {
  2. IBinaryMethod info = (IBinaryMethod) getElementInfo();
  3. Object defaultValue = info.getDefaultValue();
  4. if (defaultValue == null)
  5. return null;
  6. MemberValuePair memberValuePair = new MemberValuePair(getElementName());
  7. memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, defaultValue);
  8. return memberValuePair;
  9. }
  10. /*

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

  1. public IMemberValuePair getDefaultValue() throws JavaModelException {
  2. IBinaryMethod info = (IBinaryMethod) getElementInfo();
  3. Object defaultValue = info.getDefaultValue();
  4. if (defaultValue == null)
  5. return null;
  6. MemberValuePair memberValuePair = new MemberValuePair(getElementName());
  7. memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, defaultValue);
  8. return memberValuePair;
  9. }
  10. /*

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

  1. public static Object getAnnotationMemberValue(JavaElement parent, MemberValuePair memberValuePair, Object binaryValue) {
  2. if (binaryValue instanceof Constant) {
  3. return getAnnotationMemberValue(memberValuePair, (Constant) binaryValue);
  4. } else if (binaryValue instanceof IBinaryAnnotation) {
  5. memberValuePair.valueKind = IMemberValuePair.K_ANNOTATION;
  6. for (int i = 0; i < length; i++) {
  7. int previousValueKind = memberValuePair.valueKind;
  8. Object value = getAnnotationMemberValue(parent, memberValuePair, binaryValues[i]);
  9. if (previousValueKind != -1 && memberValuePair.valueKind != previousValueKind) {

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

  1. } else if (expression instanceof Literal) {
  2. ((Literal) expression).computeConstant();
  3. return Util.getAnnotationMemberValue(memberValuePair, expression.constant);
  4. } else if (expression instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) {
  5. memberValuePair.valueKind = IMemberValuePair.K_ANNOTATION;

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

  1. public static Object getAnnotationMemberValue(JavaElement parent, MemberValuePair memberValuePair, Object binaryValue) {
  2. if (binaryValue instanceof Constant) {
  3. return getAnnotationMemberValue(memberValuePair, (Constant) binaryValue);
  4. } else if (binaryValue instanceof IBinaryAnnotation) {
  5. memberValuePair.valueKind = IMemberValuePair.K_ANNOTATION;
  6. for (int i = 0; i < length; i++) {
  7. int previousValueKind = memberValuePair.valueKind;
  8. Object value = getAnnotationMemberValue(parent, memberValuePair, binaryValues[i]);
  9. if (previousValueKind != -1 && memberValuePair.valueKind != previousValueKind) {

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

  1. public static Object getAnnotationMemberValue(JavaElement parent, MemberValuePair memberValuePair, Object binaryValue) {
  2. if (binaryValue instanceof Constant) {
  3. return getAnnotationMemberValue(memberValuePair, (Constant) binaryValue);
  4. } else if (binaryValue instanceof IBinaryAnnotation) {
  5. memberValuePair.valueKind = IMemberValuePair.K_ANNOTATION;
  6. for (int i = 0; i < length; i++) {
  7. int previousValueKind = memberValuePair.valueKind;
  8. Object value = getAnnotationMemberValue(parent, memberValuePair, binaryValues[i]);
  9. if (previousValueKind != -1 && memberValuePair.valueKind != previousValueKind) {

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

  1. public static Object getAnnotationMemberValue(JavaElement parent, MemberValuePair memberValuePair, Object binaryValue) {
  2. if (binaryValue instanceof Constant) {
  3. return getAnnotationMemberValue(memberValuePair, (Constant) binaryValue);
  4. } else if (binaryValue instanceof IBinaryAnnotation) {
  5. memberValuePair.valueKind = IMemberValuePair.K_ANNOTATION;
  6. for (int i = 0; i < length; i++) {
  7. int previousValueKind = memberValuePair.valueKind;
  8. Object value = getAnnotationMemberValue(parent, memberValuePair, binaryValues[i]);
  9. if (previousValueKind != -1 && memberValuePair.valueKind != previousValueKind) {

代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps

  1. public static Object getAnnotationMemberValue(JavaElement parent, MemberValuePair memberValuePair, Object binaryValue) {
  2. if (binaryValue instanceof Constant) {
  3. return getAnnotationMemberValue(memberValuePair, (Constant) binaryValue);
  4. } else if (binaryValue instanceof IBinaryAnnotation) {
  5. memberValuePair.valueKind = IMemberValuePair.K_ANNOTATION;
  6. for (int i = 0; i < length; i++) {
  7. int previousValueKind = memberValuePair.valueKind;
  8. Object value = getAnnotationMemberValue(parent, memberValuePair, binaryValues[i]);
  9. if (previousValueKind != -1 && memberValuePair.valueKind != previousValueKind) {

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

  1. public static Object getAnnotationMemberValue(JavaElement parent, MemberValuePair memberValuePair, Object binaryValue) {
  2. if (binaryValue instanceof Constant) {
  3. return getAnnotationMemberValue(memberValuePair, (Constant) binaryValue);
  4. } else if (binaryValue instanceof IBinaryAnnotation) {
  5. memberValuePair.valueKind = IMemberValuePair.K_ANNOTATION;
  6. for (int i = 0; i < length; i++) {
  7. int previousValueKind = memberValuePair.valueKind;
  8. Object value = getAnnotationMemberValue(parent, memberValuePair, binaryValues[i]);
  9. if (previousValueKind != -1 && memberValuePair.valueKind != previousValueKind) {

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

  1. public static Object getAnnotationMemberValue(JavaElement parent, MemberValuePair memberValuePair, Object binaryValue) {
  2. if (binaryValue instanceof Constant) {
  3. return getAnnotationMemberValue(memberValuePair, (Constant) binaryValue);
  4. } else if (binaryValue instanceof IBinaryAnnotation) {
  5. memberValuePair.valueKind = IMemberValuePair.K_ANNOTATION;
  6. for (int i = 0; i < length; i++) {
  7. int previousValueKind = memberValuePair.valueKind;
  8. Object value = getAnnotationMemberValue(parent, memberValuePair, binaryValues[i]);
  9. if (previousValueKind != -1 && memberValuePair.valueKind != previousValueKind) {

相关文章

Util类方法