List of usage examples for org.apache.commons.lang.builder ReflectionToStringBuilder toString
public String toString()
Gets the String built by this builder.
From source file:com.sylvanaar.idea.Lua.lang.parser.kahlua.InstructionPtr.java
@Override public String toString() { ReflectionToStringBuilder sb = new ReflectionToStringBuilder(this); return sb.toString(); }
From source file:com.aeells.hibernate.model.Parent.java
@Override public String toString() { final ReflectionToStringBuilder builder = new ReflectionToStringBuilder(this); builder.setExcludeFieldNames(EXCLUDED_FIELDS); return builder.toString(); }
From source file:jp.go.nict.langrid.dao.entity.UpdateManagedEntity.java
@Override public String toString() { ReflectionToStringBuilder b = new ReflectionToStringBuilder(this); b.setExcludeFieldNames(new String[] { "createdDateTime", "updatedDateTime" }); b.append("createdDateTime", createdDateTime != null ? CalendarUtil.formatToDefault(createdDateTime) : null); b.append("updatedDateTime", updatedDateTime != null ? CalendarUtil.formatToDefault(updatedDateTime) : null); return b.toString(); }
From source file:jp.go.nict.langrid.service_1_2.foundation.servicemanagement.ServiceInstance.java
@Override public String toString() { ReflectionToStringBuilder b = new ReflectionToStringBuilder(this); b.setExcludeFieldNames(new String[] { "instance" }); if (instance != null) { byte[] inst = instance; if (inst.length > 256) { inst = Arrays.copyOf(instance, 64); }/*from w w w . ja v a2s. co m*/ b.append("instance", inst); } else { b.append("instance", "null"); } return b.toString(); }
From source file:jp.go.nict.langrid.dao.entity.ServiceEndpoint.java
@Override public String toString() { ReflectionToStringBuilder b = new ReflectionToStringBuilder(this); b.setExcludeFieldNames(new String[] { "createdDateTime", "updatedDateTime", "disabledByErrorDate" }); b.append("createdDateTime", getCreatedDateTime() != null ? CalendarUtil.formatToDefault(getCreatedDateTime()) : null); b.append("updatedDateTime", getUpdatedDateTime() != null ? CalendarUtil.formatToDefault(getUpdatedDateTime()) : null); b.append("disabledByErrorDate", getDisabledByErrorDate() != null ? CalendarUtil.formatToDefault(getDisabledByErrorDate()) : null); return b.toString(); }
From source file:edu.utah.further.ds.further.model.impl.domain.Person.java
@Override public String toString() { return ReflectionToStringBuilder .toStringExclude(this, new String[] { "orders", "providers", "observations", "encounters", "locations" }) .toString();/*from ww w . j ava 2 s . co m*/ }
From source file:org.fornax.cartridges.sculptor.framework.domain.AbstractDomainObject.java
/** * Only "simple" types will be included in toString. Relations to other * domain objects can not be included since we don't know if they are * fetched and we don't wont toString to fetch them. * <p>/*w w w . j av a 2 s. c o m*/ * More intelligent implementation can be done in subclasses if needed. * Subclasses may also override {@link #acceptToString(Field)}. * <p> * The */ @Override public String toString() { try { ReflectionToStringBuilder builder = new ReflectionToStringBuilder(this, toStringStyle()) { @Override protected boolean accept(Field f) { if (super.accept(f)) { return acceptToString(f); } else { return false; } } }; builder.setAppendStatics(false); builder.setAppendTransients(true); return builder.toString(); } catch (RuntimeException e) { // toString is only used for debug purpose and // eventual exceptions should not be "ignored" return "RuntimeException in " + getClass().getName() + ".toString():" + e.getMessage(); } }
From source file:org.kuali.kfs.pdp.businessobject.PayeeACHAccount.java
/** * KFSCNTRB-1682: Some of the fields contain confidential information * @see org.kuali.rice.krad.bo.BusinessObjectBase#toString() *//*from w ww . j a va 2 s . co m*/ @Override public String toString() { class PayeeACHAccountToStringBuilder extends ReflectionToStringBuilder { private PayeeACHAccountToStringBuilder(Object object) { super(object); } @Override public boolean accept(Field field) { if (BusinessObject.class.isAssignableFrom(field.getType())) { return false; } DataDictionaryService dataDictionaryService = SpringContext.getBean(DataDictionaryService.class); AttributeSecurity attributeSecurity = dataDictionaryService .getAttributeSecurity(PayeeACHAccount.class.getName(), field.getName()); if ((ObjectUtils.isNotNull(attributeSecurity) && (attributeSecurity.isHide() || attributeSecurity.isMask() || attributeSecurity.isPartialMask()))) { return false; } return super.accept(field); } } ; ReflectionToStringBuilder toStringBuilder = new PayeeACHAccountToStringBuilder(this); return toStringBuilder.toString(); }
From source file:org.kuali.kfs.vnd.businessobject.VendorHeader.java
@Override public String toString() { class VendorHeaderToStringBuilder extends ReflectionToStringBuilder { private VendorHeaderToStringBuilder(Object object) { super(object); }//from w w w . j a v a2s.co m @Override public boolean accept(Field field) { if (BusinessObject.class.isAssignableFrom(field.getType())) { return false; } DataDictionaryService dataDictionaryService = SpringContext.getBean(DataDictionaryService.class); AttributeSecurity attributeSecurity = dataDictionaryService .getAttributeSecurity(VendorHeader.class.getName(), field.getName()); if (ObjectUtils.isNotNull(attributeSecurity) && (attributeSecurity.isHide() || attributeSecurity.isMask() || attributeSecurity.isPartialMask())) { return false; } return super.accept(field); } } ; ReflectionToStringBuilder toStringBuilder = new VendorHeaderToStringBuilder(this); return toStringBuilder.toString(); }
From source file:org.kuali.kfs.vnd.businessobject.VendorTaxChange.java
@Override public String toString() { class VendorTaxChangeToStringBuilder extends ReflectionToStringBuilder { private VendorTaxChangeToStringBuilder(Object object) { super(object); }/*from w w w . jav a 2 s. c o m*/ @Override public boolean accept(Field field) { if (BusinessObject.class.isAssignableFrom(field.getType())) { return false; } DataDictionaryService dataDictionaryService = SpringContext.getBean(DataDictionaryService.class); AttributeSecurity attributeSecurity = dataDictionaryService .getAttributeSecurity(VendorTaxChange.class.getName(), field.getName()); if (ObjectUtils.isNotNull(attributeSecurity) && (attributeSecurity.isHide() || attributeSecurity.isMask() || attributeSecurity.isPartialMask())) { return false; } return super.accept(field); } } ; ReflectionToStringBuilder toStringBuilder = new VendorTaxChangeToStringBuilder(this); return toStringBuilder.toString(); }