Class Lazy
- java.lang.Object
-
- org.identityconnectors.contract.data.groovy.Lazy
-
public abstract class Lazy extends Object
Support for lazy evaluation. "Lazy evaluation" means that property value is evaluated just when get(String) query is called in GroovyDataProvider.
Methods
get(Object)
,random(Object)
andrandom(Object, Class)
are ones used in contract tests' configuration.More detailed information is on web {@link https://identityconnectors.dev.java.net/contract-tests-groovy/index.html}
- Author:
- Zdenek Louzensky
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Object>
successors
protected Object
value
-
Constructor Summary
Constructors Constructor Description Lazy()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Lazy
get(Object prop)
retrieve value of another property dynamicallyList<Object>
getSuccessors()
Object
getValue()
Lazy
plus(String s)
overriding plus operation to be able to concatenate Lazy objects to others.Lazy
plus(Lazy lazy)
static Lazy
random(Object pattern)
static Lazy
random(Object pattern, Class<?> clazz)
generate a random object based on given pattern.void
setSuccessors(List<Object> successors)
void
setValue(Object value)
-
-
-
Method Detail
-
plus
public Lazy plus(String s)
overriding plus operation to be able to concatenate Lazy objects to others.
(not intented for programmer use)
- Parameters:
s
-- Returns:
-
plus
public Lazy plus(Lazy lazy)
- See Also:
plus(String)
-
get
public static Lazy get(Object prop)
retrieve value of another property dynamically- Parameters:
prop
- property name- Returns:
- property value
-
random
public static Lazy random(Object pattern)
- See Also:
random(Object, Class)
-
random
public static Lazy random(Object pattern, Class<?> clazz)
generate a random object based on given pattern. Object's constructor will be initialized with the string generated by pattern.- Parameters:
pattern
-clazz
-- Returns:
-
getValue
public Object getValue()
-
setValue
public void setValue(Object value)
-
-