$target

( documentation for Telosys generator version 4.1.0 )


The current target for the generation in progress

Example when using $generator :
$generator.generate($target.entityName, "${beanClass.name}Key.java", $target.folder, "jpa_bean_pk.vm" )

Since : 2.0.3

Attributes and methods
.entityName : String

Returns the entity name for the generation in progress (entity class name : Book, Author, ...)

.file : String

Returns the output file name for the generation in progress

.folder : String

Returns the output file folder for the generation in progress

.forceEntityName(String forcedName) : String

Forces the entity name (to change dynamically the entity name)
If a forced name has been defined it will be used as the 'BEANNAME' to build the target file name
Returns a void string (so that it can be used easily in the template)

Parameters :
   forcedName : the new entity name

.forcedEntityName : String

Returns the 'forced entity name' (or '' if none)

.javaPackageFromFolder(String srcFolder) : String

Returns the Java package corresponding to the file path after removing the given source folder

Parameters :
   srcFolder : the source folder (the beginning of path to be removed to get the package folder)

Example :
   package ${target.javaPackageFromFolder($SRC)};

.originalFileDefinition : String

Returns the original file definition for the generation in progress
(the file as defined in the bundle, before variables substitution)

.originalFolderDefinition : String

Returns the original folder definition for the generation in progress
(the folder as defined in the bundle, before variables substitution)

Since : 3.3.0

.outputFileExists() : boolean

Returns true if the file to generate already exists


Since : 3.3.0

.outputFileFullPath : String

Returns the full path of the file that will be generated
(it uses the 'SpecificDestinationFolder' if defined in configuration)


Since : 3.3.0

.targetName : String

Returns the target's name (as defined in the targets file) for the generation in progress

.template : String

Returns the template file name (.vm) for the generation in progress

.type : String

Returns the target type as in templates configuration file
The type is '*', '1' or 'R'


Since : 3.3.0