Package org.eclipse.sapphire.modeling.xml.annotations

Examples of org.eclipse.sapphire.modeling.xml.annotations.CustomXmlValueBinding


    {
        PropertyBinding binding = null;
       
        if( property instanceof Value )
        {
            final CustomXmlValueBinding customBindingAnnotation = property.definition().getAnnotation( CustomXmlValueBinding.class );
           
            if( customBindingAnnotation != null )
            {
                try
                {
                    binding = customBindingAnnotation.impl().newInstance();
                }
                catch( Exception e )
                {
                    Sapphire.service( LoggingService.class ).log( e );
                    binding = null;
                }
            }
            else
            {
                binding = new StandardXmlValueBindingImpl();
            }
        }
        else if( property instanceof ElementHandle )
        {
            final CustomXmlElementBinding customBindingAnnotation = property.definition().getAnnotation( CustomXmlElementBinding.class );
           
            if( customBindingAnnotation != null )
            {
                try
                {
                    binding = customBindingAnnotation.impl().newInstance();
                }
                catch( Exception e )
                {
                    Sapphire.service( LoggingService.class ).log( e );
                    binding = null;
                }
            }
            else if( property.definition() instanceof ImpliedElementProperty )
            {
                binding = new StandardImpliedXmlElementBindingImpl();
            }
            else
            {
                binding = new StandardXmlElementBindingImpl();
            }
        }
        else if( property instanceof ElementList )
        {
            final CustomXmlListBinding customBindingAnnotation = property.definition().getAnnotation( CustomXmlListBinding.class );
           
            if( customBindingAnnotation != null )
            {
                try
                {
                    binding = customBindingAnnotation.impl().newInstance();
                }
                catch( Exception e )
                {
                    Sapphire.service( LoggingService.class ).log( e );
                    binding = null;
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.modeling.xml.annotations.CustomXmlValueBinding

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.