Added a function that creates the full name of the field (with its pointer and table indicators). Just for debugging purposes.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10381 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
4360d22f02
commit
142905654f
@ -277,9 +277,12 @@ class Field implements Cloneable {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder result = new StringBuilder();
|
||||
/**
|
||||
* This method builds the full name of the field (with function, pointer and table indications).
|
||||
* @return the full name of the field
|
||||
*/
|
||||
public String getFullName() {
|
||||
StringBuilder result = new StringBuilder();
|
||||
if (function) {
|
||||
result.append('(');
|
||||
}
|
||||
@ -295,6 +298,14 @@ class Field implements Cloneable {
|
||||
if (function) {
|
||||
result.append(")()");
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder result = new StringBuilder();
|
||||
result.append(this.getFullName());
|
||||
|
||||
//insert appropriate amount of spaces to format the output corrently
|
||||
int nameLength = result.length();
|
||||
result.append(' ');//at least one space is a must
|
||||
|
@ -216,6 +216,16 @@ public class Structure implements Cloneable {
|
||||
return fields[fieldIndex].name;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the full field name of the given index.
|
||||
* @param fieldIndex
|
||||
* the index of the field
|
||||
* @return the full field name of the given index
|
||||
*/
|
||||
public String getFieldFullName(int fieldIndex) {
|
||||
return fields[fieldIndex].getFullName();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the field type of the given index.
|
||||
* @param fieldIndex
|
||||
|
Loading…
x
Reference in New Issue
Block a user