Examples of Annotation


Examples of aQute.bnd.osgi.Annotation

            String propertiesDesc = annotation.get("description");

            MetaType.OCD ocd = new MetaType.OCD(pid, propertiesHeading, propertiesDesc);
            for (Object p: (Object[]) annotation.get("metadata"))
            {
                Annotation property = (Annotation) p;
                String heading = property.get("heading");
                String id = property.get("id");
                String type = (String) property.get("type");
                type = (type != null) ? Patterns.parseClass(type, Patterns.CLASS, 1) : null;
                Object[] defaults = (Object[]) property.get("defaults");
                String description = property.get("description");
                Integer cardinality = property.get("cardinality");
                Boolean required = property.get("required");

                MetaType.AD ad = new MetaType.AD(id, type, defaults, heading, description,
                    cardinality, required);

                Object[] optionLabels = property.get("optionLabels");
                Object[] optionValues = property.get("optionValues");

                if (optionLabels == null
                    && optionValues != null
                    ||
                    optionLabels != null
View Full Code Here

Examples of com.android.dx.rop.annotation.Annotation

            if (observer != null) {
                parsed(0, "annotations[" + i + "]:");
                changeIndent(1);
            }

            Annotation annotation = parseAnnotation(visibility);
            annotations.add(annotation);

            if (observer != null) {
                observer.changeIndent(-1);
            }
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.Annotation

        ModelFactory f = context.getModelFactory();
        List<Annotation> eTerms = Lists.create();
        for (ReduceTerm<?> term : trait.getTerms()) {
            ClassLiteral source = f.newClassLiteral(context.resolve(term.getSource()));
            ArrayInitializer mappings = toMappings(context, term.getMappings());
            Annotation shuffle = toKey(context, term);
            eTerms.addAll(new AttributeBuilder(f)
                .annotation(context.resolve(Joined.Term.class),
                        "source", source, //$NON-NLS-1$
                        "mappings", mappings, //$NON-NLS-1$
                        "shuffle", shuffle) //$NON-NLS-1$
View Full Code Here

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

    super(adapters);
  }

  @Override
  public Annotation adapt(AnnotationContext context) {
    Annotation annotation = createNode(context);

    AnnotationNameContext annotationNameContext = getChild(context, AnnotationNameContext.class);
    if (annotationNameContext != null) {
      QualifiedNameContext qualifiedNameContext =
          getChild(annotationNameContext, QualifiedNameContext.class);
      if (qualifiedNameContext != null) {
        annotation.setName(getAdapter(QualifiedNameAdapter.class).adapt(qualifiedNameContext));
      }
    }

    ElementValuePairsContext elementValuePairsContext =
        getChild(context, ElementValuePairsContext.class);
    if (elementValuePairsContext != null) {
      List<NameValuePair> elementValuePairs =
          transform(elementValuePairsContext, ElementValuePairContext.class,
              new Function<ElementValuePairContext, NameValuePair>() {
                @Override
                public NameValuePair apply(ElementValuePairContext context) {
                  return getAdapter(ElementValuePairAdapter.class).adapt(context);
                }
              });
      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.digitalpebble.behemoth.Annotation

        // to form a new content string separated by spaces

        // iterate on the annotations
        Iterator<Annotation> iterator = doc.getAnnotations().iterator();
        while (iterator.hasNext()) {
            Annotation current = iterator.next();
            // check whether it belongs to a type we'd like to send to SOLR
            Map<String, String> featureField = fieldMapping.get(current
                    .getType());
            if (featureField == null)
                continue;
            // iterate on the expected features
            for (String targetFeature : featureField.keySet()) {
                String SOLRFieldName = featureField.get(targetFeature);
                String value = null;
                // special case for covering text
                if ("*".equals(targetFeature)) {
                    value = doc.getText().substring((int) current.getStart(),
                            (int) current.getEnd());
                }
                // get the value for the feature
                else {
                    value = current.getFeatures().get(targetFeature);
                }
                LOG.debug("Adding field : " + SOLRFieldName + "\t" + value);
                // skip if no value has been found
                if (value != null)
                    inputDoc.addField(SOLRFieldName, value);
View Full Code Here

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

        List<Annotation> annotations = getCommentAnnotations(comment, true);

        assertEquals(1, annotations.size());

        Annotation annotation = annotations.get(0);
        assertEquals("", annotation.getNamespace());
        assertEquals("Route", annotation.getClassName());
    }
View Full Code Here

Examples of com.dyuproject.protostuff.parser.Annotation

        String data = builder.toString();

        for (Message message : proto.getMessages())
        {
            Annotation annotation = message.getAnnotation("Extend");
            if (annotation != null)
            {
                Object byMessageRef = annotation.getValue("by");
                if (byMessageRef == null)
                    throw new IllegalArgumentException("By parameter of attribute @Extend is not specified");

                if (!(byMessageRef instanceof Message))
                    throw new IllegalArgumentException("By parameter have a non Message reference in your @Extend annotation");
View Full Code Here

Examples of com.google.dart.engine.ast.Annotation

    @Override
    public Element visitIdentifier(Identifier node) {
      AstNode parent = node.getParent();
      // Type name in Annotation
      if (parent instanceof Annotation) {
        Annotation annotation = (Annotation) parent;
        if (annotation.getName() == node && annotation.getConstructorName() == null) {
          return annotation.getElement();
        }
      }
      // Extra work to map Constructor Declarations to their associated Constructor Elements
      if (parent instanceof ConstructorDeclaration) {
        ConstructorDeclaration decl = (ConstructorDeclaration) parent;
View Full Code Here

Examples of com.google.javascript.jscomp.graph.Annotation

    checkAnnotations(graph, a, b);
  }

  private static void checkAnnotations(
      Graph<String, String> graph, Annotatable a, Annotatable b) {
    final Annotation A = new Annotation() {};
    final Annotation B = new Annotation() {};

    // Initially null.
    assertNull(a.getAnnotation());
    assertNull(b.getAnnotation());
View Full Code Here

Examples of com.google.wave.api.Annotation

    List<Annotation> result = Lists.newArrayList();
    for (RangedAnnotation<String> annotation : doc.rangedAnnotations(0, doc.size(), null)) {
      if (annotation.key() != null && annotation.value() != null) {
        int start = apiView.transformToTextOffset(annotation.start());
        int end = apiView.transformToTextOffset(annotation.end());
        result.add(new Annotation(annotation.key(), annotation.value(), new Range(start, end)));
      }
    }
    return result;
  }
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.