Package com.sun.mirror.declaration

Examples of com.sun.mirror.declaration.TypeDeclaration


        }
      }
      if ( typemap_classname == null )
        throw new RuntimeException("No TypeMap class name specified with -Atypemap=<class-name>");

      TypeDeclaration lastFile = null;
      try {
        long generatorLM = getGeneratorLastModified();
        TypeMap type_map = (TypeMap)(Class.forName(typemap_classname).newInstance());
        for ( TypeDeclaration typedecl : env.getSpecifiedTypeDeclarations() ) {
          lastFile = typedecl;
          typedecl.accept(getDeclarationScanner(new GeneratorVisitor(env, type_map, generate_error_checks, context_specific, generatorLM), NO_OP));
        }
      } catch (Exception e) {
        if ( lastFile == null )
          throw new RuntimeException(e);
        else
          throw new RuntimeException("\n-- Failed to process template: " + lastFile.getQualifiedName() + " --", e);
      }
    }
View Full Code Here


    Collection<Declaration> loxiaSkipDeclarations = environment.getDeclarationsAnnotatedWith(loxiaSkipDeclaration);

    // find Tags
    for (Declaration declaration : loxiaTagDeclarations) {
      // type
      TypeDeclaration typeDeclaration = (TypeDeclaration) declaration;
      String typeName = typeDeclaration.getQualifiedName();
      Map<String, Object> values = getValues(typeDeclaration, loxiaTagDeclaration);
      // create Tag and apply values found
      Tag tag = new Tag();
      tag.setDescription((String) values.get("description"));
      tag.setName((String) values.get("name"));
View Full Code Here

                    if (declaredType == null) {
                        throwExceptionForModelRefTypeArgument(
                            classDeclaration,
                            fieldDeclaration);
                    }
                    TypeDeclaration typeDeclaration =
                        declaredType.getDeclaration();
                    if (typeDeclaration == null) {
                        throwExceptionForModelRefTypeArgument(
                            classDeclaration,
                            fieldDeclaration);
View Full Code Here

            });
        }

        @Override
        public void visitDeclaredType(DeclaredType declaredType) {
            TypeDeclaration typeDeclaration = toTypeDeclaration(declaredType);
            String className = typeDeclaration.getQualifiedName();
            dataType = getCoreReferenceType(className, declaredType);
            if (dataType != null) {
                return;
            }
            dataType = getModelRefType(className, declaredType);
View Full Code Here

         * @param declaredType
         *            the declared type
         * @return a type declaration
         */
        protected TypeDeclaration toTypeDeclaration(DeclaredType declaredType) {
            TypeDeclaration typeDeclaration = declaredType.getDeclaration();
            if (typeDeclaration != null) {
                return typeDeclaration;
            }
            throw new UnknownDeclarationException(
                env,
View Full Code Here

            DeclaredType referenceModelType =
                getReferenceModelType(className, declaredType, ModelRef);
            if (referenceModelType == null) {
                return null;
            }
            TypeDeclaration referenceModelDeclaration =
                toTypeDeclaration(referenceModelType);
            return new ModelRefType(
                className,
                declaredType.toString(),
                referenceModelDeclaration.getQualifiedName(),
                referenceModelType.toString());
        }
View Full Code Here

            DeclaredType referenceModelType =
                getReferenceModelType(className, declaredType, InverseModelRef);
            if (referenceModelType == null) {
                return null;
            }
            TypeDeclaration referenceModelDeclaration =
                toTypeDeclaration(referenceModelType);
            return new InverseModelRefType(
                className,
                declaredType.toString(),
                referenceModelDeclaration.getQualifiedName(),
                referenceModelType.toString());
        }
View Full Code Here

                    declaredType,
                    InverseModelListRef);
            if (referenceModelType == null) {
                return null;
            }
            TypeDeclaration referenceModelDeclaration =
                toTypeDeclaration(referenceModelType);
            return new InverseModelListRefType(
                className,
                declaredType.toString(),
                referenceModelDeclaration.getQualifiedName(),
                referenceModelType.toString());
        }
View Full Code Here

                    MessageCode.SLIM3GEN1016,
                    env,
                    declaration.getPosition(),
                    elementType);
            }
            TypeDeclaration elementDeclaration =
                toTypeDeclaration(elementDeclaredType);
            CoreReferenceType elementCoreReferenceType =
                getCoreReferenceType(
                    elementDeclaration.getQualifiedName(),
                    elementDeclaredType);
            if (elementCoreReferenceType != null) {
                return createCollectionType(
                    className,
                    declaredType,
View Full Code Here

                    if (declaredType == null) {
                        throwExceptionForModelRefTypeArgument(
                            classDeclaration,
                            fieldDeclaration);
                    }
                    TypeDeclaration typeDeclaration =
                        declaredType.getDeclaration();
                    if (typeDeclaration == null) {
                        throwExceptionForModelRefTypeArgument(
                            classDeclaration,
                            fieldDeclaration);
View Full Code Here

TOP

Related Classes of com.sun.mirror.declaration.TypeDeclaration

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.