TypeReference _type = field.getType();
boolean _isPrimitive = _type.isPrimitive();
if (_isPrimitive) {
context.addError(field, "Fields with primitives are not supported by @Lazy");
}
Expression _initializer = field.getInitializer();
boolean _tripleEquals = (_initializer == null);
if (_tripleEquals) {
context.addError(field, "A lazy field must have an initializer.");
}
MutableTypeDeclaration _declaringType = field.getDeclaringType();
String _simpleName = field.getSimpleName();
String _plus = ("_init" + _simpleName);
final Procedure1<MutableMethodDeclaration> _function = new Procedure1<MutableMethodDeclaration>() {
public void apply(final MutableMethodDeclaration it) {
it.setVisibility(Visibility.PRIVATE);
TypeReference _type = field.getType();
it.setReturnType(_type);
Expression _initializer = field.getInitializer();
it.setBody(_initializer);
}
};
_declaringType.addMethod(_plus, _function);
MutableTypeDeclaration _declaringType_1 = field.getDeclaringType();