Class DefaultJavaFileArtifactCreator
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.artifactModel.DefaultFileArtifactCreator
-
- net.ssehub.easy.instantiation.java.artifacts.DefaultJavaFileArtifactCreator
-
- All Implemented Interfaces:
IArtifactCreator
public class DefaultJavaFileArtifactCreator extends DefaultFileArtifactCreator
Defines the default file artifact creator.- Author:
- Sass
-
-
Field Summary
-
Fields inherited from interface net.ssehub.easy.instantiation.core.model.artifactModel.IArtifactCreator
DEFAULT_PATTERN
-
-
Constructor Summary
Constructors Constructor Description DefaultJavaFileArtifactCreator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileArtifactcreateArtifactInstance(java.lang.Object real, ArtifactModel model)Returns the artifact instance forreal.java.lang.Class<? extends IArtifact>getArtifactClass()The class of the artifact being created.protected booleanhandlesFileImpl(java.io.File file)May specify additional properties of a file.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.artifactModel.DefaultFileArtifactCreator
checkSuffix, configure, handlesArtifact
-
-
-
-
Method Detail
-
handlesFileImpl
protected boolean handlesFileImpl(java.io.File file)
Description copied from class:DefaultFileArtifactCreatorMay specify additional properties of a file. It is already guaranteed thatfileis a file and not a directory.- Overrides:
handlesFileImplin classDefaultFileArtifactCreator- Parameters:
file- the file to be handled- Returns:
trueif it handlesfile,falseelse
-
createArtifactInstance
public FileArtifact createArtifactInstance(java.lang.Object real, ArtifactModel model) throws VilException
Description copied from interface:IArtifactCreatorReturns the artifact instance forreal.- Specified by:
createArtifactInstancein interfaceIArtifactCreator- Overrides:
createArtifactInstancein classDefaultFileArtifactCreator- 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
-
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- Overrides:
getArtifactClassin classDefaultFileArtifactCreator- Returns:
- the class of the artifact being created
-
-