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 | Class and Description |
|---|---|
| public static interface | ModifierContributor.
A marker interface for modifiers that can be applied to fields. |
| public static interface | ModifierContributor.
A marker interface for modifiers that can be applied to methods. |
| public static interface | ModifierContributor.
A marker interface for modifiers that can be applied to method parameters. |
| public static interface | ModifierContributor.
A marker interface for modifiers that can be applied to types. |
| public static class | ModifierContributor.
The type of the T extends ModifierContributor>ModifierContributors being resolved.A resolver for Java modifiers represented by |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | EMPTY_MASK
The empty modifier. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The modifier mask that is to be applied to the target type or type member.Returns the mask of this modifier. |
| public int | Returns: The range of this contributor's property.Returns the entire range of modifiers that address this contributor's property. |
| public boolean | Returns: true if this contributor represents the default modifier.Determines if this is the default modifier. |
| EMPTY_MASK | back to summary |
|---|---|
| public static final int EMPTY_MASK The empty modifier. | |
| getMask | back to summary |
|---|---|
| public int getMask() Returns the mask of this modifier.
| |
| getRange | back to summary |
|---|---|
| public int getRange() Returns the entire range of modifiers that address this contributor's property.
| |
| isDefault | back to summary |
|---|---|
| public boolean isDefault() Determines if this is the default modifier.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | MASK
A mask for all legal modifiers of a Java field. |
| MASK | back to summary |
|---|---|
| public static final int MASK A mask for all legal modifiers of a Java field. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | MASK
A mask for all legal modifiers of a Java method. |
| MASK | back to summary |
|---|---|
| public static final int MASK A mask for all legal modifiers of a Java method. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | MASK
A mask for all legal modifiers of a Java parameter. |
| MASK | back to summary |
|---|---|
| public static final int MASK A mask for all legal modifiers of a Java parameter. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | MASK
A mask for all legal modifiers of a Java type. |
| MASK | back to summary |
|---|---|
| public static final int MASK A mask for all legal modifiers of a Java type. | |
ModifierContributors being resolved.
ModifierContributors.
| Modifier and Type | Field and Description |
|---|---|
| private final Collection | modifierContributors
The modifier contributors to resolve. |
| Access | Constructor and Description |
|---|---|
| protected | Resolver(Collection<? extends T>
The modifier contributors to resolve. modifierContributors)Creates a new resolver. |
| Modifier and Type | Method and Description |
|---|---|
| public static ModifierContributor. | Returns: A resolver for the provided modifier contributors.The modifier contributors to resolve. modifierContributorCreates a new resolver for modifier contributors to a type. |
| public static ModifierContributor. | Returns: A resolver for the provided modifier contributors.The modifier contributors to resolve. modifierContributorCreates a new resolver for modifier contributors to a field. |
| public static ModifierContributor. | Returns: A resolver for the provided modifier contributors.The modifier contributors to resolve. modifierContributorCreates a new resolver for modifier contributors to a method. |
| public static ModifierContributor. | Returns: A resolver for the provided modifier contributors.The modifier contributors to resolve. modifierContributorCreates a new resolver for modifier contributors to a parameter. |
| public static < The modifier contributors type. S extends ModifierContributor> ModifierContributor. | Returns: A resolver for the provided modifier contributors.The modifier contributors to resolve. modifierContributors)Creates a new resolver for any modifier contributor of a given type. |
| public int | Returns: The resolved modifiers.Resolves the modifier contributors based on a zero modifier. |
| public int | Returns: The resolved modifiers.The base modifiers. modifiers)Resolves the modifier contributors based on a given modifier. |
| modifierContributors | back to summary |
|---|---|
| private final Collection<? extends T> modifierContributors The modifier contributors to resolve. | |
| Resolver | back to summary |
|---|---|
| protected Resolver(Collection<? extends T> modifierContributors) Creates a new resolver.
| |
| of | back to summary |
|---|---|
| public static ModifierContributor. Creates a new resolver for modifier contributors to a type.
| |
| of | back to summary |
|---|---|
| public static ModifierContributor. Creates a new resolver for modifier contributors to a field.
| |
| of | back to summary |
|---|---|
| public static ModifierContributor. Creates a new resolver for modifier contributors to a method.
| |
| of | back to summary |
|---|---|
| public static ModifierContributor. Creates a new resolver for modifier contributors to a parameter.
| |
| of | back to summary |
|---|---|
| public static <S extends ModifierContributor> ModifierContributor. Creates a new resolver for any modifier contributor of a given type.
| |
| resolve | back to summary |
|---|---|
| public int resolve() Resolves the modifier contributors based on a zero modifier.
| |
| resolve | back to summary |
|---|---|
| public int resolve(int modifiers) Resolves the modifier contributors based on a given modifier.
| |