Examples of ModelBuilder


Examples of hex.ModelBuilder

      Type[] handler_type_parms = ((ParameterizedType)(clz.getGenericSuperclass())).getActualTypeArguments();
      // [0] is the Model type; [1] is the Model.Parameters type; [2] is the Model.Output type.
      Class<? extends Model.Parameters> pclz = (Class<? extends Model.Parameters>)handler_type_parms[1];

      ModelBuilder modelbuilder = clz.getDeclaredConstructor(new Class[] { (Class)handler_type_parms[1] }).newInstance(pclz.newInstance());

      m.model_builders = new IcedHashMap<>();
      m.model_builders.put(m.algo, modelbuilder);
    }
    catch (Exception e) {
View Full Code Here

Examples of org.apache.maven.model.building.ModelBuilder

      DefaultRepositorySystemSession session = mavenContainer.setupRepoSession(system, settings);
      final DefaultModelBuildingRequest request = new DefaultModelBuildingRequest()
               .setSystemProperties(System.getProperties())
               .setPomFile(pomFile)
               .setActiveProfileIds(settings.getActiveProfiles());
      ModelBuilder builder = new DefaultModelBuilderFactory().newInstance();
      ModelBuildingResult result;
      try
      {
         request.setModelResolver(new MavenModelResolver(system, session, mavenContainer
                  .getEnabledRepositoriesFromProfile(settings)));
         result = builder.build(request);
      }
      // wrap exception message
      catch (ModelBuildingException e)
      {
         String pomPath = request.getPomFile().getAbsolutePath();
View Full Code Here

Examples of org.apache.maven.model.building.ModelBuilder

      DefaultRepositorySystemSession session = mavenContainer.setupRepoSession(system, settings);
      final DefaultModelBuildingRequest request = new DefaultModelBuildingRequest()
               .setSystemProperties(System.getProperties())
               .setPomFile(pomFile)
               .setActiveProfileIds(settings.getActiveProfiles());
      ModelBuilder builder = new DefaultModelBuilderFactory().newInstance();
      ModelBuildingResult result;
      try
      {
         request.setModelResolver(new MavenModelResolver(system, session, mavenContainer
                  .getEnabledRepositoriesFromProfile(settings)));
         result = builder.build(request);
      }
      // wrap exception message
      catch (ModelBuildingException e)
      {
         String pomPath = request.getPomFile().getAbsolutePath();
View Full Code Here

Examples of org.apache.maven.model.building.ModelBuilder

        final DefaultModelBuildingRequest request = new DefaultModelBuildingRequest()
                .setSystemProperties(SecurityActions.getProperties()).setProfiles(this.getSettingsDefinedProfiles())
                .setPomFile(pomFile).setActiveProfileIds(SettingsXmlProfileSelector.explicitlyActivatedProfiles(profiles))
                .setInactiveProfileIds(SettingsXmlProfileSelector.explicitlyDisabledProfiles(profiles));

        ModelBuilder builder = new DefaultModelBuilderFactory().newInstance();
        ModelBuildingResult result;
        try {
            request.setModelResolver(new MavenModelResolver(system, session, getRemoteRepositories()));
            result = builder.build(request);
        }
        // wrap exception message
        catch (ModelBuildingException e) {
            String pomPath = request.getPomFile().getAbsolutePath();
            StringBuilder sb = new StringBuilder("Found ").append(e.getProblems().size())
View Full Code Here

Examples of org.gradle.tooling.internal.protocol.ModelBuilder

    private final ModelProducer modelProducer;
    private final ActionRunner actionRunner;

    public ModelBuilderBackedConsumerConnection(ConnectionVersion4 delegate, ModelMapping modelMapping, ProtocolToModelAdapter adapter) {
        super(delegate, new R16VersionDetails(delegate.getMetaData().getVersion()));
        ModelBuilder builder = (ModelBuilder) delegate;
        ModelProducer modelProducer =  new ModelBuilderBackedModelProducer(adapter, getVersionDetails(), modelMapping, builder);
        modelProducer = new GradleBuildAdapterProducer(adapter, modelProducer);
        modelProducer = new BuildInvocationsAdapterProducer(adapter, getVersionDetails(), modelProducer);
        this.modelProducer = modelProducer;
        this.actionRunner = new UnsupportedActionRunner(getVersionDetails());
View Full Code Here

Examples of org.kohsuke.stapler.export.ModelBuilder

            PrintWriter w = new PrintWriter(stdout);
            w.println("<changes>");
            for (AbstractBuild build : builds) {
                w.println("<build number='"+build.getNumber()+"'>");
                ChangeLogSet<?> cs = build.getChangeSet();
                Model p = new ModelBuilder().get(cs.getClass());
                p.writeTo(cs,Flavor.XML.createDataWriter(cs,w));
                w.println("</build>");
            }
            w.println("</changes>");
            w.flush();
View Full Code Here

Examples of org.kohsuke.stapler.export.ModelBuilder

            PrintWriter w = new PrintWriter(stdout);
            w.println("<changes>");
            for (AbstractBuild build : builds) {
                w.println("<build number='"+build.getNumber()+"'>");
                ChangeLogSet<?> cs = build.getChangeSet();
                Model p = new ModelBuilder().get(cs.getClass());
                p.writeTo(cs,Flavor.XML.createDataWriter(cs,w));
                w.println("</build>");
            }
            w.println("</changes>");
            w.flush();
View Full Code Here

Examples of org.milyn.javabean.dynamic.ModelBuilder

*/
public class Main {

    public static void main(String[] args) throws IOException, SAXException {

        ModelBuilder modelBuilder = new ModelBuilder("META-INF/org/smooks/model/descriptor.properties", false);
        Model<SmooksModel> model;
        SmooksModel smooksModel;

        // Read an instance of the model...
        model = modelBuilder.readModel(new FileReader("smooks-config.xml"), SmooksModel.class);
        smooksModel = model.getModelRoot();

        // Make modifications to the smooksModel instance etc....
        List<Bean> beans = smooksModel.getBeans();
        for(Bean bean : beans) {
View Full Code Here

Examples of org.milyn.javabean.dynamic.ModelBuilder

public class CSVReader_1_3_Test extends TestCase {

    private ModelBuilder modelBuilder;

    public CSVReader_1_3_Test() throws IOException, SAXException {
        modelBuilder = new ModelBuilder(SmooksModel.MODEL_DESCRIPTOR, false);
    }
View Full Code Here

Examples of org.milyn.javabean.dynamic.ModelBuilder

public class CSVReader_1_2_Test extends TestCase {

    private ModelBuilder modelBuilder;

    public CSVReader_1_2_Test() throws IOException, SAXException {
        modelBuilder = new ModelBuilder(SmooksModel.MODEL_DESCRIPTOR, false);
    }
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.