AnnotationReference _findAnnotation = field.findAnnotation(context.newTypeReference(NonNull.class).getType()); final boolean hasNonNull = (_findAnnotation != null); MutableMethodDeclaration _findDeclaredMethod = impl.findDeclaredMethod(accessorsUtil.getGetterName(field)); final Procedure1<MutableMethodDeclaration> _function_2 = (MutableMethodDeclaration it) -> { it.setDocComment(field.getDocComment());
AnnotationReference _findAnnotation = field.findAnnotation(context.newTypeReference(NonNull.class).getType()); final boolean hasNonNull = (_findAnnotation != null); MutableMethodDeclaration _findDeclaredMethod = impl.findDeclaredMethod(accessorsUtil.getGetterName(field)); final Procedure1<MutableMethodDeclaration> _function_2 = (MutableMethodDeclaration it) -> { it.setDocComment(field.getDocComment());
public void addGetter(final MutableFieldDeclaration field, final Visibility visibility) { this.validateGetter(field); field.markAsRead(); final Procedure1<MutableMethodDeclaration> _function = (MutableMethodDeclaration it) -> { this.context.setPrimarySourceElement(it, this.context.getPrimarySourceElement(field)); it.addAnnotation(this.context.newAnnotationReference(Pure.class)); it.setReturnType(this.orObject(field.getType())); StringConcatenationClient _client = new StringConcatenationClient() { @Override protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { _builder.append("return "); Object _fieldOwner = Util.this.fieldOwner(field); _builder.append(_fieldOwner); _builder.append("."); String _simpleName = field.getSimpleName(); _builder.append(_simpleName); _builder.append(";"); } }; it.setBody(_client); it.setStatic(field.isStatic()); it.setVisibility(visibility); }; field.getDeclaringType().addMethod(this.getGetterName(field), _function); }