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

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

本文整理了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

public IMemberValuePair[] getMemberValuePairs() throws JavaModelException {
  Object info = getElementInfo();
  if (info instanceof AnnotationInfo)
    return ((AnnotationInfo) info).members;
  IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs();
  int length = binaryAnnotations.length;
  IMemberValuePair[] result = new IMemberValuePair[length];
  for (int i = 0; i < length; i++) {
    IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i];
    MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName()));
    memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue());
    result[i] = memberValuePair;
  }
  return result;
}

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

public IMemberValuePair[] getMemberValuePairs() throws JavaModelException {
  Object info = getElementInfo();
  if (info instanceof AnnotationInfo)
    return ((AnnotationInfo) info).members;
  IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs();
  int length = binaryAnnotations.length;
  IMemberValuePair[] result = new IMemberValuePair[length];
  for (int i = 0; i < length; i++) {
    IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i];
    MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName()));
    memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue());
    result[i] = memberValuePair;
  }
  return result;
}

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

public IMemberValuePair[] getMemberValuePairs() throws JavaModelException {
  Object info = getElementInfo();
  if (info instanceof AnnotationInfo)
    return ((AnnotationInfo) info).members;
  IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs();
  int length = binaryAnnotations.length;
  IMemberValuePair[] result = new IMemberValuePair[length];
  for (int i = 0; i < length; i++) {
    IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i];
    MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName()));
    memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue());
    result[i] = memberValuePair;
  }
  return result;
}

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

public IMemberValuePair[] getMemberValuePairs() throws JavaModelException {
  Object info = getElementInfo();
  if (info instanceof AnnotationInfo)
    return ((AnnotationInfo) info).members;
  IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs();
  int length = binaryAnnotations.length;
  IMemberValuePair[] result = new IMemberValuePair[length];
  for (int i = 0; i < length; i++) {
    IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i];
    MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName()));
    memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue());
    result[i] = memberValuePair;
  }
  return result;
}

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

@Override
public IMemberValuePair[] getMemberValuePairs() throws JavaModelException {
  Object info = getElementInfo();
  if (info instanceof AnnotationInfo)
    return ((AnnotationInfo) info).members;
  IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs();
  int length = binaryAnnotations.length;
  IMemberValuePair[] result = new IMemberValuePair[length];
  for (int i = 0; i < length; i++) {
    IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i];
    MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName()));
    memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue());
    result[i] = memberValuePair;
  }
  return result;
}

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

public IMemberValuePair[] getMemberValuePairs() throws JavaModelException {
  Object info = getElementInfo();
  if (info instanceof AnnotationInfo)
    return ((AnnotationInfo) info).members;
  IBinaryElementValuePair[] binaryAnnotations = ((IBinaryAnnotation) info).getElementValuePairs();
  int length = binaryAnnotations.length;
  IMemberValuePair[] result = new IMemberValuePair[length];
  for (int i = 0; i < length; i++) {
    IBinaryElementValuePair binaryAnnotation = binaryAnnotations[i];
    MemberValuePair memberValuePair = new MemberValuePair(new String(binaryAnnotation.getName()));
    memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, binaryAnnotation.getValue());
    result[i] = memberValuePair;
  }
  return result;
}

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

public IMemberValuePair getDefaultValue() throws JavaModelException {
  IBinaryMethod info = (IBinaryMethod) getElementInfo();
  Object defaultValue = info.getDefaultValue();
  if (defaultValue == null)
    return null;
  MemberValuePair memberValuePair = new MemberValuePair(getElementName());
  memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, defaultValue);
  return memberValuePair;
}
/*

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

@Override
public IMemberValuePair getDefaultValue() throws JavaModelException {
  IBinaryMethod info = (IBinaryMethod) getElementInfo();
  Object defaultValue = info.getDefaultValue();
  if (defaultValue == null)
    return null;
  MemberValuePair memberValuePair = new MemberValuePair(getElementName());
  memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, defaultValue);
  return memberValuePair;
}
/*

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

public IMemberValuePair getDefaultValue() throws JavaModelException {
  IBinaryMethod info = (IBinaryMethod) getElementInfo();
  Object defaultValue = info.getDefaultValue();
  if (defaultValue == null)
    return null;
  MemberValuePair memberValuePair = new MemberValuePair(getElementName());
  memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, defaultValue);
  return memberValuePair;
}
/*

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

public IMemberValuePair getDefaultValue() throws JavaModelException {
  IBinaryMethod info = (IBinaryMethod) getElementInfo();
  Object defaultValue = info.getDefaultValue();
  if (defaultValue == null)
    return null;
  MemberValuePair memberValuePair = new MemberValuePair(getElementName());
  memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, defaultValue);
  return memberValuePair;
}
/*

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

public IMemberValuePair getDefaultValue() throws JavaModelException {
  IBinaryMethod info = (IBinaryMethod) getElementInfo();
  Object defaultValue = info.getDefaultValue();
  if (defaultValue == null)
    return null;
  MemberValuePair memberValuePair = new MemberValuePair(getElementName());
  memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, defaultValue);
  return memberValuePair;
}
/*

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

public IMemberValuePair getDefaultValue() throws JavaModelException {
  IBinaryMethod info = (IBinaryMethod) getElementInfo();
  Object defaultValue = info.getDefaultValue();
  if (defaultValue == null)
    return null;
  MemberValuePair memberValuePair = new MemberValuePair(getElementName());
  memberValuePair.value = Util.getAnnotationMemberValue(this, memberValuePair, defaultValue);
  return memberValuePair;
}
/*

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

相关文章

Util类方法