public class MetawidgetAnnotationInspector extends BaseObjectInspector
Note: the name of this class is longwinded for extra clarity. It is not just a 'MetawidgetInspector', because of course there are lots of different Metawidget Inspectors. Equally, it is not just an 'AnnotationInspector', because it doesn't generically scan all possible annotations.
mLog
Constructor and Description |
---|
MetawidgetAnnotationInspector() |
MetawidgetAnnotationInspector(BaseObjectInspectorConfig config) |
Modifier and Type | Method and Description |
---|---|
protected Map<String,String> |
inspectAction(Action action)
Inspect the given action and return a Map of attributes.
|
protected Map<String,String> |
inspectProperty(Property property)
Inspect the given property and return a Map of attributes.
|
protected Map<String,String> |
inspectTrait(Trait trait)
Inspect the given trait and return a Map of attributes.
|
getActions, getProperties, inspect, inspectAsDom, inspectEntity, inspectParent, inspectTraits, shouldInspectPropertyAsEntity
public MetawidgetAnnotationInspector()
public MetawidgetAnnotationInspector(BaseObjectInspectorConfig config)
protected Map<String,String> inspectTrait(Trait trait) throws Exception
BaseObjectInspector
A 'trait' is an interface common to both Property
and Action
, so
you can override this single method if your annotation is applicable to both. For example,
UiLabel
.
In the event of an overlap between the attributes set by inspectTrait
and those
set by inspectProperty
/inspectAction
, the latter will receive
precedence.
Note: for convenience, this method does not expect subclasses to deal with DOMs and Elements. Those subclasses wanting more control over these features should override methods higher in the call stack instead.
Does nothing by default.
inspectTrait
in class BaseObjectInspector
trait
- the trait to inspectException
protected Map<String,String> inspectProperty(Property property) throws Exception
BaseObjectInspector
Note: for convenience, this method does not expect subclasses to deal with DOMs and Elements. Those subclasses wanting more control over these features should override methods higher in the call stack instead.
Does nothing by default.
inspectProperty
in class BaseObjectInspector
property
- the property to inspectException
protected Map<String,String> inspectAction(Action action) throws Exception
BaseObjectInspector
Note: for convenience, this method does not expect subclasses to deal with DOMs and Elements. Those subclasses wanting more control over these features should override methods higher in the call stack instead.
Does nothing by default.
inspectAction
in class BaseObjectInspector
action
- the action to inspectException
Copyright © 2015. All Rights Reserved.