Examples of AnnotationDesc


Examples of com.espertech.esper.epl.spec.AnnotationDesc

                value = walkValue(node.getChild(i));
                values.add(new Pair<String, Object>("value", value));
            }
        }

        return new AnnotationDesc(name, values);
    }
View Full Code Here

Examples of com.espertech.esper.epl.spec.AnnotationDesc

            Object[] values = walkArray(node.getChild(1));
            return new Pair<String, Object>(name, values);
        }
        if (node.getChild(1).getType() == EsperEPL2Ast.ANNOTATION)
        {
            AnnotationDesc anno = walk(node.getChild(1), engineImportService);
            return new Pair<String, Object>(name, anno);
        }
        else if (node.getChild(1).getType() == EsperEPL2Ast.CLASS_IDENT)
        {
            Object enumValue = walkClassIdent(node.getChild(1), engineImportService);
View Full Code Here

Examples of com.espertech.esper.epl.spec.AnnotationDesc

                value = walkValue(node.getChild(i));
                values.add(new Pair<String, Object>("value", value));
            }
        }

        return new AnnotationDesc(name, values);
    }
View Full Code Here

Examples of com.espertech.esper.epl.spec.AnnotationDesc

            Object[] values = walkArray(node.getChild(1));
            return new Pair<String, Object>(name, values);
        }
        if (node.getChild(1).getType() == EsperEPL2Ast.ANNOTATION)
        {
            AnnotationDesc anno = walk(node.getChild(1), engineImportService);
            return new Pair<String, Object>(name, anno);
        }
        else if (node.getChild(1).getType() == EsperEPL2Ast.CLASS_IDENT)
        {
            Object enumValue = walkClassIdent(node.getChild(1), engineImportService);
View Full Code Here

Examples of com.sun.javadoc.AnnotationDesc

        }
    }

    private void loadEvents()
    {
        AnnotationDesc eventsAnnotation = getAnnotation(classDoc, Events.class);

        if (eventsAnnotation == null)
            return;

        // 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)
View Full Code Here

Examples of com.sun.javadoc.AnnotationDesc

        return null;
    }

    private static Map<String, String> getAnnotationValues(ProgramElementDoc source, Class annotationType)
    {
        AnnotationDesc annotation = getAnnotation(source, annotationType);

        if (annotation == null)
            return null;

        Map<String, String> result = CollectionFactory.newMap();

        for (ElementValuePair pair : annotation.elementValues())
        {
            result.put(pair.element().name(), pair.value().value().toString());
        }

        return result;
View Full Code Here

Examples of com.sun.javadoc.AnnotationDesc

  public AnnotationParser(Parameter parameter) {
    this.annotations = parameter.annotations();
  }

  public String getAnnotationValue(String qualifiedAnnotationType, String key) {
    AnnotationDesc annotation = getAnnotation(qualifiedAnnotationType);
    if (annotation == null) {
      return null;
    }
    for (AnnotationDesc.ElementValuePair evp : annotation.elementValues()) {
      if (evp.element().name().equals(key)) {
        String val = evp.value().value().toString();
        return val.trim();
      }
    }
View Full Code Here

Examples of com.sun.javadoc.AnnotationDesc

   * @param qualifiedAnnotationType The FQN of the annotation
   * @param key The field name of the annotation to get
   * @return The values or null if none were found
   */
  public ClassDoc[] getAnnotationClassDocValues(String qualifiedAnnotationType, String key) {
    AnnotationDesc annotation = getAnnotation(qualifiedAnnotationType);
    if (annotation == null) {
      return null;
    }
    for (AnnotationDesc.ElementValuePair evp : annotation.elementValues()) {
      if (evp.element().name().equals(key)) {
        Object val = evp.value().value();
        AnnotationValue[] vals = (AnnotationValue[]) val;
        if (vals != null && vals.length > 0) {
          ClassDoc[] res = new ClassDoc[vals.length];
View Full Code Here

Examples of com.sun.javadoc.AnnotationDesc

   * @param qualifiedAnnotationType The FQN of the annotation
   * @param key The field name of the annotation to get
   * @return The values or null if none were found
   */
  public String[] getAnnotationValues(String qualifiedAnnotationType, String key) {
    AnnotationDesc annotation = getAnnotation(qualifiedAnnotationType);
    if (annotation == null) {
      return null;
    }
    for (AnnotationDesc.ElementValuePair evp : annotation.elementValues()) {
      if (evp.element().name().equals(key)) {
        Object val = evp.value().value();
        AnnotationValue[] vals = (AnnotationValue[]) val;
        if (vals != null && vals.length > 0) {
          String[] res = new String[vals.length];
View Full Code Here

Examples of com.sun.javadoc.AnnotationDesc

  public boolean isAnnotatedBy(String qualifiedAnnotationType) {
    return getAnnotation(qualifiedAnnotationType) != null;
  }

  private AnnotationDesc getAnnotation(String qualifiedAnnotationType) {
    AnnotationDesc found = null;
    for (AnnotationDesc annotation : this.annotations) {
      try {
        if (annotation.annotationType().qualifiedTypeName().equals(qualifiedAnnotationType)) {
          found = annotation;
          break;
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.