Package org.eclipse.m2m.atl.core.ui.vm.asm

## Class ASMFactory

- java.lang.Object
- - org.eclipse.m2m.atl.core.ModelFactory
  - - org.eclipse.m2m.atl.core.ui.vm.asm.ASMFactory

    public class ASMFactory
    extends ModelFactory

The RegularVM adaptation of the `ModelFactory`.

### Field Summary

Fields
`static java.lang.String` `MODEL_FACTORY_NAME` The model factory name which is also the extractor/injector name.
`static java.lang.String` `OPTION_MODEL_HANDLER` The model handler name.
`static java.lang.String` `OPTION_MODEL_NAME` The model name.
`static java.lang.String` `OPTION_MODEL_PATH` The model path.
`static java.lang.String` `OPTION_NEW_MODEL` The newModel boolean.

### Constructor Summary

Constructors
`ASMFactory()` Creates a new `ASMFactory`.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`IReferenceModel` `getBuiltInResource​(java.lang.String name)` Returns the built-in resource matching the given name.
`java.lang.String` `getDefaultExtractorName()` Returns a default `IExtractor` associated with the current factory.
`java.lang.String` `getDefaultInjectorName()` Returns a default `IInjector` associated with the current factory.
`IReferenceModel` `getMetametamodel()` Returns the Metametamodel.
`static ASMModelWrapper` `getMetametamodel​(java.lang.String modelHandlerName)` Find the metametamodel for a given model handler name.
`IModel` `newModel​(IReferenceModel referenceModel)` Creates a new `IModel` using default options and conforming to the given `IReferenceModel`.
`IModel` `newModel​(IReferenceModel referenceModel, java.util.Map<java.lang.String,​java.lang.Object> options)` Creates a new `IModel` using specified options and conforming to the given `IReferenceModel`.
`IReferenceModel` `newReferenceModel()` Creates a new `IReferenceModel` using default options.
`IReferenceModel` `newReferenceModel​(java.util.Map<java.lang.String,​java.lang.Object> options)` Creates a new `IReferenceModel` using specified options.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### MODEL_FACTORY_NAME

    public static final java.lang.String MODEL_FACTORY_NAME

The model factory name which is also the extractor/injector name.

See Also:
  Constant Field Values

#### OPTION_MODEL_HANDLER

    public static final java.lang.String OPTION_MODEL_HANDLER

The model handler name.

See Also:
  Constant Field Values

#### OPTION_MODEL_NAME

    public static final java.lang.String OPTION_MODEL_NAME

The model name.

See Also:
  Constant Field Values

#### OPTION_MODEL_PATH

    public static final java.lang.String OPTION_MODEL_PATH

The model path.

See Also:
  Constant Field Values

#### OPTION_NEW_MODEL

    public static final java.lang.String OPTION_NEW_MODEL

The newModel boolean.

See Also:
  Constant Field Values

### Constructor Detail

#### ASMFactory

    public ASMFactory()

Creates a new `ASMFactory`.

### Method Detail

#### getDefaultExtractorName

    public java.lang.String getDefaultExtractorName()

Returns a default `IExtractor` associated with the current factory.

Specified by:
  `getDefaultExtractorName` in class `ModelFactory`
Returns:
  the default `IExtractor`
See Also:
  `ModelFactory.getDefaultExtractorName()`

#### getDefaultInjectorName

    public java.lang.String getDefaultInjectorName()

Returns a default `IInjector` associated with the current factory.

Specified by:
  `getDefaultInjectorName` in class `ModelFactory`
Returns:
  the default `IInjector`
See Also:
  `ModelFactory.getDefaultInjectorName()`

#### newModel

    public IModel newModel​(IReferenceModel referenceModel,
                           java.util.Map<java.lang.String,​java.lang.Object> options)

Creates a new `IModel` using specified options and conforming to the given `IReferenceModel`. This method needs additional parameters to be launched, passed as options:

- modelHandlerName: the name of the model handler.
- modelName: the name of the model.
- path: the path of the model.
- newModel: a boolean, true if the model is a new one.

Specified by:
  `newModel` in class `ModelFactory`
Parameters:
  `referenceModel` - the `IReferenceModel`
  `options` - the creation options
Returns:
  a new `IModel`
See Also:
  `ModelFactory.newModel(org.eclipse.m2m.atl.core.IReferenceModel, java.util.Map)`

#### newReferenceModel

    public IReferenceModel newReferenceModel​(java.util.Map<java.lang.String,​java.lang.Object> options)

Creates a new `IReferenceModel` using specified options. This method needs additional parameters to be launched, passed as options:

- modelHandlerName: the name of the model handler.
- modelName: the name of the model.
- path: the path of the model.

Specified by:
  `newReferenceModel` in class `ModelFactory`
Parameters:
  `options` - the creation options
Returns:
  a new `IReferenceModel`
See Also:
  `ModelFactory.newReferenceModel(java.util.Map)`

#### newModel

    public IModel newModel​(IReferenceModel referenceModel)
                    throws ATLCoreException

Creates a new `IModel` using default options and conforming to the given `IReferenceModel`.

Specified by:
  `newModel` in class `ModelFactory`
Parameters:
  `referenceModel` - the `IReferenceModel`
Returns:
  a new `IModel`
Throws:
  `ATLCoreException`
See Also:
  `ModelFactory.newModel(org.eclipse.m2m.atl.core.IReferenceModel)`

#### newReferenceModel

    public IReferenceModel newReferenceModel()
                                      throws ATLCoreException

Creates a new `IReferenceModel` using default options.

Specified by:
  `newReferenceModel` in class `ModelFactory`
Returns:
  a new `IReferenceModel`
Throws:
  `ATLCoreException`
See Also:
  `ModelFactory.newReferenceModel()`

#### getBuiltInResource

    public IReferenceModel getBuiltInResource​(java.lang.String name)

Returns the built-in resource matching the given name.

Specified by:
  `getBuiltInResource` in class `ModelFactory`
Parameters:
  `name` - the resource name
Returns:
  the built-in resource matching the given name
See Also:
  `ModelFactory.getBuiltInResource(java.lang.String)`

#### getMetametamodel

    public static ASMModelWrapper getMetametamodel​(java.lang.String modelHandlerName)

Find the metametamodel for a given model handler name.

Parameters:
  `modelHandlerName` - the model handler name
Returns:
  the metametamodel, embedded into an ASMModelWrapper

#### getMetametamodel

    public IReferenceModel getMetametamodel()

Returns the Metametamodel.

Specified by:
  `getMetametamodel` in class `ModelFactory`
Returns:
  the Metametamodel
See Also:
  `ModelFactory.getMetametamodel()`