use of org.apache.sis.util.Debug in project sis by apache.
the class Formatter method toString.
/**
* Returns a string representation of this formatter for debugging purpose.
*
* @return a string representation of this formatter.
*/
@Debug
@Override
public String toString() {
final StringBuilder b = new StringBuilder(Classes.getShortClassName(this));
String separator = " of ";
for (int i = enclosingElements.size(); --i >= 0; ) {
b.append(separator).append(Classes.getShortClassName(enclosingElements.get(i)));
separator = " inside ";
}
return b.toString();
}
use of org.apache.sis.util.Debug in project sis by apache.
the class PropertyAccessor method toString.
/**
* Returns a string representation of this accessor for debugging purpose.
* Output example:
*
* {@preformat text
* PropertyAccessor[13 getters & 13 setters in DefaultCitation:Citation from “ISO 19115”]
* }
*/
@Debug
@Override
public String toString() {
final StringBuilder buffer = new StringBuilder(60);
buffer.append("PropertyAccessor[").append(standardCount).append(" getters");
final int extra = allCount - standardCount;
if (extra != 0) {
buffer.append(" (+").append(extra).append(" ext.)");
}
if (setters != null) {
int c = 0;
for (final Method setter : setters) {
if (setter != null) {
c++;
}
}
buffer.append(" & ").append(c).append(" setters");
}
buffer.append(" in ").append(Classes.getShortName(implementation));
if (type != implementation) {
buffer.append(':').append(Classes.getShortName(type));
}
return buffer.append(" from “").append(Citations.getIdentifier(standard, false)).append("”]").toString();
}
use of org.apache.sis.util.Debug in project sis by apache.
the class SimpleIdentifier method toString.
/**
* Returns a string representation of this identifier.
*/
@Debug
@Override
public String toString() {
final String classname = Classes.getShortClassName(this);
final StringBuilder buffer = new StringBuilder(classname.length() + CharSequences.length(code) + 10);
buffer.append(classname).append('[');
// Subclasses may have overridden this method.
final String codespace = getCodeSpace();
boolean open = false;
if (codespace != null) {
buffer.append('“').append(codespace);
open = true;
}
if (code != null) {
buffer.append(open ? DEFAULT_SEPARATOR : '“').append(code);
open = true;
}
if (open) {
buffer.append('”');
}
appendToString(buffer);
return buffer.append(']').toString();
}
use of org.apache.sis.util.Debug in project sis by apache.
the class Molodensky method internal.
/**
* Creates a descriptor for the internal parameters of {@link MolodenskyTransform}.
* This is similar to the standard parameters except that the redundant target axes
* lengths are omitted.
*
* @return internal parameter descriptor.
*/
@Debug
public static ParameterDescriptorGroup internal() {
final ParameterBuilder builder = builder().setCodeSpace(Citations.SIS, Constants.SIS);
ParameterDescriptor<Boolean> abridged = builder.addName("abridged").create(Boolean.class, null);
return builder.addName("Molodensky (radians domain)").createGroup(DIMENSION, SRC_SEMI_MAJOR, SRC_SEMI_MINOR, AXIS_LENGTH_DIFFERENCE, FLATTENING_DIFFERENCE, TX, TY, TZ, abridged);
}
use of org.apache.sis.util.Debug in project sis by apache.
the class ConcurrentAuthorityFactory method toString.
/**
* Returns a string representation of this factory for debugging purpose only.
* The string returned by this method may change in any future SIS version.
*
* @return a string representation for debugging purpose.
*
* @see #printCacheContent(PrintWriter)
*/
@Debug
@Override
public String toString() {
final String s = super.toString();
DataAccessRef<DAO> usage = currentDAO.get();
if (usage == null) {
synchronized (availableDAOs) {
usage = availableDAOs.peekLast();
}
if (usage == null) {
return s;
}
}
return s + System.lineSeparator() + usage;
}
Aggregations