Skip to content

Keyword default für Standardwerte bei Custom Annotations #26

@NiklasHargarter

Description

@NiklasHargarter

Das Keyword default wird verwendet, um einen Standardwert zu setzen, wenn eine Annotation deklariert wird.
Using Default Values

Im Parser muss nach dem Keyword default eine assignExp folgen.
assignExp = try switchExp <|> try methodRef <|> try lambdaExp <|> try assignment <|> condExp

Laut Javaspecification wird default gefolgt von einem ElementValue.
DefaultValue:
default ElementValue
ElementValue:
ConditionalExpression
ElementValueArrayInitializer
Annotation

In IntelliJ gibt es den Hinweis "Attribute value must be constant"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions