public class OnGrailsEnvCondition extends java.lang.Object implements Condition
Matches when the current Grails environment is one of those named by
grails.compiler.beans.ConditionalOnGrailsEnv.
The environment comes from grails.util.Environment.getCurrent(), which is the only
answer that accounts for Grails inferring an environment nobody set. That class lives in a module
this one is a dependency of, so it is reached reflectively rather than by import; where it is
absent the grails.env property is consulted instead, which covers the case the property
was designed for - an explicitly set environment - and leaves the condition unmatched otherwise
rather than guessing.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public boolean |
matches(ConditionContext context, AnnotatedTypeMetadata metadata) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |