Examples of saveJavaSource()


Examples of org.jboss.forge.addon.parser.java.facets.JavaSourceFacet.saveJavaSource()

      facetFactory.install(project, DefaultFurnaceContainerFacet.class);
      facetFactory.install(project, CDIFacet_1_1.class);
      facetFactory.install(project, AddonTestFacet.class);

      JavaSourceFacet javaSource = project.getFacet(JavaSourceFacet.class);
      javaSource.saveJavaSource(Roaster.create(JavaPackageInfoSource.class).setPackage(javaSource.getBasePackage()));

      installSelectedAddons(project, dependencyAddons, false);
   }

   /**
 
View Full Code Here

Examples of org.jboss.forge.addon.parser.java.facets.JavaSourceFacet.saveJavaSource()

               DependencyBuilder.create(spiProjectDependency).setVersion("${project.version}"));

      for (Project p : Arrays.asList(addonProject, apiProject, implProject, spiProject))
      {
         JavaSourceFacet javaSource = p.getFacet(JavaSourceFacet.class);
         javaSource.saveJavaSource(Roaster.create(JavaPackageInfoSource.class).setPackage(javaSource.getBasePackage()));
      }

      installSelectedAddons(project, dependencyAddons, true);
      installSelectedAddons(addonProject, dependencyAddons, false);
      installSelectedAddons(apiProject, dependencyAddons, false);
View Full Code Here

Examples of org.jboss.forge.project.facets.JavaSourceFacet.saveJavaSource()

         endpoint.getAnnotation(Path.class).setStringValue("/" + getEntityTable(entity).toLowerCase());

         /*
         * Save the sources
         */
         java.saveJavaSource(entity);

         if (!java.getJavaResource(endpoint).exists()
                 || prompt.promptBoolean("Endpoint [" + endpoint.getQualifiedName() + "] already, exists. Overwrite?"))
         {
            java.saveJavaSource(endpoint);
View Full Code Here

Examples of org.jboss.forge.project.facets.JavaSourceFacet.saveJavaSource()

         java.saveJavaSource(entity);

         if (!java.getJavaResource(endpoint).exists()
                 || prompt.promptBoolean("Endpoint [" + endpoint.getQualifiedName() + "] already, exists. Overwrite?"))
         {
            java.saveJavaSource(endpoint);
            ShellMessages.success(out, "Generated REST endpoint for [" + entity.getQualifiedName() + "]");
         } else
            ShellMessages.info(out, "Aborted endpoint generation for [" + entity.getQualifiedName() + "]");
      }
   }
View Full Code Here

Examples of org.jboss.forge.project.facets.JavaSourceFacet.saveJavaSource()

         JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class);
         DirectoryResource sourceFolder = facet.getSourceFolder();
         createTopLevelPackage(sourceFolder, javaPackage);
         if (createMain)
         {
            facet.saveJavaSource(JavaParser
                     .create(JavaClass.class)
                     .setPackage(javaPackage)
                     .setName("Main")
                     .addMethod("public static void main(String[] args) {}")
                     .setBody("System.out.println(\"Hi there! I was forged as part of the project you call " + name
View Full Code Here

Examples of org.jboss.forge.project.facets.JavaSourceFacet.saveJavaSource()

         Field<JavaClass> localField = addFieldTo(entityClass, fieldEntityClass, fieldName, OneToOne.class);
         if ((inverseFieldName != null) && !inverseFieldName.isEmpty())
         {
            Field<JavaClass> inverseField = addFieldTo(fieldEntityClass, entityClass, inverseFieldName, OneToOne.class);
            inverseField.getAnnotation(OneToOne.class).setStringValue("mappedBy", localField.getName());
            java.saveJavaSource(fieldEntityClass);
         }
      }
      catch (FileNotFoundException e)
      {
         shell.println("Could not locate the @Entity requested. No update was made.");
View Full Code Here

Examples of org.jboss.forge.project.facets.JavaSourceFacet.saveJavaSource()

                     + inverseFieldName
                     + "= new HashSet<" + entity.getName() + ">();");
            otherField.addAnnotation(ManyToMany.class);
            Refactory.createGetterAndSetter(otherEntity, otherField);

            java.saveJavaSource(otherEntity);
         }
         java.saveJavaSource(entity);
      }
      catch (FileNotFoundException e)
      {
View Full Code Here

Examples of org.jboss.forge.project.facets.JavaSourceFacet.saveJavaSource()

            otherField.addAnnotation(ManyToMany.class);
            Refactory.createGetterAndSetter(otherEntity, otherField);

            java.saveJavaSource(otherEntity);
         }
         java.saveJavaSource(entity);
      }
      catch (FileNotFoundException e)
      {
         shell.println("Could not locate the @Entity requested. No update was made.");
      }
View Full Code Here

Examples of org.jboss.forge.project.facets.JavaSourceFacet.saveJavaSource()

               many.addImport(one);
            }
            Field<JavaClass> manyField = many.addField("private " + one.getName() + " " + inverseFieldName + ";");
            manyField.addAnnotation(ManyToOne.class);
            Refactory.createGetterAndSetter(many, manyField);
            java.saveJavaSource(many);
         }
         java.saveJavaSource(one);
      }
      catch (FileNotFoundException e)
      {
View Full Code Here

Examples of org.jboss.forge.project.facets.JavaSourceFacet.saveJavaSource()

            Field<JavaClass> manyField = many.addField("private " + one.getName() + " " + inverseFieldName + ";");
            manyField.addAnnotation(ManyToOne.class);
            Refactory.createGetterAndSetter(many, manyField);
            java.saveJavaSource(many);
         }
         java.saveJavaSource(one);
      }
      catch (FileNotFoundException e)
      {
         shell.println("Could not locate the @Entity requested. No update was made.");
      }
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.