@Override public boolean equals( final Object rhs ) { if ( this == rhs ) { return true; } if ( rhs instanceof Component ) { final Component cmp = (Component) rhs; if ( role.equals( cmp.role() ) && hint.equals( cmp.hint() ) && instantiationStrategy.equals( cmp.instantiationStrategy() ) && description.equals( cmp.description() ) ) { // optimization: we hard-code all these attributes to be empty final String hardCodedAttributes = cmp.alias() + cmp.composer() + cmp.configurator() + cmp.factory() + cmp.lifecycleHandler() + cmp.profile() + cmp.type() + cmp.version(); return hardCodedAttributes.length() == 0 && !cmp.isolatedRealm(); } } return false; }
@Override public boolean equals( final Object rhs ) { if ( this == rhs ) { return true; } if ( rhs instanceof Component ) { final Component cmp = (Component) rhs; if ( role.equals( cmp.role() ) && hint.equals( cmp.hint() ) && instantiationStrategy.equals( cmp.instantiationStrategy() ) && description.equals( cmp.description() ) ) { // optimization: we hard-code all these attributes to be empty final String hardCodedAttributes = cmp.alias() + cmp.composer() + cmp.configurator() + cmp.factory() + cmp.lifecycleHandler() + cmp.profile() + cmp.type() + cmp.version(); return hardCodedAttributes.length() == 0 && !cmp.isolatedRealm(); } } return false; }
@Override public boolean equals( final Object rhs ) { if ( this == rhs ) { return true; } if ( rhs instanceof Component ) { final Component cmp = (Component) rhs; if ( role.equals( cmp.role() ) && hint.equals( cmp.hint() ) && instantiationStrategy.equals( cmp.instantiationStrategy() ) && description.equals( cmp.description() ) ) { // optimization: we hard-code all these attributes to be empty final String hardCodedAttributes = cmp.alias() + cmp.composer() + cmp.configurator() + cmp.factory() + cmp.lifecycleHandler() + cmp.profile() + cmp.type() + cmp.version(); return hardCodedAttributes.length() == 0 && !cmp.isolatedRealm(); } } return false; }
component.setComponentFactory(filterEmptyAsNull(anno.factory()));