com.google.common.base.Objects.ToStringHelper Java Examples

The following examples show how to use com.google.common.base.Objects.ToStringHelper. 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: CellUtils.java    From phoenix-omid with Apache License 2.0 6 votes vote down vote up
@Override
public String toString() {
    ToStringHelper helper = Objects.toStringHelper(this);
    helper.add("row", Bytes.toStringBinary(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength()));
    helper.add("family", Bytes.toString(cell.getFamilyArray(), cell.getFamilyOffset(), cell.getFamilyLength()));
    helper.add("is shadow cell?", isShadowCell);
    helper.add("qualifier",
            Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength()));
    if (isShadowCell()) {
        int qualifierLength = qualifierLengthFromShadowCellQualifier(cell.getQualifierArray(),
                cell.getQualifierOffset(),
                cell.getQualifierLength());
        byte[] cellWithoutSc = removeShadowCellSuffixPrefix(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength());
        helper.add("qualifier whithout shadow cell suffix", Bytes.toString(cellWithoutSc));
    }
    helper.add("ts", cell.getTimestamp());
    return helper.toString();
}
 
Example #2
Source File: AWSEC2TemplateOptions.java    From attic-stratos with Apache License 2.0 6 votes vote down vote up
@Override
public ToStringHelper string() {
   ToStringHelper toString = super.string();
   if (monitoringEnabled)
      toString.add("monitoringEnabled", monitoringEnabled);
    if (publicIpAddressAssociated)
        toString.add("publicIpAddressAssociated", publicIpAddressAssociated);
   toString.add("placementGroup", placementGroup);
   if (noPlacementGroup)
      toString.add("noPlacementGroup", noPlacementGroup);
   toString.add("subnetId", subnetId);
   toString.add("spotPrice", spotPrice);
   if (spotOptions != RequestSpotInstancesOptions.NONE)
      toString.add("spotOptions", spotOptions);
   if (!groupIds.isEmpty())
      toString.add("groupIds", groupIds);
   toString.add("iamInstanceProfileArn", iamInstanceProfileArn);
   toString.add("iamInstanceProfileName", iamInstanceProfileName);
   toString.add("privateIpAddress", privateIpAddress);
   return toString;
}
 
Example #3
Source File: Main.java    From brooklyn-server with Apache License 2.0 6 votes vote down vote up
@Override
public ToStringHelper string() {
    return super.string()
            .add("app", app)
            .add("script", script)
            .add("location", locations)
            .add("port", port)
            .add("bindAddress", bindAddress)
            .add("noConsole", noConsole)
            .add("noConsoleSecurity", noConsoleSecurity)
            .add("startupFailOnPersistenceErrors", startupFailOnPersistenceErrors)
            .add("startupFailsOnCatalogErrors", startupFailOnCatalogErrors)
            .add("startupContinueOnWebErrors", startupContinueOnWebErrors)
            .add("startupFailOnManagedAppsErrors", startupFailOnManagedAppsErrors)
            .add("catalogInitial", catalogInitial)
            .add("stopWhichAppsOnShutdown", stopWhichAppsOnShutdown)
            .add("stopOnKeyPress", stopOnKeyPress)
            .add("localBrooklynProperties", localBrooklynProperties)
            .add("persist", persist)
            .add("persistenceLocation", persistenceLocation)
            .add("persistenceDir", persistenceDir)
            .add("highAvailability", highAvailability)
            .add("exitAndLeaveAppsRunningAfterStarting", exitAndLeaveAppsRunningAfterStarting);
}
 
Example #4
Source File: PlayerVsPlayerChallenge.java    From stendhal with GNU General Public License v2.0 5 votes vote down vote up
@Override
public String toString() {
	ToStringHelper helper = Objects.toStringHelper(this)
			.add("challenger", this.challenger.getName())
			.add("challenged", this.challenged.getName())
			.add("accepted", this.isAccepted());
	return helper.toString();
}
 
Example #5
Source File: Address.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public String toString() {
	ToStringHelper helper = Objects.toStringHelper(this);
	helper.add("postCode", this.postCode);
	helper.add("city", this.city);
	return helper.toString();
}
 
Example #6
Source File: Person.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public String toString() {
	ToStringHelper helper = Objects.toStringHelper(this);
	helper.add("name", this.name);
	helper.add("adress", this.address);
	return helper.toString();
}
 
Example #7
Source File: DeterministicKey.java    From bitherj with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    final ToStringHelper helper = Objects.toStringHelper(this).omitNullValues();
    helper.add("pub", Utils.bytesToHexString(pub));
    helper.add("chainCode", Utils.bytesToHexString(chainCode));
    helper.add("path", getPathAsString());
    if (creationTimeSeconds > 0)
        helper.add("creationTimeSeconds", creationTimeSeconds);
    helper.add("isEncrypted", isEncrypted());
    helper.add("isPubKeyOnly", isPubKeyOnly());
    return helper.toString();
}
 
Example #8
Source File: PortForwardManagerImpl.java    From brooklyn-server with Apache License 2.0 5 votes vote down vote up
@Override
protected ToStringHelper string() {
    int size;
    synchronized (mutex) {
        size = mappings.size();
    }
    return super.string().add("scope", getScope()).add("mappingsSize", size);
}
 
Example #9
Source File: Main.java    From brooklyn-server with Apache License 2.0 5 votes vote down vote up
@Override
public ToStringHelper string() {
    return super.string()
            .add("localBrooklynProperties", localBrooklynProperties)
            .add("persistenceLocation", persistenceLocation)
            .add("persistenceDir", persistenceDir)
            .add("destinationDir", destinationDir);
}
 
Example #10
Source File: AWSRunningInstance.java    From attic-stratos with Apache License 2.0 4 votes vote down vote up
@Override
protected ToStringHelper string() {
   return super.string().add("monitoringState", monitoringState).add("placementGroup", placementGroup)
            .add("subnetId", subnetId).add("spotInstanceRequestId", spotInstanceRequestId).add("vpcId", vpcId)
            .add("hypervisor", hypervisor).add("iamInstanceProfile", iamInstanceProfile.orNull());
}
 
Example #11
Source File: AbstractLocation.java    From brooklyn-server with Apache License 2.0 4 votes vote down vote up
/** override this, adding to the returned value, to supply additional fields to include in the toString */
protected ToStringHelper string() {
    return Objects.toStringHelper(getClass()).add("id", getId()).add("name", name);
}
 
Example #12
Source File: CloudExplorer.java    From brooklyn-server with Apache License 2.0 4 votes vote down vote up
@Override
public ToStringHelper string() {
    return super.string()
            .add("container", container)
            .add("blob", blob);
}
 
Example #13
Source File: CloudExplorer.java    From brooklyn-server with Apache License 2.0 4 votes vote down vote up
@Override
public ToStringHelper string() {
    return super.string()
            .add(BlobstoreListContainer.ARGUMENT_NAME, arguments);
}
 
Example #14
Source File: CloudExplorer.java    From brooklyn-server with Apache License 2.0 4 votes vote down vote up
@Override
public ToStringHelper string() {
    return super.string()
            .add(TerminateInstances.ARGUMENT_NAME, arguments);
}
 
Example #15
Source File: CloudExplorer.java    From brooklyn-server with Apache License 2.0 4 votes vote down vote up
@Override
public ToStringHelper string() {
    return super.string()
            .add(GetImage.ARGUMENT_NAME, arguments);
}
 
Example #16
Source File: CloudExplorer.java    From brooklyn-server with Apache License 2.0 4 votes vote down vote up
@Override
public ToStringHelper string() {
    return super.string()
            .add("location", location);
}
 
Example #17
Source File: AbstractMain.java    From brooklyn-server with Apache License 2.0 4 votes vote down vote up
@Override
public ToStringHelper string() {
    return super.string()
            .add("defines", getDefines());
}
 
Example #18
Source File: AbstractMain.java    From brooklyn-server with Apache License 2.0 4 votes vote down vote up
@Override
public ToStringHelper string() {
    return super.string()
            .add("arguments", arguments);
}
 
Example #19
Source File: AbstractMain.java    From brooklyn-server with Apache License 2.0 4 votes vote down vote up
public ToStringHelper string() {
    return Objects.toStringHelper(getClass())
            .add("verbose", verbose)
            .add("quiet", quiet);
}
 
Example #20
Source File: DerbySchema.java    From brooklyn-library with Apache License 2.0 4 votes vote down vote up
@Override
protected ToStringHelper toStringHelper() {
    return super.toStringHelper().add("name", name);
}
 
Example #21
Source File: DerbyDatabase.java    From brooklyn-library with Apache License 2.0 4 votes vote down vote up
@Override
protected ToStringHelper toStringHelper() {
    return super.toStringHelper().add("jdbcPort", getAttribute(JDBC_PORT));
}
 
Example #22
Source File: KafkaBrokerImpl.java    From brooklyn-library with Apache License 2.0 4 votes vote down vote up
@Override
protected ToStringHelper toStringHelper() {
    return super.toStringHelper()
            .add("kafkaPort", getKafkaPort());
}
 
Example #23
Source File: QpidBrokerImpl.java    From brooklyn-library with Apache License 2.0 4 votes vote down vote up
@Override
protected ToStringHelper toStringHelper() {
    return super.toStringHelper().add("amqpPort", getAmqpPort());
}
 
Example #24
Source File: RabbitBrokerImpl.java    From brooklyn-library with Apache License 2.0 4 votes vote down vote up
@Override
protected ToStringHelper toStringHelper() {
    return super.toStringHelper().add("amqpPort", getAmqpPort());
}
 
Example #25
Source File: RabbitDestination.java    From brooklyn-library with Apache License 2.0 4 votes vote down vote up
@Override
protected ToStringHelper toStringHelper() {
    return super.toStringHelper().add("virtualHost", getParent().getVirtualHost()).add("exchange", getExchangeName());
}
 
Example #26
Source File: ActiveMQBrokerImpl.java    From brooklyn-library with Apache License 2.0 4 votes vote down vote up
@Override
protected ToStringHelper toStringHelper() {
    return super.toStringHelper().add("openWirePort", getAttribute(OPEN_WIRE_PORT));
}
 
Example #27
Source File: AbstractZooKeeperImpl.java    From brooklyn-library with Apache License 2.0 4 votes vote down vote up
@Override
protected ToStringHelper toStringHelper() {
    return super.toStringHelper()
            .add("zookeeperPort", getZookeeperPort());
}
 
Example #28
Source File: AbstractEntity.java    From brooklyn-server with Apache License 2.0 2 votes vote down vote up
/**
 * Override this to add to the toString(), e.g. {@code return super.toStringHelper().add("port", port);}
 *
 * Cannot be used in combination with overriding the deprecated toStringFieldsToInclude.
 */
protected ToStringHelper toStringHelper() {
    return Objects.toStringHelper(this).omitNullValues().add("id", getId());
}