org.codehaus.plexus.compiler

Class AbstractCompiler

Implemented Interfaces:
Compiler

public abstract class AbstractCompiler
extends AbstractLogEnabled
implements Compiler

Version:
$Id: AbstractCompiler.java 2441 2005-09-06 17:04:48Z trygvis $
Authors:
Jason van Zyl
Michal Maczka
Trygve Laugstøl

Field Summary

protected static String
EOL
protected static String
PS
private CompilerOutputStyle
compilerOutputStyle
private String
inputFileEnding
private String
outputFile
private String
outputFileEnding

Fields inherited from interface org.codehaus.plexus.compiler.Compiler

ROLE

Constructor Summary

AbstractCompiler(CompilerOutputStyle compilerOutputStyle, String inputFileEnding, String outputFileEnding, String outputFile)

Method Summary

boolean
canUpdateTarget(CompilerConfiguration configuration)
private static String
getCanonicalPath(File origFile)
CompilerOutputStyle
getCompilerOutputStyle()
String
getInputFileEnding(CompilerConfiguration configuration)
String
getOutputFile(CompilerConfiguration configuration)
String
getOutputFileEnding(CompilerConfiguration configuration)
static String
getPathString(List pathElements)
protected static String[]
getSourceFiles(CompilerConfiguration config)
protected static Set
getSourceFilesForSourceRoot(CompilerConfiguration config, String sourceLocation)
protected static String
makeClassName(String fileName, String sourceDir)
protected static String[]
toStringArray(List arguments)
Deprecated. use (String[]) arguments.toArray( new String[ arguments.size() ] ); instead

Field Details

EOL

protected static final String EOL

PS

protected static final String PS

compilerOutputStyle

private CompilerOutputStyle compilerOutputStyle

inputFileEnding

private String inputFileEnding

outputFile

private String outputFile

outputFileEnding

private String outputFileEnding

Constructor Details

AbstractCompiler

protected AbstractCompiler(CompilerOutputStyle compilerOutputStyle,
                           String inputFileEnding,
                           String outputFileEnding,
                           String outputFile)

Method Details

canUpdateTarget

public boolean canUpdateTarget(CompilerConfiguration configuration)
            throws CompilerException
Specified by:
canUpdateTarget in interface Compiler

getCanonicalPath

private static String getCanonicalPath(File origFile)
            throws CompilerException

getCompilerOutputStyle

public CompilerOutputStyle getCompilerOutputStyle()
Specified by:
getCompilerOutputStyle in interface Compiler

getInputFileEnding

public String getInputFileEnding(CompilerConfiguration configuration)
            throws CompilerException
Specified by:
getInputFileEnding in interface Compiler

getOutputFile

public String getOutputFile(CompilerConfiguration configuration)
            throws CompilerException
Specified by:
getOutputFile in interface Compiler

getOutputFileEnding

public String getOutputFileEnding(CompilerConfiguration configuration)
            throws CompilerException
Specified by:
getOutputFileEnding in interface Compiler

getPathString

public static String getPathString(List pathElements)

getSourceFiles

protected static String[] getSourceFiles(CompilerConfiguration config)

getSourceFilesForSourceRoot

protected static Set getSourceFilesForSourceRoot(CompilerConfiguration config,
                                                 String sourceLocation)

makeClassName

protected static String makeClassName(String fileName,
                                      String sourceDir)
            throws CompilerException

toStringArray

protected static String[] toStringArray(List arguments)

Deprecated. use (String[]) arguments.toArray( new String[ arguments.size() ] ); instead