Examples of AnnotationMirror


Examples of com.sun.mirror.declaration.AnnotationMirror

     *            the annotation mirror for Attribute
     */
    protected void handleJson(AttributeMetaDesc attributeMetaDesc,
            ClassDeclaration classDeclaration,
            FieldDeclaration fieldDeclaration, AnnotationMirror attribute) {
        AnnotationMirror json =
            AnnotationMirrorUtil.getElementValue(
                attribute,
                AnnotationConstants.json);
        JsonAnnotation anno = new JsonAnnotation();
        attributeMetaDesc.setJson(anno);
        if(json == null){
            return;
        }
        for(Map.Entry<AnnotationTypeElementDeclaration, AnnotationValue> entry
                : json.getElementValues().entrySet()){
            String sn = entry.getKey().getSimpleName();
            if(sn.equals(AnnotationConstants.ignore)) {
                anno.setIgnore(entry.getValue() != null ?
                    (Boolean)entry.getValue().getValue()
                    : false);
View Full Code Here

Examples of com.sun.mirror.declaration.AnnotationMirror

                    if (typeDeclaration == null) {
                        throwExceptionForModelRefTypeArgument(
                            classDeclaration,
                            fieldDeclaration);
                    }
                    AnnotationMirror annotationMirror =
                        DeclarationUtil.getAnnotationMirror(
                            env,
                            typeDeclaration,
                            AnnotationConstants.Model);
                    if (annotationMirror == null) {
View Full Code Here

Examples of com.sun.mirror.declaration.AnnotationMirror

  protected void handleField(AttributeMetaDesc attributeMetaDesc,
      ClassDeclaration classDeclaration,
      FieldDeclaration fieldDeclaration, AnnotationMirror attribute) {
    super.handleField(attributeMetaDesc, classDeclaration,
        fieldDeclaration, attribute);
    AnnotationMirror sync = DeclarationUtil.getAnnotationMirror(env,
        fieldDeclaration, MyConstants.Sync);
    Boolean b = false;
    if (sync != null) {
      Boolean b2 = AnnotationMirrorUtil.getElementValue(sync,
          MyConstants.value);
View Full Code Here

Examples of com.sun.mirror.declaration.AnnotationMirror

        InterfaceDeclaration intfDecl = mostDerived._intfDecl;

        if ( intfDecl == null )
            return;

        AnnotationMirror controlMirror = null;

        for (AnnotationMirror annot : intfDecl.getAnnotationMirrors())
        {
            if (annot.getAnnotationType().getDeclaration().getQualifiedName().equals(
                    "org.apache.beehive.controls.api.bean.ControlInterface"))
View Full Code Here

Examples of com.sun.mirror.declaration.AnnotationMirror

            //
            // If found, we must actually read the value using an AnnotationMirror, since it
            // contains a Class element (eventSet) that cannot be loaded
            //
            AnnotationMirror handlerMirror = null;
            for (AnnotationMirror annot : implMethod.getAnnotationMirrors())
            {
                if ( annot == null ||
                    annot.getAnnotationType() == null ||
                    annot.getAnnotationType().getDeclaration() == null ||
View Full Code Here

Examples of com.sun.mirror.declaration.AnnotationMirror

                            controlTypes = new HashSet<TypeMirror>();
                            clientsMap.put( clientType, controlTypes );
                        }

                        // Read ControlReferences annotation
                        AnnotationMirror controlMirror = null;
                        for (AnnotationMirror annot : clientType.getAnnotationMirrors())
                        {
                            if (annot.getAnnotationType().getDeclaration().getQualifiedName().equals(
                                    "org.apache.beehive.controls.api.bean.ControlReferences"))
                            {
View Full Code Here

Examples of com.sun.mirror.declaration.AnnotationMirror

    }

    private void checkControlClientType( TypeDeclaration t )
    {
        // validate @ControlReferences
        AnnotationMirror controlMirror = null;

        for (AnnotationMirror annot : t.getAnnotationMirrors())
        {
            if (annot.getAnnotationType().getDeclaration().getQualifiedName().equals(
                    "org.apache.beehive.controls.api.bean.ControlReferences"))
View Full Code Here

Examples of com.sun.mirror.declaration.AnnotationMirror

            //
            // If found, we must actually read the value using an AnnotationMirror, since it
            // contains a Class element (eventSet) that cannot be loaded
            //
            AnnotationMirror handlerMirror = null;
            for (AnnotationMirror annot : implMethod.getAnnotationMirrors())
            {
                if ( annot == null ||
                    annot.getAnnotationType() == null ||
                    annot.getAnnotationType().getDeclaration() == null ||
View Full Code Here

Examples of javax.lang.model.element.AnnotationMirror

        for (Element element : elements) {
            ExecutableElement method = toOperatorMethodElement(element);
            if (method == null) {
                continue;
            }
            AnnotationMirror annotationMirror = findAnnotation(annotationType, method);
            if (annotationMirror == null) {
                raiseInvalid(element, "演算子{0}の注釈を正しく解析できませんでした");
                continue;
            }
            registerMethod(annotationMirror, processor, method);
View Full Code Here

Examples of javax.lang.model.element.AnnotationMirror

         * @param a 結合する型
         * @param b 結合する型
         * @return この型が結合モデルを表現する場合のみ{@code true}
         */
        public boolean isJoinedModel(TypeMirror a, TypeMirror b) {
            AnnotationMirror annotation = findAnnotation(element, environment.getDeclaredType(Joined.class));
            if (annotation == null) {
                return false;
            }
            Map<String, AnnotationValue> values = getValues(annotation);
            List<? extends AnnotationValue> terms = getList(values, "terms");
            if (terms == null
                    || terms.size() != 2
                    || (terms.get(0).getValue() instanceof AnnotationMirror) == false
                    || (terms.get(1).getValue() instanceof AnnotationMirror) == false) {
                return false;
            }
            AnnotationMirror from = (AnnotationMirror) terms.get(0).getValue();
            AnnotationMirror join = (AnnotationMirror) terms.get(1).getValue();
            TypeMirror fromType = getReduceTermType(from);
            TypeMirror joinType = getReduceTermType(join);
            if (fromType == null || joinType == null) {
                return false;
            }
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.