final String shortTypeName) throws IOException {
if (clazz == null) {
return;
}
final ClassFieldInspector inspector = new ClassFieldInspector(clazz);
Set<String> fieldSet = new HashSet<String>();
fieldSet.addAll(inspector.getFieldNames().keySet());
// add the "this" field. This won't come out from the inspector
fieldSet.add("this");
String [] fields = fieldSet.toArray(new String []{});
Arrays.sort(fields);
fields = removeIrrelevantFields(fields);
this.builder.addFieldsForType(shortTypeName, fields);
Method[] methods = clazz.getMethods();
List<String> modifierStrings = new ArrayList<String>();
for (Method method : methods) {
modifierStrings.add(method.getName());
}
String[] modifiers = new String[modifierStrings.size()];
modifierStrings.toArray(modifiers);
this.builder.addModifiersForType(shortTypeName, modifiers);
// remove this back out because there is no type for it. We add it explicity
fieldSet.remove("this");
this.builder.addFieldType(shortTypeName + ".this", SuggestionCompletionEngine.TYPE_OBJECT);
for (String field : fieldSet) {
final Class type = inspector.getFieldTypes().get(field);
final String fieldType = getFieldType(type);
this.builder.addFieldType(shortTypeName + "." + field, fieldType);
Field f = inspector.getFieldTypesField().get(field);
this.builder.addFieldTypeField(shortTypeName + "." + field,f);
}
ClassMethodInspector methodInspector = new ClassMethodInspector(clazz);