Class PropertyVerificator<Input>
- java.lang.Object
-
- science.aist.gtf.verification.syntactic.PropertyVerificator<Input>
-
public class PropertyVerificator<Input> extends Object
Property verificator which checks if all containers of a class are initialized and filled and all fields are not only initialized but also set
You can use the PropertyVerificator with a spring configuration file like:
<bean id="propertyVerificator" class="science.aist.gtf.verification.syntactic.PropertyVerificator"/>or with own defined
PropertyRestrictorlike:<bean id="propertyVerificator" class="science.aist.gtf.verification.syntactic.PropertyVerificator"> <property name="restrictor"> <bean class="science.aist.gtf.verification.syntactic.PropertyRestrictor"> <!-- see {@link PropertyRestrictor} class description --> </bean> </property> </bean>- Since:
- 1.0
- Author:
- Andreas Pointner, Christoph Praschl
-
-
Constructor Summary
Constructors Constructor Description PropertyVerificator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyVerificatorResultgetInvalidProperties(Input obj)Function which searches recursively in obj and nested objects in obj for null fields, empty collections only default initialized primitive fieldsPropertyRestrictorgetRestrictor()voidsetRestrictor(PropertyRestrictor restrictor)
-
-
-
Method Detail
-
getRestrictor
public PropertyRestrictor getRestrictor()
- Returns:
- the
PropertyRestrictorused invisitorFactory
-
setRestrictor
public void setRestrictor(PropertyRestrictor restrictor)
- Parameters:
restrictor- sets thePropertyRestrictorused invisitorFactory
-
getInvalidProperties
public PropertyVerificatorResult getInvalidProperties(Input obj)
Function which searches recursively in obj and nested objects in obj for null fields, empty collections only default initialized primitive fields- Parameters:
obj- obj which should be checked- Returns:
- a Map with obj and its nested objects connected to all invalid fields and the reason of invalidity
-
-