@Override
protected void initValidationService()
{
final Element element = context( Element.class );
final PropertyDef property = context( PropertyDef.class );
final ListFactory<Validation> annotations = ListFactory.start();
if( property == null )
{
final ElementType type = element.type();
annotations.add( type.getAnnotations( Validation.class ) );
for( final Validations v : type.getAnnotations( Validations.class ) )
{
annotations.add( v.value() );
}
}
else
{
annotations.add( property.getAnnotations( Validation.class ) );
for( final Validations v : property.getAnnotations( Validations.class ) )
{
annotations.add( v.value() );
}
}