Examples of AnnotationValue


Examples of com.bacoder.parser.java.api.AnnotationValue

      annotation.setValues(elementValuePairs);
    }

    ElementValueContext elementValueContext = getChild(context, ElementValueContext.class);
    if (elementValueContext != null) {
      AnnotationValue elementValue =
          getAdapter(ElementValueAdapter.class).adapt(elementValueContext);
      annotation.setValue(elementValue);
    }

    return annotation;
View Full Code Here

Examples of com.dubture.doctrine.annotation.model.AnnotationValue

        assertEquals("join_table_name", annotation.getArgument("name"));
        assertEquals(ArgumentValueType.ARRAY, annotation.getArgumentValue("joinColumns").getType());
        assertEquals(ArgumentValueType.ARRAY, annotation.getArgumentValue("inverseJoinColumns").getType());

        ArrayValue joinColumn = (ArrayValue) annotation.getArgumentValue("joinColumns");
        AnnotationValue joinColumnAnnotation = (AnnotationValue) joinColumn.getArgumentValue(0);
        assertEquals("JoinColumn", joinColumnAnnotation.getClassName());
        assertEquals("Orm\\", joinColumnAnnotation.getNamespace());
        assertEquals("join_id", joinColumnAnnotation.getArgument("name"));
        assertEquals("id_first", joinColumnAnnotation.getArgument("referencedColumnName"));

        ArrayValue inverseJoinColumn = (ArrayValue) annotation.getArgumentValue("inverseJoinColumns");
        AnnotationValue inverseJoinColumnAnnotation = (AnnotationValue) inverseJoinColumn.getArgumentValue(0);
        assertEquals("JoinColumn", inverseJoinColumnAnnotation.getClassName());
        assertEquals("Orm\\", inverseJoinColumnAnnotation.getNamespace());
        assertEquals("inverse_id", inverseJoinColumnAnnotation.getArgument("name"));
        assertEquals("id_second", inverseJoinColumnAnnotation.getArgument("referencedColumnName"));
    }
View Full Code Here

Examples of com.sun.javadoc.AnnotationValue

        // Events has only a single attribute: value(), so we know its the first element
        // in the array.

        ElementValuePair pair = eventsAnnotation.elementValues()[0];

        AnnotationValue annotationValue = pair.value();
        AnnotationValue[] values = (AnnotationValue[]) annotationValue.value();

        for (AnnotationValue eventValue : values)
        {
            String event = (String) eventValue.value();
            int ws = event.indexOf(' ');
View Full Code Here

Examples of com.sun.mirror.declaration.AnnotationValue

      }
    }

    // find default values...painful
    for (AnnotationTypeElementDeclaration annotationType : type.getMethods()) {
      AnnotationValue value = annotationType.getDefaultValue();
      if (value != null) {
        String name = annotationType.getSimpleName();
        if (!values.containsKey(name))
          values.put(name, value.getValue());
      }
    }

    return values;
  }
View Full Code Here

Examples of com.thoughtworks.qdox.model.annotation.AnnotationValue

       
        if(properties != null) {
            for(Iterator i = this.properties.entrySet().iterator(); i.hasNext(); ) {
                Entry entry = (Entry) i.next();
                String name = (String) entry.getKey();
                AnnotationValue value = (AnnotationValue) entry.getValue();
               
                setProperty(name, value);
            }
        }
  }
View Full Code Here

Examples of edu.umd.cs.findbugs.classfile.analysis.AnnotationValue

        }

        XMethod xMethod = XFactory.createXMethod(classContext.getJavaClass(), method);

        ClassDescriptor junitTestAnnotation = DescriptorFactory.createClassDescriptor("org/junit/Test");
        AnnotationValue av = xMethod.getAnnotation(junitTestAnnotation);
        if (av != null) {
            Object value = av.getValue("expected");

            if (value instanceof Type) {
                String className = ((Type) value).getClassName();
                if (className.equals("java.lang.NullPointerException")) {
                    return;
View Full Code Here

Examples of eu.admire.dispel.annotations.AnnotationValue

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetValue(AnnotationValue newValue, NotificationChain msgs) {
    AnnotationValue oldValue = value;
    value = newValue;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AnnotationsPackage.SINGLE_ANNOTATION_PARAMETER__VALUE, oldValue, newValue);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

Examples of javax.lang.model.element.AnnotationValue

            Map<String, AnnotationValue> valueMap,
            String name) {
        assert valueType != null;
        assert valueMap != null;
        assert name != null;
        AnnotationValue value = valueMap.get(name);
        if (value == null) {
            return null;
        }
        Object content = value.getValue();
        if (valueType.isInstance(content) == false) {
            return null;
        }
        return valueType.cast(content);
    }
View Full Code Here

Examples of javax.lang.model.element.AnnotationValue

    static List<? extends AnnotationValue> getList(
            Map<String, AnnotationValue> valueMap,
            String name) {
        assert valueMap != null;
        assert name != null;
        AnnotationValue value = valueMap.get(name);
        if (value == null) {
            return null;
        }
        Object content = value.getValue();
        if ((content instanceof List<?>) == false) {
            return null;
        }
        return (List<? extends AnnotationValue>) content;
    }
View Full Code Here

Examples of javax.lang.model.element.AnnotationValue

        assert annotation != null;
        Map<String, AnnotationValue> results = Maps.create();
        for (Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> entry
                : annotation.getElementValues().entrySet()) {
            ExecutableElement key = entry.getKey();
            AnnotationValue value = entry.getValue();
            results.put(key.getSimpleName().toString(), value);
        }
        return results;
    }
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.