1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

toString method.

This commit is contained in:
Sergey Prigogin 2010-08-24 05:48:19 +00:00
parent 4bb004213a
commit f64c7c7ad9
2 changed files with 20 additions and 0 deletions

View file

@ -53,4 +53,16 @@ public abstract class AbstractCharArray {
* range checks. * range checks.
*/ */
public abstract void arraycopy(int offset, char[] destination, int destinationPos, int length); public abstract void arraycopy(int offset, char[] destination, int destinationPos, int length);
/**
* This method is slow. Use only for debugging.
*/
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
for (int pos = 0; isValidOffset(pos); pos++) {
buf.append(get(pos));
}
return buf.toString();
}
} }

View file

@ -182,4 +182,12 @@ public class InternalFileContent extends FileContent {
public void setFoundOnPath(IncludeSearchPathElement isp) { public void setFoundOnPath(IncludeSearchPathElement isp) {
fFoundOnPath= isp; fFoundOnPath= isp;
} }
/**
* This method is slow. Use only for debugging.
*/
@Override
public String toString() {
return getSource().toString();
}
} }