Interface ModifierContributor
-
- All Known Subinterfaces:
ModifierContributor.ForField,ModifierContributor.ForMethod,ModifierContributor.ForModule,ModifierContributor.ForModule.OfExport,ModifierContributor.ForModule.OfOpen,ModifierContributor.ForModule.OfRequire,ModifierContributor.ForParameter,ModifierContributor.ForType
- All Known Implementing Classes:
EnumerationState,FieldManifestation,FieldPersistence,Mandate,MethodArguments,MethodManifestation,MethodStrictness,Openness,Ownership,ParameterManifestation,ProvisioningState,RequiredPhase,SynchronizationState,SyntheticState,Transitivity,TypeManifestation,Visibility
public interface ModifierContributorAn 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 asprivateandprotectedshould 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 Classes Modifier and Type Interface Description static interfaceModifierContributor.ForFieldA marker interface for modifiers that can be applied to fields.static interfaceModifierContributor.ForMethodA marker interface for modifiers that can be applied to methods.static interfaceModifierContributor.ForModuleA marker interface for modifiers that can be applied to modules.static interfaceModifierContributor.ForParameterA marker interface for modifiers that can be applied to method parameters.static interfaceModifierContributor.ForTypeA marker interface for modifiers that can be applied to types.static classModifierContributor.Resolver<T extends ModifierContributor>A resolver for Java modifiers represented byModifierContributors.
-
Field Summary
Fields Modifier and Type Field Description static intEMPTY_MASKThe empty modifier.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetMask()Returns the mask of this modifier.intgetRange()Returns the entire range of modifiers that address this contributor's property.booleanisDefault()Determines if this is the default modifier.
-
-
-
Field Detail
-
EMPTY_MASK
static final int EMPTY_MASK
The empty modifier.- See Also:
- Constant Field Values
-
-
Method Detail
-
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:
trueif this contributor represents the default modifier.
-
-