Package org.apache.beehive.controls.api.versioning

Examples of org.apache.beehive.controls.api.versioning.Version


     * Enforces the VersionRequired annotation for control fields.
     */
    private void enforceVersionRequired( FieldDeclaration f, InterfaceDeclaration controlIntf )
    {
        VersionRequired versionRequired = f.getAnnotation(VersionRequired.class);
        Version versionPresent = controlIntf.getAnnotation(Version.class);

        if ( versionRequired != null )
        {
            int majorRequired = versionRequired.major();
            int minorRequired = versionRequired.minor();

            if ( majorRequired < 0 )    // no real version requirement
                return;

            int majorPresent = -1;
            int minorPresent = -1;
            if ( versionPresent != null )
            {
                majorPresent = versionPresent.major();
                minorPresent = versionPresent.minor();

                if ( majorRequired <= majorPresent &&
                     (minorRequired < 0 || minorRequired <= minorPresent) )
                {
                    // Version requirement is satisfied
View Full Code Here


            if ( ci == null )
                return;

            int majorPresent = -1;
            int minorPresent = -1;
            Version ciVersion = ci._version;
            if ( ciVersion != null )
            {
                majorPresent = ciVersion.major();
                minorPresent = ciVersion.minor();

                if ( majorRequired <= majorPresent &&
                     (minorRequired < 0 || minorRequired <= minorPresent) )
                {
                    // Version requirement is satisfied
View Full Code Here

            if ( ci == null )
                return;

            int majorPresent = -1;
            int minorPresent = -1;
            Version ciVersion = ci.getVersion();
            if ( ciVersion != null )
            {
                majorPresent = ciVersion.major();
                minorPresent = ciVersion.minor();

                if ( majorSupported >= majorPresent &&
                     (minorSupported < 0 || minorSupported >= minorPresent) )
                {
                    // Version requirement is satisfied
View Full Code Here

     */
    protected static void enforceVersionRequired( ControlBean control, VersionRequired versionRequired )
    {
        Class controlIntf = control.getMostDerivedInterface( control.getControlInterface() );

        Version versionPresent = (Version) controlIntf.getAnnotation( Version.class );
        if ( versionPresent != null )
        {
            ControlBean.enforceVersionRequired( controlIntf.getCanonicalName(), versionPresent, versionRequired );
        }
    }
View Full Code Here

     * Enforces the VersionRequired annotation for control fields.
     */
    private void enforceVersionRequired( FieldDeclaration f, InterfaceDeclaration controlIntf )
    {
        VersionRequired versionRequired = f.getAnnotation(VersionRequired.class);
        Version versionPresent = controlIntf.getAnnotation(Version.class);

        if (versionRequired != null) {
            int majorRequired = -1;
            try {
                majorRequired = versionRequired.major();
            }
            catch(NullPointerException ignore) {
                /*
                the major version annotation is required and if unspecified, will
                throw an NPE when it is quereid but not provided.  this error will
                be caught during syntactic validation perfoemed by javac, so ignore
                it if an NPE is caught here
                 */
                return;
            }

            int minorRequired = versionRequired.minor();

            /* no version requirement, so return */
            if(majorRequired < 0)
                return;

            int majorPresent = -1;
            int minorPresent = -1;
            if ( versionPresent != null )
            {
                try {
                    majorPresent = versionPresent.major();
                }
                catch(NullPointerException ignore) {
                    /*
                    the major version annotation is required and if unspecified, will
                    throw an NPE when it is quereid but not provided.  this error will
                    be caught during syntactic validation perfoemed by javac, so ignore
                    it if an NPE is caught here
                     */
                }

                minorPresent = versionPresent.minor();

                if ( majorRequired <= majorPresent &&
                     (minorRequired < 0 || minorRequired <= minorPresent) )
                {
                    // Version requirement is satisfied
View Full Code Here

            if ( ci == null )
                return;

            int majorPresent = -1;
            int minorPresent = -1;
            Version ciVersion = ci._version;
            if ( ciVersion != null )
            {
                majorPresent = ciVersion.major();
                minorPresent = ciVersion.minor();

                if ( majorRequired <= majorPresent &&
                     (minorRequired < 0 || minorRequired <= minorPresent) )
                {
                    // Version requirement is satisfied
View Full Code Here

            if ( ci == null )
                return;

            int majorPresent = -1;
            int minorPresent = -1;
            Version ciVersion = ci.getVersion();
            if ( ciVersion != null )
            {
                majorPresent = ciVersion.major();
                minorPresent = ciVersion.minor();

                if ( majorSupported >= majorPresent &&
                     (minorSupported < 0 || minorSupported >= minorPresent) )
                {
                    // Version requirement is satisfied
View Full Code Here

     * Enforces the VersionRequired annotation for control fields.
     */
    private void enforceVersionRequired( FieldDeclaration f, InterfaceDeclaration controlIntf )
    {
        VersionRequired versionRequired = f.getAnnotation(VersionRequired.class);
        Version versionPresent = controlIntf.getAnnotation(Version.class);

        if (versionRequired != null) {
            int majorRequired = -1;
            try {
                majorRequired = versionRequired.major();
            }
            catch(NullPointerException ignore) {
                /*
                the major version annotation is required and if unspecified, will
                throw an NPE when it is quereid but not provided.  this error will
                be caught during syntactic validation perfoemed by javac, so ignore
                it if an NPE is caught here
                 */
                return;
            }

            int minorRequired = versionRequired.minor();

            /* no version requirement, so return */
            if(majorRequired < 0)
                return;

            int majorPresent = -1;
            int minorPresent = -1;
            if ( versionPresent != null )
            {
                try {
                    majorPresent = versionPresent.major();
                }
                catch(NullPointerException ignore) {
                    /*
                    the major version annotation is required and if unspecified, will
                    throw an NPE when it is quereid but not provided.  this error will
                    be caught during syntactic validation perfoemed by javac, so ignore
                    it if an NPE is caught here
                     */
                }

                minorPresent = versionPresent.minor();

                if ( majorRequired <= majorPresent &&
                     (minorRequired < 0 || minorRequired <= minorPresent) )
                {
                    // Version requirement is satisfied
View Full Code Here

            if ( ci == null )
                return;

            int majorPresent = -1;
            int minorPresent = -1;
            Version ciVersion = ci.getVersion();
            if ( ciVersion != null )
            {
                majorPresent = ciVersion.major();
                minorPresent = ciVersion.minor();

                if ( majorSupported >= majorPresent &&
                     (minorSupported < 0 || minorSupported >= minorPresent) )
                {
                    // Version requirement is satisfied
View Full Code Here

            if ( ci == null )
                return;

            int majorPresent = -1;
            int minorPresent = -1;
            Version ciVersion = ci._version;
            if ( ciVersion != null )
            {
                majorPresent = ciVersion.major();
                minorPresent = ciVersion.minor();

                if ( majorRequired <= majorPresent &&
                     (minorRequired < 0 || minorRequired <= minorPresent) )
                {
                    // Version requirement is satisfied
View Full Code Here

TOP

Related Classes of org.apache.beehive.controls.api.versioning.Version

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.