@Override
protected void initJavaTypeConstraintService()
{
final PropertyDef property = context().find( PropertyDef.class );
final JavaTypeConstraint javaTypeConstraintAnnotation = property.getAnnotation( JavaTypeConstraint.class );
final Set<JavaTypeKind> kind = EnumSet.noneOf( JavaTypeKind.class );
for( JavaTypeKind k : javaTypeConstraintAnnotation.kind() )
{
kind.add( k );
}
final Set<String> type = new HashSet<String>();
for( String t : javaTypeConstraintAnnotation.type() )
{
if( t != null )
{
t = t.trim();
if( t.length() > 0 )
{
type.add( t );
}
}
}
this.data = new JavaTypeConstraintServiceData( kind, type, javaTypeConstraintAnnotation.behavior() );
}