Examples of ModelFactory


Examples of com.asakusafw.utils.java.model.syntax.ModelFactory

    }

    @Override
    protected List<? extends TypeBodyDeclaration> override(Context context) {
        ImplementationBuilder builder = new ImplementationBuilder(context);
        ModelFactory f = context.environment.getFactory();
        builder.addStatement(new TypeBuilder(f, context.importer.toType(UnsupportedOperationException.class))
            .newObject(Models.toLiteral(f, "分割演算子は組み込みの方法で処理されます"))
            .toThrowStatement());
        return builder.toImplementation();
    }
View Full Code Here

Examples of com.lewisd.maven.lint.ModelFactory

        }
        return outputReportList;
    }

    private void executeRules(ResultCollector resultCollector) throws MojoExecutionException {
        ModelFactory modelFactory = getContext().getBean(ModelFactory.class);
        RuleInvoker ruleInvoker = new RuleInvoker(getProject(), modelFactory);

        Set<Rule> rulesToRun = new RulesSelector(getRules()).selectRules(rules, onlyRunRules);

        for (Rule rule : rulesToRun) {
View Full Code Here

Examples of com.tobedevoured.modelcitizen.ModelFactory

    private DriverBlueprint driverBlueprint = new DriverBlueprint();
    private OptionBlueprint optionBlueprint = new OptionBlueprint();

    @Before
    public void setUp() throws RegisterBlueprintException {
        modelFactory = new ModelFactory();
        modelFactory.registerBlueprint(carBlueprint);
        modelFactory.registerBlueprint(driverBlueprint);
        modelFactory.registerBlueprint(wheelBlueprint);
        modelFactory.registerBlueprint(optionBlueprint);
    }
View Full Code Here

Examples of com.volantis.mcs.model.ModelFactory

    private void validateSelectors() {
        String errorMessage = null;

        Object object = listBuilder.getObjectControl().getValue();
        if (object != null && object instanceof Validatable) {
            ModelFactory modelFactory = ModelFactory.getDefaultInstance();
            Validator validator = modelFactory.createValidator();

            // Validate the object being created
            validator.validate((Validatable) object);

            // Validate the already created selectors
View Full Code Here

Examples of freemarker.ext.util.ModelFactory

    }
   
    protected TemplateModel create(Object object) {
        Class clazz = object.getClass();

        ModelFactory factory;
        synchronized(classToFactory) {
            factory = (ModelFactory)classToFactory.get(clazz);
            if(factory == null) {
                String className = clazz.getName();
                // clear mappings when class reloading is detected
                if(!mappedClassNames.add(className)) {
                    classToFactory.clear();
                    mappedClassNames.clear();
                    mappedClassNames.add(className);
                }
                factory = wrapper.getModelFactory(clazz);
                classToFactory.put(clazz, factory);
            }
        }
        return factory.create(object, wrapper);
    }
View Full Code Here

Examples of org.apache.tuscany.sdo.model.ModelFactory

  {
    if (instance != null ) return instance;
    instance = new RepchoiceFactoryImpl();

    // Initialize dependent packages
    ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
   
    // Create package meta-data objects
    instance.createMetaData();

    // Initialize created meta-data
View Full Code Here

Examples of org.eclipse.ecf.discovery.ui.model.ModelFactory

   * <!-- end-user-doc -->
   * @generated
   */
  public static ModelFactory init() {
    try {
      ModelFactory theModelFactory = (ModelFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/ecf/discovery.ecore"); //$NON-NLS-1$
      if (theModelFactory != null) {
        return theModelFactory;
      }
    }
    catch (Exception exception) {
View Full Code Here

Examples of org.jamesii.core.model.plugintype.ModelFactory

  }

  @Override
  public void valueChanged(ListSelectionEvent e) {
    try {
      final ModelFactory value = (ModelFactory) list.getSelectedValue();
      canNext = value != null;

      final StringBuilder editors = new StringBuilder();

      model = modelCache.get(value);
      // try to determine available editors
      if (value != null) {
        if (model == null) {
          model = value.create();
          modelCache.put(value, model);
        }

        canNext = canNext && model != null;

        modelWindowFactories = modelWindowFactoryCache.get(model);

        if (modelWindowFactories == null) {
          // get editors available for formalism (if none also disable
          // next
          // button)
          ParameterBlock amwfp =
              new ParameterBlock(model, AbstractModelWindowFactory.MODEL);

          modelWindowFactories =
              SimSystem.getRegistry().getFactoryOrEmptyList(
                  AbstractModelWindowFactory.class, amwfp);

          modelWindowFactoryCache.put(model, modelWindowFactories);
        }

        if (modelWindowFactories.size() == 0) {
          // no editors
          canNext = false;
          editors
              .append("<blockquote><b><font color=\"#CC0000\">None</font></b></blockquote><br />This must not be due to an error.<br/>You can still (at least) use Java to create your model!");
        } else {
          editors.append("<ul>");
          for (ModelWindowFactory f : modelWindowFactories) {
            IFactoryInfo info =
                SimSystem.getRegistry().getFactoryInfo(f.getClass().getName());
            editors.append(String.format(
                "<li>%s %s</li>",
                f.getReadableName(),
                info.getDescription() != null
                    && info.getDescription().length() > 0 ? "("
                    + info.getDescription() + ")" : ""));
          }
          editors.append("</ul>");
        }
      }
      // show editor info

      // also update information about selected model factory
      BasicUtilities.invokeLaterOnEDT(new Runnable() {

        @Override
        public void run() {
          if (value != null) {
            String info =
                String
                    .format(
                        "<html><h1>%s (%s)</h1><h2>Comment</h2>%s<h2>Available Editors</h2>%s</html>",
                        value.getFormalism().getName(), value.getFormalism()
                            .getAcronym(), value.getFormalism().getComment(),
                        editors.toString());
            infoLabel.setContentType("text/html");
            infoLabel.setText(info);
            infoLabel.setCaretPosition(0);
          } else {
View Full Code Here

Examples of org.locationtech.udig.printing.model.ModelFactory

     * <!-- end-user-doc -->
     * @generated
     */
    public static ModelFactory init() {
        try {
            ModelFactory theModelFactory = (ModelFactory)EPackage.Registry.INSTANCE.getEFactory("http:///net/refractions/udig/printing/model.ecore");
            if (theModelFactory != null) {
                return theModelFactory;
            }
        }
        catch (Exception exception) {
View Full Code Here

Examples of org.ontoware.rdf2go.ModelFactory

public class Step1 {
 
  public static void main(String[] args) throws Exception {
    // getting a ModelFactory, declaring a model
    ModelFactory modelFactory = RDF2Go.getModelFactory();
    Model model;
   
    // enabling reasoning:
    Reasoning reasoning;
    reasoning = Reasoning.rdfs;
    model = modelFactory.createModel(reasoning);
    model.open();

    // using reasoning (here: assuming RDFS semantics)
    URI A = model.createURI("urn:A");
    URI B = model.createURI("urn:B");
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.