Top Description Fields Constructors Methods
liquibase

public Class ContextExpression

extends Object
Class Inheritance
Annotations
@lombok.NoArgsConstructor
@lombok.Setter
Imports
liquibase.util.ExpressionMatcher, .StringUtil, lombok.Getter, lombok.NoArgsConstructor, lombok.Setter, java.util.*

Encapsulates logic for evaluating if a set of runtime contexts matches a context expression string.

Field Summary

Modifier and TypeField and Description
private HashSet<String>
private String

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
add(String context)

public Set<String>
public boolean
public boolean
matches(Contexts runtimeContexts)

Returns true if the passed runtime contexts match this context expression

private boolean
matches(String expression, Contexts runtimeContexts)

public static boolean
private void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

contextsback to summary
private HashSet<String> contexts
originalStringback to summary
private String originalString
Annotations
@lombok.Getter

Constructor Detail

ContextExpressionback to summary
public ContextExpression(String... contexts)
ContextExpressionback to summary
public ContextExpression(String contexts)
ContextExpressionback to summary
public ContextExpression(Collection<String> contexts)

Method Detail

addback to summary
public boolean add(String context)
getContextsback to summary
public Set<String> getContexts()
isEmptyback to summary
public boolean isEmpty()
matchesback to summary
public boolean matches(Contexts runtimeContexts)

Returns true if the passed runtime contexts match this context expression

matchesback to summary
private boolean matches(String expression, Contexts runtimeContexts)
matchesAllback to summary
public static boolean matchesAll(Collection<ContextExpression> expressions, Contexts contexts)
parseContextStringback to summary
private void parseContextString(String contexts)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override