Interface StructureMarkup<T>
- Type Parameters:
T- structure mapped class
- All Known Implementing Classes:
GoArrayType,GoChanType,GoFuncData,GoFuncType,GoIMethod,GoInterfaceType,GoItab,GoMapType,GoMethod,GoModuledata,GoName,GoPlainType,GoPointerType,GoSliceType,GoStructType,GoType
public interface StructureMarkup<T>
Optional interface that structure mapped classes can implement that allows them to control how
their class is marked up.
TODO: possibly refactor these methods to take a StructureContext parameter, which will allow removing the getStructureContext method.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidCalled to allow the implementor to perform custom markup of itself.default List<?>Returns a list of items that should be recursively marked up.default StringReturns a string that can be used to place a label on the instance.default StringReturns the name of the instance, typically retrieved from data found inside the instance.
-
Method Details
-
getStructureContext
StructureContext<T> getStructureContext() -
getStructureName
Returns the name of the instance, typically retrieved from data found inside the instance.- Returns:
- string name, or null if this instance does not have a name
- Throws:
IOException
-
getStructureLabel
Returns a string that can be used to place a label on the instance.- Returns:
- string to be used as a labe, or null if there is not a valid label for the instance
- Throws:
IOException
-
additionalMarkup
Called to allow the implementor to perform custom markup of itself.- Throws:
IOException
-
getExternalInstancesToMarkup
Returns a list of items that should be recursively marked up.- Returns:
- list of structure mapped object instances that should be marked up
- Throws:
IOException
-