static class StrictAttributeParser.FieldReferenceDelegate extends java.lang.Object implements FieldReferenceConverter.Delegate
Constructor and Description |
---|
FieldReferenceDelegate(JType... types) |
Modifier and Type | Method and Description |
---|---|
JType[] |
getTypes()
Returns the types any parsed field references are expected to return.
|
java.lang.String |
handleFragment(java.lang.String fragment)
Called for fragment around and between field references.
|
java.lang.String |
handleReference(java.lang.String reference)
Called for each expanded field reference, to allow it to be stitched
together with surrounding fragments.
|
FieldReferenceDelegate(JType... types)
public JType[] getTypes()
FieldReferenceConverter.Delegate
getTypes
in interface FieldReferenceConverter.Delegate
public java.lang.String handleFragment(java.lang.String fragment) throws FieldReferenceConverter.IllegalFieldReferenceException
FieldReferenceConverter.Delegate
Note that it will be called with empty strings if these surrounding bits are empty. E.g., "{style.enabled} fancy {style.impressive}" would call this method three times, with "", " fancy ", and "".
A string with no field references is treated as a single fragment, and causes a single call to this method.
handleFragment
in interface FieldReferenceConverter.Delegate
FieldReferenceConverter.IllegalFieldReferenceException
public java.lang.String handleReference(java.lang.String reference) throws FieldReferenceConverter.IllegalFieldReferenceException
FieldReferenceConverter.Delegate
handleReference
in interface FieldReferenceConverter.Delegate
FieldReferenceConverter.IllegalFieldReferenceException