org.ops4j.pax.construct.util
Interface BndUtils.Bnd

All Known Implementing Classes:
RoundTripBndFile
Enclosing class:
BndUtils

public static interface BndUtils.Bnd

API for editing Bnd files


Method Summary
 java.io.File getBasedir()
           
 java.util.Set getDirectives()
           
 java.io.File getFile()
           
 java.lang.String getInstruction(java.lang.String directive)
           
 void overlayInstructions(BndUtils.Bnd bnd)
          Overlay existing instructions onto the current setup
 boolean removeInstruction(java.lang.String directive)
           
 void setInstruction(java.lang.String directive, java.lang.String instruction, boolean overwrite)
           
 void write()
           
 

Method Detail

getInstruction

java.lang.String getInstruction(java.lang.String directive)
Parameters:
directive - a Bnd directive
Returns:
assigned Bnd instruction

setInstruction

void setInstruction(java.lang.String directive,
                    java.lang.String instruction,
                    boolean overwrite)
                    throws BndUtils.ExistingInstructionException
Parameters:
directive - a Bnd directive
instruction - a Bnd instruction
overwrite - overwrite existing instruction if true, otherwise throw BndUtils.ExistingInstructionException
Throws:
BndUtils.ExistingInstructionException

removeInstruction

boolean removeInstruction(java.lang.String directive)
Parameters:
directive - a Bnd directive
Returns:
true if there was an existing instruction, otherwise false

getDirectives

java.util.Set getDirectives()
Returns:
set of current directive names

overlayInstructions

void overlayInstructions(BndUtils.Bnd bnd)
Overlay existing instructions onto the current setup

Parameters:
bnd - existing Bnd instructions

getFile

java.io.File getFile()
Returns:
the underlying Bnd instruction file

getBasedir

java.io.File getBasedir()
Returns:
the directory containing the Bnd file

write

void write()
           throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2007-2008 OPS4J. All Rights Reserved.