Examples of JAnnotationType


Examples of com.google.gwt.core.ext.typeinfo.JAnnotationType

    String enclosingTypeName = null;
    if (enclosingClassData != null) {
      enclosingTypeName = InternalName.toSourceName(InternalName.getClassName(enclosingClassData.getName()));
    }
    if ((access & Opcodes.ACC_ANNOTATION) != 0) {
      resultType = new JAnnotationType(typeOracle, pkg, enclosingTypeName,
          false, className, true);
    } else if ((access & Opcodes.ACC_ENUM) != 0) {
      resultType = new JEnumType(typeOracle, pkg, enclosingTypeName,
          isLocalType, className, isIntf);
    } else {
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JAnnotationType

    boolean isIntf = TypeDeclaration.kind(typeDecl.modifiers) == TypeDeclaration.INTERFACE_DECL;
    boolean isAnnotation = TypeDeclaration.kind(typeDecl.modifiers) == TypeDeclaration.ANNOTATION_TYPE_DECL;

    JRealClassType resultType;
    if (isAnnotation) {
      resultType = new JAnnotationType(typeOracle, pkg, enclosingType,
          isLocalType, className, isIntf);
    } else if (maybeGeneric(typeDecl, enclosingType)) {
      // Go through and create declarations for each of the type parameters on
      // the generic class or method
      JTypeParameter[] jtypeParameters = declareTypeParameters(typeDecl.typeParameters);
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JAnnotationType

    boolean isIntf = TypeDeclaration.kind(typeDecl.modifiers) == TypeDeclaration.INTERFACE_DECL;
    boolean isAnnotation = TypeDeclaration.kind(typeDecl.modifiers) == TypeDeclaration.ANNOTATION_TYPE_DECL;

    JRealClassType resultType;
    if (isAnnotation) {
      resultType = new JAnnotationType(typeOracle, pkg, enclosingType,
          isLocalType, className, isIntf);
    } else if (maybeGeneric(typeDecl, enclosingType)) {
      // Go through and create declarations for each of the type parameters on
      // the generic class or method
      JTypeParameter[] jtypeParameters = declareTypeParameters(typeDecl.typeParameters);
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JAnnotationType

    boolean isIntf = TypeDeclaration.kind(typeDecl.modifiers) == TypeDeclaration.INTERFACE_DECL;
    boolean isAnnotation = TypeDeclaration.kind(typeDecl.modifiers) == TypeDeclaration.ANNOTATION_TYPE_DECL;

    JRealClassType resultType;
    if (isAnnotation) {
      resultType = new JAnnotationType(typeOracle, pkg, enclosingType,
          isLocalType, className, isIntf);
    } else if (maybeGeneric(typeDecl, enclosingType)) {
      // Go through and create declarations for each of the type parameters on
      // the generic class or method
      JTypeParameter[] jtypeParameters = declareTypeParameters(typeDecl.typeParameters);
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JAnnotationType

   * This endVisit is called on all visited types. By default it dispatches to
   * one of the more specific endVisit methods, e.g.
   * {@link #endVisit(JArrayType)}.
   */
  protected void endVisit(JType type) {
    JAnnotationType typeAnnotation = type.isAnnotation();
    if (typeAnnotation != null) {
      endVisit(typeAnnotation);
      return;
    }

View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JAnnotationType

   * This endVisit is called on all visited types. By default it dispatches to
   * one of the more specific endVisit methods, e.g.
   * {@link #endVisit(JArrayType)}.
   */
  protected void endVisit(JType type) {
    JAnnotationType typeAnnotation = type.isAnnotation();
    if (typeAnnotation != null) {
      endVisit(typeAnnotation);
      return;
    }

View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JAnnotationType

         return; //
      
       addClassIfNotExists(classType, getNearestSetting(classType, getFullSettings()));
      
       //Go through all annotation methods, if has class, add that class to reflection as well
       JAnnotationType annoType = classType.isAnnotation();
       // JAnnotationMethod[] methods = annoType.getMethods();
       JAnnotationMethod[] methods = (JAnnotationMethod[]) annoType.getMethods();
       for (JAnnotationMethod method : methods) {
         Object value = null;
         try {
           value = annotation.annotationType().getMethod(method.getName(), new Class[]{}).invoke(annotation, null);
           //System.out.println(value);
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JAnnotationType

    JClassType classType = typeOracle.findType(ReflectionUtils.getQualifiedSourceName(annotation.annotationType()));
    if (classType != null){
      sb.append("com.gwtent.reflection.client.impl.AnnotationValues.toAnnotation(new com.gwtent.reflection.client.impl.AnnotationValues(");
      sb.append("\"" + classType.getQualifiedSourceName() + "\", new Object[]{");
     
      JAnnotationType annoType = classType.isAnnotation();
      // JAnnotationMethod[] methods = annoType.getMethods();
      JAnnotationMethod[] methods = (JAnnotationMethod[]) annoType.getMethods();
      int index = 0;
      for (JAnnotationMethod method : methods) {
        Object value = null;
        try {
          value = annotation.annotationType().getMethod(method.getName(), new Class[]{}).invoke(annotation);
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JAnnotationType

    boolean isIntf = TypeDeclaration.kind(typeDecl.modifiers) == TypeDeclaration.INTERFACE_DECL;
    boolean isAnnotation = TypeDeclaration.kind(typeDecl.modifiers) == TypeDeclaration.ANNOTATION_TYPE_DECL;

    JRealClassType resultType;
    if (isAnnotation) {
      resultType = new JAnnotationType(typeOracle, pkg, enclosingType,
          isLocalType, className, isIntf);
    } else if (maybeGeneric(typeDecl, enclosingType)) {
      // Go through and create declarations for each of the type parameters on
      // the generic class or method
      JTypeParameter[] jtypeParameters = declareTypeParameters(typeDecl.typeParameters);
View Full Code Here

Examples of org.exolab.javasource.JAnnotationType

        //-- create getNameSpacePrefix method
        method = new JMethod("getNameSpacePrefix", SGTypes.STRING,
                             "the namespace prefix to use when marshaling as XML.");

        if (_config.useJava50()) {
            method.addAnnotation(new JAnnotation(new JAnnotationType("Override")));
        }

        jsc = method.getSourceCode();
        jsc.add("return _nsPrefix;");
        addMethod(method);

        //-- create getNameSpaceURI method
        method = new JMethod("getNameSpaceURI", SGTypes.STRING,
                             "the namespace URI used when marshaling and unmarshaling as XML.");

        if (_config.useJava50()) {
            method.addAnnotation(new JAnnotation(new JAnnotationType("Override")));
        }

        jsc = method.getSourceCode();
        jsc.add("return _nsURI;");
        addMethod(method);

        //-- create getValidator method
        method = new JMethod("getValidator", TYPE_VALIDATOR_CLASS,
                             "a specific validator for the class described"
                             + " by this ClassDescriptor.");

        if (_config.useJava50()) {
            method.addAnnotation(new JAnnotation(new JAnnotationType("Override")));
        }

        jsc = method.getSourceCode();
        jsc.add("return this;");
        addMethod(method);

        //-- create getXMLName method
        method = new JMethod("getXMLName", SGTypes.STRING,
                             "the XML Name for the Class being described.");

        if (_config.useJava50()) {
            method.addAnnotation(new JAnnotation(new JAnnotationType("Override")));
        }

        jsc = method.getSourceCode();
        jsc.add("return _xmlName;");
        addMethod(method);
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.