* @param type
*/
protected void addSingletonField(final NewConcreteType type) {
Checker.notNull("parameter:type", type);
final NewField singleton = type.newField();
final NewInstanceTemplatedFile body = new NewInstanceTemplatedFile();
final Constructor constructor = type.getConstructor(Collections.<Type>emptyList());
body.setConstructor(constructor);
singleton.setValue(body);
singleton.setFinal(true);
singleton.setName(SerializationConstants.SINGLETON);
final Type returnType = type;
singleton.setType(returnType);
singleton.setStatic(true);
singleton.setVisibility(Visibility.PUBLIC);
this.getGeneratorContext().debug(type.getName());
}