@Retention(value=RUNTIME) @Target(value=METHOD) public @interface Argument
InjectedCommand
s.Modifier and Type | Optional Element and Description |
---|---|
boolean |
allowOtherMatches
Specifies whether to allow additional matching elements in the context.
|
Class<? extends Object> |
match
Specifies the class to be matched.
|
boolean |
matchSubclasses
Specifies whether the elements eligible for this argument must match the declared type or the
type specified by
match() exactly or if sub-classes are allowed as well. |
boolean |
optional
Specifies whether the argument is optional.
|
public abstract boolean optional
null
, for Collection
valued arguments the collection may be empty.true
if the argument is optional.public abstract boolean allowOtherMatches
true
, additional matches for a scalar
argument are ignored, i.e. the command "sees" only the first match for the argument. If set to
false
, the command becomes invalid if there is more than one match for the
argument.true
if additional matches are allowed, false
otherwise.public abstract Class<? extends Object> match
public abstract boolean matchSubclasses
match()
exactly or if sub-classes are allowed as well.true
if sub-classes are also eligible for injection to the annotated
argument.Copyright © 2024 levigo holding gmbh. All rights reserved.