Examples of AnnotationMirror


Examples of com.redhat.ceylon.compiler.loader.mirror.AnnotationMirror

            AnnotationInvocation ai, Parameter parameter,
            List<AnnotationMirror> annotationTree,
            AnnotatedMirror dpm,
            short code) {
        if (code < 0 && code != Short.MIN_VALUE) {
            AnnotationMirror i = annotationTree.get(-code);
            AnnotationInvocation nested = new AnnotationInvocation();
            setPrimaryFromAnnotationInvocationAnnotation(i, nested);
            loadAnnotationInvocationArguments(path, method, nested, i, annotationTree, dpm);
            InvocationAnnotationTerm term = new InvocationAnnotationTerm();
            term.setInstantiation(nested);
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

                    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

      String jaxbReturnType = "Object";
      String jsonReturnType = "Object";
      String xmlReturnType = "org.w3c.dom.Document";

      Collection<AnnotationMirror> annotations = e.getAnnotationMirrors();
      AnnotationMirror firstAnnotation = annotations.iterator().next();
      Map<AnnotationTypeElementDeclaration,AnnotationValue> annotationParams = firstAnnotation.getElementValues();
      boolean jaxbAlreadySet = false;
      for ( AnnotationTypeElementDeclaration key : annotationParams.keySet() ) {
        String name = key.getSimpleName();
        String val = annotationParams.get( key ).toString();
        if ( name.contentEquals( "JAXBList" ) ) {
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
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.