Package org.jboss.managed.api.annotation

Examples of org.jboss.managed.api.annotation.ViewUse


        /**
         * Use viewUse as primary sort field and name as secondary sort field.
         */
        public int compare(ManagedProperty prop1, ManagedProperty prop2)
        {
            ViewUse prop1ViewUse = getPrimaryViewUse(prop1);
            ViewUse prop2ViewUse = getPrimaryViewUse(prop2);
            if (prop1ViewUse == null)
                return (prop2ViewUse == null) ? 0 : -1;
            if (prop2ViewUse == null)
                return 1;
            int result = prop1ViewUse.name().compareTo(prop2ViewUse.name());
            if (result == 0)
                result = prop1.getName().compareTo(prop2.getName()); // break the tie
            return result;
        }
View Full Code Here


        }

        @Nullable
        private static ViewUse getPrimaryViewUse(ManagedProperty managedProperty)
        {
            ViewUse viewUse;
            if (managedProperty.hasViewUse(ViewUse.CONFIGURATION))
                viewUse = ViewUse.CONFIGURATION;
            else if (managedProperty.hasViewUse(ViewUse.RUNTIME))
                viewUse = ViewUse.RUNTIME;
            else if (managedProperty.hasViewUse(ViewUse.STATISTIC))
View Full Code Here

TOP

Related Classes of org.jboss.managed.api.annotation.ViewUse

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.