本文整理汇总了Java中org.codehaus.plexus.components.io.filemappers.FileMapper类的典型用法代码示例。如果您正苦于以下问题:Java FileMapper类的具体用法?Java FileMapper怎么用?Java FileMapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FileMapper类属于org.codehaus.plexus.components.io.filemappers包,在下文中一共展示了FileMapper类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: remapFilename
import org.codehaus.plexus.components.io.filemappers.FileMapper; //导入依赖的package包/类
protected String remapFilename( String filename )
{
String remappedName = filename;
if ( null != getFileMapper() )
{
return getFileMapper().getMappedFileName( filename );
}
else
{ // iteratively modify the filename, apply all mappers in order
if ( null != getFileMappers() )
{
for ( FileMapper fm : getFileMappers() )
{
if ( null != fm )
{
remappedName = fm.getMappedFileName( remappedName );
}
}
}
}
return remappedName;
}
示例2: getOutputFile
import org.codehaus.plexus.components.io.filemappers.FileMapper; //导入依赖的package包/类
private File getOutputFile( File targetDir, String pName, FileMapper[] pFileMappers )
{
String name = pName;
if ( pFileMappers != null )
{
for ( int i = 0; i < pFileMappers.length; i++ )
{
name = pFileMappers[i].getMappedFileName( name );
}
}
return getFile( targetDir, name );
}
示例3: transform
import org.codehaus.plexus.components.io.filemappers.FileMapper; //导入依赖的package包/类
private void transform(ModelSet modelSet, List<Class<? extends Visitor>> visitorClazzes) throws MojoExecutionException {
Log log = getLog();
log.info("Processing model set from " + modelSet.getDir() + " to " + modelSet.getOutputDir());
FileMapper fileMapper = modelSet.getFileMapper();
if(fileMapper == null){
fileMapper = getFileMapper();
}
File dir = resolveFile(modelSet.getDir());
File outputDir = resolveFile(modelSet.getOutputDir());
DirectoryScanner scanner = new DirectoryScanner();
scanner.setBasedir(dir);
scanner.setIncludes(modelSet.getIncludes());
scanner.setExcludes(modelSet.getExcludes());
scanner.scan();
String[] names = scanner.getIncludedFiles();
for(String name : names){
log.info("Processing model " + name);
try {
File pmmlFile = new File(dir, name);
File serFile = new File(outputDir, fileMapper.getMappedFileName(name));
File serDir = serFile.getParentFile();
if(serDir != null && !serDir.exists()){
serDir.mkdirs();
}
transform(pmmlFile, serFile, visitorClazzes);
} catch(Exception e){
throw new MojoExecutionException("Failed to process model " + name, e);
}
}
}
示例4: getFileMapper
import org.codehaus.plexus.components.io.filemappers.FileMapper; //导入依赖的package包/类
/**
* @return the fileMapper
*/
public FileMapper getFileMapper()
{
return fileMapper;
}
示例5: getFileMappers
import org.codehaus.plexus.components.io.filemappers.FileMapper; //导入依赖的package包/类
/**
* @return the fileMappers
*/
public List<FileMapper> getFileMappers()
{
return fileMappers;
}
示例6: getFileMappers
import org.codehaus.plexus.components.io.filemappers.FileMapper; //导入依赖的package包/类
/**
* Returns a set of file mappers, which are being used to convert the generated files name.
* @return The set of file mappers to use.
*/
public FileMapper[] getFileMappers()
{
return fileMappers;
}
示例7: setFileMappers
import org.codehaus.plexus.components.io.filemappers.FileMapper; //导入依赖的package包/类
/**
* Sets a set of file mappers, which are being used to convert the generated files name.
* @param pFileMappers The set of file mappers to use.
*/
public void setFileMappers( FileMapper[] pFileMappers )
{
fileMappers = pFileMappers;
}
示例8: getFileMapper
import org.codehaus.plexus.components.io.filemappers.FileMapper; //导入依赖的package包/类
public FileMapper getFileMapper(){
return this.fileMapper;
}
示例9: setFileMapper
import org.codehaus.plexus.components.io.filemappers.FileMapper; //导入依赖的package包/类
public void setFileMapper(FileMapper fileMapper){
this.fileMapper = fileMapper;
}