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

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


    /**
     * 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;
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;

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;

View Full Code Here

TOP

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

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.