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 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.
  • Field Details

  • 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.