Package com.google.gwt.dev.jjs.ast

Examples of com.google.gwt.dev.jjs.ast.JAnnotation


      } else if (value instanceof AnnotationBinding) {
        AnnotationBinding annotationBinding = (AnnotationBinding) value;
        ReferenceBinding annotationType = annotationBinding.getAnnotationType();
        JInterfaceType type = (JInterfaceType) typeMap.tryGet(annotationType);
        JAnnotation toReturn;
        if (type != null) {
          toReturn = new JAnnotation(info, type);
        } else {
          JInterfaceType external = getOrCreateExternalType(info,
              annotationType.compoundName);
          toReturn = new JAnnotation(info, external);
        }

        // Load the properties for the annotation value
        processAnnotationProperties(info, toReturn,
            annotationBinding.getElementValuePairs());
View Full Code Here


      if (annotations == null) {
        return;
      }

      for (Annotation a : annotations) {
        JAnnotation annotation;
        ReferenceBinding binding = (ReferenceBinding) a.resolvedType;
        String name = CharOperation.toString(binding.compoundName);
        boolean record = false;
        for (String prefix : JProgram.RECORDED_ANNOTATION_PACKAGES) {
          if (name.startsWith(prefix + ".")) {
            record = true;
            break;
          }
        }
        if (!record) {
          continue;
        }
        JInterfaceType annotationType = (JInterfaceType) typeMap.tryGet(binding);
        if (annotationType != null) {
          annotation = new JAnnotation(x.getSourceInfo(), annotationType);
        } else {
          // Indicates a binary-only annotation type
          JInterfaceType externalType = getOrCreateExternalType(
              x.getSourceInfo(), binding.compoundName);
          annotation = new JAnnotation(x.getSourceInfo(), externalType);
        }
        processAnnotationProperties(x.getSourceInfo(), annotation,
            a.computeElementValuePairs());
        x.addAnnotation(annotation);
      }
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.jjs.ast.JAnnotation

Copyright © 2018 www.massapicom. 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.