/** * Returns the key specified on the component, component type, or {@link Integer#MIN_VALUE} * * @param logicalComponent the component * @return the key or null */ private int getOrder(LogicalComponent logicalComponent) { int order = logicalComponent.getDefinition().getOrder(); if (order == Integer.MIN_VALUE) { Component<?> component = logicalComponent.getDefinition(); if (component.getComponentType() != null) { order = component.getComponentType().getOrder(); } } return order; }
/** * Returns the key specified on the component, component type, or {@link Integer#MIN_VALUE} * * @param logicalComponent the component * @return the key or null */ private int getOrder(LogicalComponent logicalComponent) { int order = logicalComponent.getDefinition().getOrder(); if (order == Integer.MIN_VALUE) { Component<?> component = logicalComponent.getDefinition(); if (component.getComponentType() != null) { order = component.getComponentType().getOrder(); } } return order; }