public interface ModifierContributor
This allows for a more expressive and type safe alternative of defining a type's or type member's modifiers. However, note that modifier's that apply competing modifiers (such as
private
and protected
should not be combined and will result in invalid types. An exception is thrown when built-in modifiers that
cannot be combined are used together.Modifier and Type | Interface and Description |
---|---|
static interface |
ModifierContributor.ForField
A marker interface for modifiers that can be applied to fields.
|
static interface |
ModifierContributor.ForMethod
A marker interface for modifiers that can be applied to methods.
|
static interface |
ModifierContributor.ForParameter
A marker interface for modifiers that can be applied to method parameters.
|
static interface |
ModifierContributor.ForType
A marker interface for modifiers that can be applied to types.
|
static class |
ModifierContributor.Resolver<T extends ModifierContributor>
A resolver for Java modifiers represented by
ModifierContributor s. |
Modifier and Type | Field and Description |
---|---|
static int |
EMPTY_MASK
The empty modifier.
|
Modifier and Type | Method and Description |
---|---|
int |
getMask()
Returns the mask of this modifier.
|
int |
getRange()
Returns the entire range of modifiers that address this contributor's property.
|
boolean |
isDefault()
Determines if this is the default modifier.
|
static final int EMPTY_MASK
int getMask()
int getRange()
boolean isDefault()
true
if this contributor represents the default modifier.Copyright © 2014–2024. All rights reserved.