net.sf.jpkgmk.prototype
Class PrototypeEntryCommand

java.lang.Object
  extended by net.sf.jpkgmk.AbstractLineProvider
      extended by net.sf.jpkgmk.prototype.PrototypeEntryCommand
All Implemented Interfaces:
LineProvider, PrototypeEntry
Direct Known Subclasses:
PrototypeEntryCommandDefault, PrototypeEntryCommandInclude, PrototypeEntryCommandSearch, PrototypeEntryCommandVariable

public abstract class PrototypeEntryCommand
extends AbstractLineProvider
implements PrototypeEntry

The prototype entry command

Since:
1.0
Version:
$Revision: 2 $ $Date: 2008-08-20 21:14:19 +0200 (Mi, 20 Aug 2008) $
Author:
gommma (gommma AT users.sourceforge.net), Last changed by: $Author: gommma $

Nested Class Summary
static class PrototypeEntryCommand.PrototypeEntryCommandParser
          Class for parsing a prototype 'command' line
 
Constructor Summary
PrototypeEntryCommand(CommandType commandType)
           
 
Method Summary
protected abstract  java.lang.String getCommandLinePart()
           
 java.lang.String getLine()
           
 PrototypeEntryType getType()
           
 boolean isHasWhitespaceSeparator()
           
protected  java.io.File resolveFile(java.lang.String filePath, VariableResolver variableResolver)
          Resolves the file for the given path and expands potential variables within the string path.
 void setHasWhitespaceSeparator(boolean hasWhitespaceSeparator)
           
 java.lang.String toString()
           
 
Methods inherited from class net.sf.jpkgmk.AbstractLineProvider
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.jpkgmk.prototype.PrototypeEntry
create, createPkgMapEntry
 
Methods inherited from interface net.sf.jpkgmk.LineProvider
write
 

Constructor Detail

PrototypeEntryCommand

public PrototypeEntryCommand(CommandType commandType)
Parameters:
commandType -
Method Detail

isHasWhitespaceSeparator

public boolean isHasWhitespaceSeparator()
Returns:

setHasWhitespaceSeparator

public void setHasWhitespaceSeparator(boolean hasWhitespaceSeparator)
Parameters:
hasWhitespaceSeparator - If the "!" is separated by a whitespace from the rest of the line or not.

getCommandLinePart

protected abstract java.lang.String getCommandLinePart()
Returns:
Returns the part of the line that is specific for the implementation of the command. This includes everything after the '! cmdType' string

getLine

public java.lang.String getLine()
Specified by:
getLine in interface LineProvider
Returns:
The prototype line
See Also:
LineProvider.getLine()

getType

public PrototypeEntryType getType()
Specified by:
getType in interface PrototypeEntry
Returns:
Returns the type of this entry

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

resolveFile

protected java.io.File resolveFile(java.lang.String filePath,
                                   VariableResolver variableResolver)
                            throws java.io.FileNotFoundException
Resolves the file for the given path and expands potential variables within the string path. If the file cannot be found, a FileNotFoundException is thrown.

Parameters:
filePath -
variableResolver -
Returns:
Throws:
java.io.FileNotFoundException


Copyright © 2007-2008. All Rights Reserved.