net.sf.jpkgmk.prototype
Class PrototypeEntryCommandVariable

java.lang.Object
  extended by net.sf.jpkgmk.AbstractLineProvider
      extended by net.sf.jpkgmk.prototype.PrototypeEntryCommand
          extended by net.sf.jpkgmk.prototype.PrototypeEntryCommandVariable
All Implemented Interfaces:
LineProvider, PrototypeEntry

public class PrototypeEntryCommandVariable
extends PrototypeEntryCommand

Represents a variable valid in the scope of this prototype.

For details refer to http://docs.sun.com/app/docs/doc/806-7008/6jftmsc21?a=view in section "Setting Environment Variables"

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
 
Nested classes/interfaces inherited from class net.sf.jpkgmk.prototype.PrototypeEntryCommand
PrototypeEntryCommand.PrototypeEntryCommandParser
 
Constructor Summary
PrototypeEntryCommandVariable(java.lang.String key, java.lang.String value)
           
 
Method Summary
 void create(java.io.File basedir, VariableResolver variableResolver)
          Copies the file of this prototype entry into the target directory
 java.util.List<PkgMapEntry> createPkgMapEntry(java.io.File basedir, VariableResolver variableResolver)
          Creates the PkgMapEntry objects for this PrototypeEntry.
 boolean equals(java.lang.Object obj)
           
protected  java.lang.String getCommandLinePart()
           
 java.lang.String getExpandedValue()
           
 java.lang.String getKey()
           
 java.lang.String getValue()
           
 int hashCode()
           
 boolean isBuildVariable()
           
 void setExpandedValue(java.lang.String expandedValue)
           
 java.lang.String toString()
           
 
Methods inherited from class net.sf.jpkgmk.prototype.PrototypeEntryCommand
getLine, getType, isHasWhitespaceSeparator, resolveFile, setHasWhitespaceSeparator
 
Methods inherited from class net.sf.jpkgmk.AbstractLineProvider
write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.jpkgmk.LineProvider
write
 

Constructor Detail

PrototypeEntryCommandVariable

public PrototypeEntryCommandVariable(java.lang.String key,
                                     java.lang.String value)
Method Detail

getKey

public java.lang.String getKey()

getValue

public java.lang.String getValue()

getExpandedValue

public java.lang.String getExpandedValue()
Returns:
The expanded value if already set.

setExpandedValue

public void setExpandedValue(java.lang.String expandedValue)
Parameters:
expandedValue - Sets the expanded value of this variable.

getCommandLinePart

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

createPkgMapEntry

public java.util.List<PkgMapEntry> createPkgMapEntry(java.io.File basedir,
                                                     VariableResolver variableResolver)
Description copied from interface: PrototypeEntry
Creates the PkgMapEntry objects for this PrototypeEntry.

Parameters:
basedir - The directory in which the pkgMap entry is located
Returns:
The list of all created PkgMapEntry objects created by this prototype entry. Can be empty.

isBuildVariable

public boolean isBuildVariable()

create

public void create(java.io.File basedir,
                   VariableResolver variableResolver)
            throws java.io.IOException
Description copied from interface: PrototypeEntry
Copies the file of this prototype entry into the target directory

variableResolver - The variable resolver to be used for expanding variables within the paths of this entry
Throws:
java.io.IOException

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

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


Copyright © 2007-2008. All Rights Reserved.