Java Code Examples for org.apache.commons.lang.builder.ReflectionToStringBuilder#reflectionToString()

The following examples show how to use org.apache.commons.lang.builder.ReflectionToStringBuilder#reflectionToString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractInvalidationClusterTest.java    From keycloak with Apache License 2.0 6 votes vote down vote up
protected void assertEntityOnSurvivorNodesEqualsTo(T testEntityOnFailNode) {
    boolean entityDiffers = false;
    for (ContainerInfo survivorNode : getCurrentSurvivorNodes()) {
        T testEntityOnSurvivorNode = readEntity(testEntityOnFailNode, survivorNode);
        if (EqualsBuilder.reflectionEquals(testEntityOnSurvivorNode, testEntityOnFailNode, excludedComparisonFields)) {
            log.info(String.format("Verification of %s on survivor %s PASSED", getEntityType(testEntityOnFailNode), survivorNode));
        } else {
            entityDiffers = true;
            log.error(String.format("Verification of %s on survivor %s FAILED", getEntityType(testEntityOnFailNode), survivorNode));
            String tf = ReflectionToStringBuilder.reflectionToString(testEntityOnFailNode, ToStringStyle.SHORT_PREFIX_STYLE);
            String ts = ReflectionToStringBuilder.reflectionToString(testEntityOnSurvivorNode, ToStringStyle.SHORT_PREFIX_STYLE);
            log.error(String.format(
                    "\nEntity on fail node: \n%s\n"
                    + "\nEntity on survivor node: \n%s\n"
                    + "\nDifference: \n%s\n",
                    tf, ts, StringUtils.difference(tf, ts)));
        }
    }
    assertFalse(entityDiffers);
}
 
Example 2
Source File: PluginPackageDataModel.java    From wecube-platform with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.reflectionToString(this);
}
 
Example 3
Source File: PluginPackage.java    From wecube-platform with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.reflectionToString(this);
}
 
Example 4
Source File: VifAttachment.java    From cosmic with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE, false);
}
 
Example 5
Source File: BaseNiciraEntity.java    From cosmic with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE, false);
}
 
Example 6
Source File: AccessRule.java    From cosmic with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE, false);
}
 
Example 7
Source File: BootstrapException.java    From chassis with Apache License 2.0 4 votes vote down vote up
public ZookeeperInitializationException(String zookeeperHost, Exhibitors exhibitors, Exception e) {
    super("Unable to initialize zookeeper configuration for zookeeper " + zookeeperHost + ". Exhibitors:" + ReflectionToStringBuilder.reflectionToString(exhibitors), e);
}
 
Example 8
Source File: VifAttachment.java    From cloudstack with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE, false);
}
 
Example 9
Source File: BaseNiciraEntity.java    From cloudstack with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE, false);
}
 
Example 10
Source File: AccessRule.java    From cloudstack with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return ReflectionToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE, false);
}