Class DefaultFolderArtifactCreator
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.artifactModel.DefaultFolderArtifactCreator
-
- All Implemented Interfaces:
IArtifactCreator
public class DefaultFolderArtifactCreator extends java.lang.Object implements IArtifactCreator
Defines the default folder creator.- Author:
- Holger Eichelberger
-
-
Field Summary
-
Fields inherited from interface net.ssehub.easy.instantiation.core.model.artifactModel.IArtifactCreator
DEFAULT_PATTERN
-
-
Constructor Summary
Constructors Constructor Description DefaultFolderArtifactCreator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(java.util.Properties properties, java.util.List<Message> messages)Configures its own reaction according to a set of properties.FolderArtifactcreateArtifactInstance(java.lang.Object real, ArtifactModel model)Returns the artifact instance forreal.java.lang.Class<? extends IArtifact>getArtifactClass()The class of the artifact being created.booleanhandlesArtifact(java.lang.Class<? extends IArtifact> kind, java.lang.Object real)Returns whether this creator handles this type of artifact.
-
-
-
Method Detail
-
handlesArtifact
public boolean handlesArtifact(java.lang.Class<? extends IArtifact> kind, java.lang.Object real)
Description copied from interface:IArtifactCreatorReturns whether this creator handles this type of artifact.- Specified by:
handlesArtifactin interfaceIArtifactCreator- Parameters:
kind- the kind of artifact in terms of a class (typically the top-level interfaces)real- the real world object- Returns:
trueif it can handle the artifact,falseelse
-
createArtifactInstance
public FolderArtifact createArtifactInstance(java.lang.Object real, ArtifactModel model) throws VilException
Description copied from interface:IArtifactCreatorReturns the artifact instance forreal.- Specified by:
createArtifactInstancein interfaceIArtifactCreator- Parameters:
real- the real world objectmodel- the artifact model to create the artifact within- Returns:
- the instance or null if
realcannot be handled - Throws:
VilException- in case that any instance creation problem occurs
-
configure
public void configure(java.util.Properties properties, java.util.List<Message> messages)Description copied from interface:IArtifactCreatorConfigures its own reaction according to a set of properties. Each artifact creator may look for a property with its own single name and read a comma separated list of regular file path patterns for its configuration. If empty, the artifact creator shall be disabled. IfIArtifactCreator.DEFAULT_PATTERNis contained, then the default implementation shall be called, otherwise only the configured entries shall be considered. A creator shall not modify the givenproperties(exceptions may apply).- Specified by:
configurein interfaceIArtifactCreator- Parameters:
properties- the properties to configure onmessages- configuration messages (to be modified as a side effect)
-
getArtifactClass
public java.lang.Class<? extends IArtifact> getArtifactClass()
Description copied from interface:IArtifactCreatorThe class of the artifact being created. Do not override this method for an existing creator if you plan to just replace an existing artifact! In that case subclass the respective creator and override onlyIArtifactCreator.createArtifactInstance(Object, ArtifactModel).- Specified by:
getArtifactClassin interfaceIArtifactCreator- Returns:
- the class of the artifact being created
-
-