java.lang.Object
java.lang.Record
org.aya.cli.parse.ModifierParser.Filter
- Record Components:
defaultMods- If a modifier is available, but not present in the declaration, we use the default value from here.available- Checks if a modifier is available.
- Enclosing class:
ModifierParser
public static record ModifierParser.Filter(@NotNull ModifierParser.Modifiers defaultMods, @NotNull Predicate<ModifierParser.Modifier> available)
extends Record
For different declarations we have different modifiers that are available.
-
Constructor Summary
ConstructorsConstructorDescriptionFilter(@NotNull ModifierParser.Modifiers defaultMods, @NotNull Predicate<ModifierParser.Modifier> available) Creates an instance of aFilterrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull ModifierParser.Filterand(@NotNull Predicate<ModifierParser.Modifier> and) @NotNull Predicate<ModifierParser.Modifier>Returns the value of theavailablerecord component.static @NotNull ModifierParser.Filtercreate(@NotNull org.aya.util.error.WithPos<org.aya.concrete.stmt.Stmt.Accessibility> defaultAcc, @NotNull org.aya.util.error.WithPos<org.aya.concrete.stmt.decl.DeclInfo.Personality> defaultPer, @NotNull EnumSet<ModifierParser.Modifier> miscAvail) @NotNull ModifierParser.ModifiersReturns the value of thedefaultModsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Filter
public Filter(@NotNull @NotNull ModifierParser.Modifiers defaultMods, @NotNull @NotNull Predicate<ModifierParser.Modifier> available) Creates an instance of aFilterrecord class.- Parameters:
defaultMods- the value for thedefaultModsrecord componentavailable- the value for theavailablerecord component
-
-
Method Details
-
and
@NotNull public @NotNull ModifierParser.Filter and(@NotNull @NotNull Predicate<ModifierParser.Modifier> and) -
create
@NotNull public static @NotNull ModifierParser.Filter create(@NotNull @NotNull org.aya.util.error.WithPos<org.aya.concrete.stmt.Stmt.Accessibility> defaultAcc, @NotNull @NotNull org.aya.util.error.WithPos<org.aya.concrete.stmt.decl.DeclInfo.Personality> defaultPer, @NotNull @NotNull EnumSet<ModifierParser.Modifier> miscAvail) - Parameters:
defaultAcc- DefaultStmt.AccessibilitydefaultPer- DefaultDeclInfo.PersonalitymiscAvail- Available miscellaneous modifiers, seeModifierParser.DefaultModifiers.miscAvail
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
defaultMods
Returns the value of thedefaultModsrecord component.- Returns:
- the value of the
defaultModsrecord component
-
available
Returns the value of theavailablerecord component.- Returns:
- the value of the
availablerecord component
-