Interface ModifierContributor
- All Known Subinterfaces:
ModifierContributor.ForField
,ModifierContributor.ForMethod
,ModifierContributor.ForParameter
,ModifierContributor.ForType
- All Known Implementing Classes:
EnumerationState
,FieldManifestation
,FieldPersistence
,Mandate
,MethodArguments
,MethodManifestation
,MethodStrictness
,Ownership
,ParameterManifestation
,ProvisioningState
,SynchronizationState
,SyntheticState
,TypeManifestation
,Visibility
public interface ModifierContributor
An element that describes a type modifier as described in the
JVMS.
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.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
A marker interface for modifiers that can be applied to fields.static interface
A marker interface for modifiers that can be applied to methods.static interface
A marker interface for modifiers that can be applied to method parameters.static interface
A marker interface for modifiers that can be applied to types.static class
A resolver for Java modifiers represented byModifierContributor
s. -
Field Summary
Fields -
Method Summary
-
Field Details
-
EMPTY_MASK
static final int EMPTY_MASKThe empty modifier.- See Also:
-
-
Method Details
-
getMask
int getMask()Returns the mask of this modifier.- Returns:
- The modifier mask that is to be applied to the target type or type member.
-
getRange
int getRange()Returns the entire range of modifiers that address this contributor's property.- Returns:
- The range of this contributor's property.
-
isDefault
boolean isDefault()Determines if this is the default modifier.- Returns:
true
if this contributor represents the default modifier.
-