Examples of ElementValue


Examples of net.sf.rej.java.attribute.annotations.ElementValue

              if (entry.getKey().equals("value") && elementValues.size() == 1) {
                // only one element, named "value", don't show the display name, just show the value
              } else {
                sd.drawDefault(entry.getKey() + "=");
              }
              ElementValue ev = entry.getValue();
              drawElementValue(sd, ev, ia);
            }
            sd.drawDefault(")");
          }
        } else if (er instanceof MethodDefRow) {
View Full Code Here

Examples of org.apache.bcel.classfile.ElementValue

        } else {
            return;
        }
        JCIPAnnotationDatabase annotationDatabase = AnalysisContext.currentAnalysisContext()
                .getJCIPAnnotationDatabase();
        ElementValue value = map.get("value");
        ClassMember member;
        if (visitingField()) {
            member = XFactory.createXField(this);
        } else if (visitingMethod()) {
            member = XFactory.createXMethod(this);
View Full Code Here

Examples of org.apache.bcel.classfile.ElementValue

                Target annotationTarget = defaultKind.get(annotationClass);
                if (annotationTarget != Target.METHOD) {
                    return;
                }

                ElementValue v = map.get("value");
                if (v instanceof ClassElementValue) {
                    handleClassElementValue((ClassElementValue) v, annotationTarget);
                } else if (v instanceof ArrayElementValue) {
                    for (ElementValue v2 : ((ArrayElementValue) v).getElementValuesArray()) {
                        if (v2 instanceof ClassElementValue) {
View Full Code Here

Examples of org.apache.bcel.classfile.ElementValue

            Target annotationTarget = defaultKind.get(annotationClassSimpleName);
            if (annotationTarget != Target.METHOD) {
                return;
            }

            ElementValue v = map.get("value");
            if (v instanceof ClassElementValue) {
                handleClassElementValue((ClassElementValue) v, map, annotationTarget);
            } else if (v instanceof ArrayElementValue) {
                for (ElementValue v2 : ((ArrayElementValue) v).getElementValuesArray()) {
                    if (v2 instanceof ClassElementValue) {
                        handleClassElementValue((ClassElementValue) v2, map, annotationTarget);
                    }
                }
            }

            return;
        }

        CheckReturnValueAnnotation n;

        if (annotationClassName.equals(javax.annotation.CheckReturnValue.class.getName())) {
            ElementValue v = map.get("when");
            if (v instanceof EnumElementValue) {
                EnumElementValue when = (EnumElementValue) v;
                String w = simpleClassName(when.getEnumValueString());
                if (w.equals("NEVER") || w.equals("UNKNOWN")) {
                    n = CheckReturnValueAnnotation.CHECK_RETURN_VALUE_IGNORE;
View Full Code Here

Examples of org.apache.bcel.classfile.ElementValue

            }
            boolean notThreadSafe = jcipAnotationDatabase.hasClassAnnotation(xfield.getClassName(), "NotThreadSafe");
            if (notThreadSafe) {
                continue;
            }
            ElementValue guardedByValue = jcipAnotationDatabase.getFieldAnnotation(xfield, "GuardedBy");
            boolean guardedByThis;
            if(guardedByValue != null){
                guardedByThis = guardedByValue.stringifyValue().equals("this");
            } else {
                guardedByThis = false;
            }
            boolean threadSafe = jcipAnotationDatabase.hasClassAnnotation(xfield.getClassName(), "ThreadSafe");
View Full Code Here

Examples of org.apache.bcel.classfile.ElementValue

        }
    }

    protected static String getAnnotationParameterAsString(Map<String, ElementValue> map, String parameter) {
        try {
            ElementValue ev = map.get(parameter);

            if (ev instanceof SimpleElementValue) {
                return ((SimpleElementValue) ev).getValueString();
            }
            return null;
View Full Code Here

Examples of org.apache.bcel.classfile.ElementValue

    @CheckForNull
    @SuppressFBWarnings("PZLA_PREFER_ZERO_LENGTH_ARRAYS")
    protected static String[] getAnnotationParameterAsStringArray(Map<String, ElementValue> map, String parameter) {
        try {
            ElementValue e = map.get(parameter);
            ArrayElementValue a = (ArrayElementValue) e;
            int size = a.getElementValuesArraySize();
            String[] result = new String[size];
            ElementValue[] elementValuesArray = a.getElementValuesArray();
            for (int i = 0; i < size; i++) {
View Full Code Here

Examples of org.apache.bcel.classfile.ElementValue

  /**
   * Retrieve an immutable version of this ElementNameValuePairGen
   */
  public ElementValuePair getElementNameValuePair()
  {
    ElementValue immutableValue = value.getElementValue();
    return new ElementValuePair(nameIdx, immutableValue, cpool
        .getConstantPool());
  }
View Full Code Here

Examples of org.apache.harmony.pack200.bytecode.AnnotationsAttribute.ElementValue

                    for (int i = 0; i < param_NB.length; i++) {
                        attributes.add(getParameterAttribute(param_NB[i], name_RU_Iterator));
                    }
                } else { // type.equals("AD")
                    for (int i = 0; i < T.length; i++) {
                        attributes.add(new AnnotationDefaultAttribute(new ElementValue(T[i], getNextValue(T[i]))));
                    }
                }
            }
        }
        return attributes;
View Full Code Here

Examples of org.apache.harmony.pack200.bytecode.AnnotationsAttribute.ElementValue

        CPUTF8[] elementNames = new CPUTF8[pairCount];
        ElementValue[] elementValues = new ElementValue[pairCount];
        for (int j = 0; j < elementNames.length; j++) {
           elementNames[j] = (CPUTF8) namesIterator.next();
           int t = ((Integer)T_iterator.next()).intValue();
           elementValues[j] = new ElementValue(t, getNextValue(t));
        }
        return new Annotation(pairCount, type, elementNames, elementValues);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.