public final class Tags extends Object
TagsComponent
.Modifier and Type | Method and Description |
---|---|
static TaggingState |
getState()
Returns the current
TaggingState . |
static Tagger |
getTagger()
Returns the default
Tagger . |
static TagPropagationComponent |
getTagPropagationComponent()
Returns the default
TagPropagationComponent . |
static void |
setState(TaggingState state)
Deprecated.
This method is deprecated because other libraries could cache the result of
getState() , use a stale value, and behave incorrectly. It is only safe to call early in
initialization. This method throws IllegalStateException after getState()
has been called, in order to limit changes to the result of getState() . |
public static Tagger getTagger()
Tagger
.Tagger
.public static TagPropagationComponent getTagPropagationComponent()
TagPropagationComponent
.TagPropagationComponent
.public static TaggingState getState()
TaggingState
.
When no implementation is available, getState
always returns TaggingState.DISABLED
.
Once getState()
is called, subsequent calls to setState(TaggingState)
will
throw an IllegalStateException
.
TaggingState
.@Deprecated public static void setState(TaggingState state)
getState()
, use a stale value, and behave incorrectly. It is only safe to call early in
initialization. This method throws IllegalStateException
after getState()
has been called, in order to limit changes to the result of getState()
.TaggingState
.
When no implementation is available, setState
does not change the state.
state
- the new TaggingState
.IllegalStateException
- if getState()
was previously called.