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
3.0
Kae..pl 12 years ago
parent 4360d22f02
commit 142905654f
  1. 19
      engine/src/blender/com/jme3/scene/plugins/blender/file/Field.java
  2. 10
      engine/src/blender/com/jme3/scene/plugins/blender/file/Structure.java

@ -276,10 +276,13 @@ 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

@ -215,6 +215,16 @@ public class Structure implements Cloneable {
public String getFieldName(int fieldIndex) {
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.

Loading…
Cancel
Save