public class FieldUnknown extends Field
To learn more, visit the Working with Fields documentation article.
Examples:
Shows how to work with 'FieldNone' field in a document.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Insert a field that does not denote an objective field type in its field code.
Field field = builder.insertField(" NOTAREALFIELD //a");
// The "FieldNone" field type is reserved for fields such as these.
Assert.assertEquals(FieldType.FIELD_NONE, field.getType());
// We can also still work with these fields and assign them as instances of the FieldUnknown class.
FieldUnknown fieldUnknown = (FieldUnknown) field;
Assert.assertEquals(" NOTAREALFIELD //a", fieldUnknown.getFieldCode());
| Modifier and Type | Method and Description |
|---|---|
boolean |
canWorkAsMergeField() |
java.lang.String |
getMergeFieldName() |
boolean |
isMergeValueRequired() |
getDisplayResult, getEnd, getFieldCode, getFieldCode, getFormat, getLocaleId, getResult, getSeparator, getStart, getType, isDirty, isDirty, isLocked, isLocked, needStoreOldResultNodes, remove, setLocaleId, setResult, unlink, update, update