@Retention(value=RUNTIME) @Target(value=TYPE) public @interface Exclude
@Exclude @Exclude(ifProjectStage=Production.class) @Exclude(exceptIfProjectStage=UnitTest.class) @Exclude(onExpression="myProperty==myValue") @Exclude(onExpression="[my custom expression syntax]", interpretedBy=CustomExpressionInterpreter.class)Examples:
@Exclude public class NoBean {}
@Exclude(ifProjectStage = ProjectStage.Development.class) public class ProductionBean {}
@Exclude(exceptIfProjectStage = ProjectStage.Development.class) public class DevBean {}
@Exclude(onExpression="myProperty==myValue") public class ProductionBean {}
@Exclude(onExpression="[my custom expression syntax]", interpretedBy=CustomExpressionInterpreter.class) public class ProductionBean {}
Modifier and Type | Optional Element and Description |
---|---|
Class<? extends ProjectStage>[] |
exceptIfProjectStage
The
ProjectStage s which lead to activating this bean. |
Class<? extends ProjectStage>[] |
ifProjectStage
The
ProjectStage s which lead to deactivating this bean. |
Class<? extends ExpressionInterpreter> |
interpretedBy |
String |
onExpression
Expression which signals if the annotated bean should be deactivated or not.
|
public abstract Class<? extends ProjectStage>[] ifProjectStage
ProjectStage
s which lead to deactivating this bean. If
the current ProjectStage is in this list, the bean will get vetoed.public abstract Class<? extends ProjectStage>[] exceptIfProjectStage
ProjectStage
s which lead to activating this bean. If the
current ProjectStage is not in this list, the bean will get vetoed.public abstract String onExpression
public abstract Class<? extends ExpressionInterpreter> interpretedBy
Copyright © 2020 The Apache Software Foundation. All rights reserved.