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 Classes
    Modifier and Type
    Interface
    Description
    static 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 by ModifierContributors.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The empty modifier.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the mask of this modifier.
    int
    Returns the entire range of modifiers that address this contributor's property.
    boolean
    Determines if this is the default modifier.
  • 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.