|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataPrinter
A data printer is used to convert content objects into a textual
representation during data dependency resolving. There are predefined
printers available for the most common object types, but additional ones
implementing this interface can be used. Those printers will be chained to
form a printer pipeline. The first one able to handle a given object will be
called to do the actual conversion. The last printer in the chain should be
a default printer which can handle any Object
to ensure
conversion is possible for all types.
Method Summary | |
---|---|
boolean |
canHandle(java.lang.Object object)
Checks whether the given content object can be handled by this data printer. |
java.lang.String |
printAsExpression(java.lang.Object object,
DataPrinter pipeline)
Converts the given content object into a textual representation when used as an expression. |
java.lang.String |
printAsText(java.lang.Object object,
DataPrinter pipeline)
Converts the given content object into a textual representation when used as text. |
Method Detail |
---|
boolean canHandle(java.lang.Object object)
instanceof
statement will be used
to check for a specific object type.
object
- The object which should be converted.
java.lang.String printAsExpression(java.lang.Object object, DataPrinter pipeline)
let $var := ${//anypath} return
<test>{$var}</test>
object
- The object which should be converted.pipeline
- The top of the printer pipeline. Useful for recursive
types like collections or arrays.
java.lang.String printAsText(java.lang.Object object, DataPrinter pipeline)
<test>${//anypath}</test>
object
- The object which should be converted.pipeline
- The top of the printer pipeline. Useful for recursive
types like collections or arrays.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |