org.formulacompiler.spreadsheet
Interface SpreadsheetByNameBinder.CellBinder

Enclosing interface:
SpreadsheetByNameBinder

public static interface SpreadsheetByNameBinder.CellBinder

Interface to a cell binder for either input or output cells.

This interface is an API only. Do not implement it yourself.

Author:
peo
See Also:
SpreadsheetByNameBinder.inputs(), SpreadsheetByNameBinder.outputs()

Method Summary
 void bindAllMethodsToNamedCells()
          Binds all abstract methods to cells of the corresponding name (that is, methods called xy() need a cell called "XY", methods called getXy() need a cell called either "XY" or "GETXY").
 void bindAllMethodsToPrefixedNamedCells(java.lang.String _prefix)
          Binds all abstract methods to cells of the corresponding name.
 void bindAllNamedCellsToMethods()
          Binds all still unbound named cells to methods of the corresponding name (that is, a cell named "XY" must have a method named either xy() or getXy()).
 void bindAllPrefixedNamedCellsToMethods(java.lang.String _prefix)
          Binds all still unbound named cells with a given name prefix to methods of the corresponding name.
 void failIfCellNamesAreStillUnbound(java.lang.String _prefix)
          Raises an exception if there are named cells with the given prefix that were not bound to the type (input/output) of this cell binder.
 

Method Detail

bindAllMethodsToNamedCells

void bindAllMethodsToNamedCells()
                                throws CompilerException
Binds all abstract methods to cells of the corresponding name (that is, methods called xy() need a cell called "XY", methods called getXy() need a cell called either "XY" or "GETXY"). It is an error if no cell of a suitable name is defined. Non-abstract methods are bound likewise, but it is no error if there is no suitable named cell. Typically invoked for output cells (see SpreadsheetByNameBinder.outputs()).

All cells thus bound are removed from the internal list of named cells still to be bound. This is so bindAllNamedCellsToMethods() does not attempt to bind them again.

See the tutorial for details.

Throws:
CompilerException
See Also:
bindAllMethodsToPrefixedNamedCells(String), bindAllNamedCellsToMethods()

bindAllMethodsToPrefixedNamedCells

void bindAllMethodsToPrefixedNamedCells(java.lang.String _prefix)
                                        throws CompilerException
Binds all abstract methods to cells of the corresponding name. It is an error if no cell of a suitable name is defined. Non-abstract methods are bound likewise, but it is no error if there is not suitable named cell. Typically invoked for output cells (see SpreadsheetByNameBinder.outputs()).

All cells thus bound are removed from the internal list of named cells still to be bound. This is so bindAllNamedCellsToMethods() does not attempt to bind them again.

See the tutorial for details.

Parameters:
_prefix - is what all cell names to be considered must start with. Methods called xy() need a cell called "prefixXY", methods called getXy() need a cell called either "prefixXY" or "prefixGETXY" (all case-insensitive).
Throws:
CompilerException
See Also:
bindAllMethodsToNamedCells()

bindAllNamedCellsToMethods

void bindAllNamedCellsToMethods()
                                throws CompilerException
Binds all still unbound named cells to methods of the corresponding name (that is, a cell named "XY" must have a method named either xy() or getXy()). The method name search is not case-sensitive. It is an error if no suitable method can be found. Typically invoked for input cells (see SpreadsheetByNameBinder.inputs()).

See the tutorial for details.

Throws:
CompilerException
See Also:
bindAllMethodsToNamedCells(), bindAllPrefixedNamedCellsToMethods(String)

bindAllPrefixedNamedCellsToMethods

void bindAllPrefixedNamedCellsToMethods(java.lang.String _prefix)
                                        throws CompilerException
Binds all still unbound named cells with a given name prefix to methods of the corresponding name. It is an error if no suitable method can be found. Typically invoked for input cells (see SpreadsheetByNameBinder.inputs()).

Parameters:
_prefix - is what all cell names to be considered must start with. A cell named "prefixXY" must have a method named either xy() or getXy(). The method name search is not case-sensitive.

See the tutorial for details.

Throws:
CompilerException
See Also:
bindAllNamedCellsToMethods()

failIfCellNamesAreStillUnbound

void failIfCellNamesAreStillUnbound(java.lang.String _prefix)
                                    throws CompilerException
Raises an exception if there are named cells with the given prefix that were not bound to the type (input/output) of this cell binder.

Parameters:
_prefix - selects the cell names to check.
Throws:
SpreadsheetException.NameNotFound - if there is an unbound name.
CompilerException