Package org.eclipse.sapphire.java

Examples of org.eclipse.sapphire.java.JavaTypeConstraint


    @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() );
    }
View Full Code Here


        {
            final ValueProperty property = context.find( ValueProperty.class );
           
            if( property != null && property.getTypeClass() == JavaTypeName.class )
            {
                final JavaTypeConstraint constraintAnnotation = property.getAnnotation( JavaTypeConstraint.class );
               
                if ( constraintAnnotation != null )
                {
                    return true;
                }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.java.JavaTypeConstraint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.