Examples of AnnotationMirror


Examples of com.sun.mirror.declaration.AnnotationMirror

                "The methodDeclarations parameter is null.");
        }
        String attributeName =
            FieldDeclarationUtil.getPropertyName(fieldDeclaration);
        String name = attributeName;
        AnnotationMirror attribute =
            DeclarationUtil.getAnnotationMirror(
                env,
                fieldDeclaration,
                AnnotationConstants.Attribute);
        if (attribute != null) {
View Full Code Here

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.getElementValueWithDefault(
                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

        validateTopLevel(classDeclaration);
        validatePublicModifier(classDeclaration);
        validateNonGenericType(classDeclaration);
        validateDefaultConstructor(classDeclaration);

        AnnotationMirror model =
            DeclarationUtil.getAnnotationMirror(
                env,
                classDeclaration,
                AnnotationConstants.Model);
        if (model == null) {
View Full Code Here

Examples of com.sun.mirror.declaration.AnnotationMirror

        String kind = null;
        LinkedList<String> classHierarchyList = new LinkedList<String>();
        for (ClassDeclaration c = classDeclaration; c != null
            && !c.getQualifiedName().equals(Object.class.getName()); c =
            c.getSuperclass().getDeclaration()) {
            AnnotationMirror anno =
                DeclarationUtil.getAnnotationMirror(
                    env,
                    c,
                    AnnotationConstants.Model);
            if (anno != null) {
View Full Code Here

Examples of com.sun.mirror.declaration.AnnotationMirror

     *
     * @param classDeclaration
     *            the class declaration
     */
    protected void validateKind(ClassDeclaration classDeclaration) {
        AnnotationMirror anno =
            DeclarationUtil.getAnnotationMirror(
                env,
                classDeclaration,
                AnnotationConstants.Model);
        if (anno == null) {
            throw new IllegalStateException(AnnotationConstants.Model
                + " not found.");
        }
        String value =
            AnnotationMirrorUtil
                .getElementValue(anno, AnnotationConstants.kind);
        if (value != null && value.length() > 0) {
            throw new ValidationException(MessageCode.SLIM3GEN1022, env, anno
                .getPosition());
        }
    }
View Full Code Here

Examples of com.sun.mirror.declaration.AnnotationMirror

                "The methodDeclarations parameter is null.");
        }
        String attributeName =
            FieldDeclarationUtil.getPropertyName(fieldDeclaration);
        String name = attributeName;
        AnnotationMirror attribute =
            DeclarationUtil.getAnnotationMirror(
                env,
                fieldDeclaration,
                AnnotationConstants.Attribute);
        if (attribute != null) {
View Full Code Here

Examples of com.sun.mirror.declaration.AnnotationMirror

    protected void handleJson(AttributeMetaDesc attributeMetaDesc,
            ClassDeclaration classDeclaration,
            FieldDeclaration fieldDeclaration, AnnotationMirror attribute) {
        JsonAnnotation anno = new JsonAnnotation();
        attributeMetaDesc.setJson(anno);
        AnnotationMirror json =
                DeclarationUtil.getAnnotationMirror(
                    env,
                    fieldDeclaration,
                    AnnotationConstants.Json);
        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

                "The methodDeclarations parameter is null.");
        }
        String attributeName =
            FieldDeclarationUtil.getPropertyName(fieldDeclaration);
        String name = attributeName;
        AnnotationMirror attribute =
            DeclarationUtil.getAnnotationMirror(
                env,
                fieldDeclaration,
                AnnotationConstants.Attribute);
        if (attribute != null) {
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.