diff --git a/src/main/java/spoon/reflect/declaration/CtRecordComponent.java b/src/main/java/spoon/reflect/declaration/CtRecordComponent.java index 074395f0606..e8065dfe18f 100644 --- a/src/main/java/spoon/reflect/declaration/CtRecordComponent.java +++ b/src/main/java/spoon/reflect/declaration/CtRecordComponent.java @@ -19,14 +19,22 @@ public interface CtRecordComponent extends CtTypedElement, CtNamedElement, CtShadowable { /** - * Converts the component to an implicit method. - * @return the method + * Converts the component to an implicit method. The returned method is a view and has no parent. + * This means that any modification on the returned method will not be reflected on the component. + * Also this element is not part of the model. A record already has the methods corresponding to its components. + * Use {@link CtRecord#getMethods()} to get the getter methods of a record. + * + * @return the method corresponding to the component (a getter) as a view. */ CtMethod toMethod(); /** - * Converts the component to an implicit field. - * @return the field + * Converts the component to an implicit field.The returned field is a view and has no parent. + * This means that any modification on the returned field will not be reflected on the component. + * Also this element is not part of the model. A record already has the field corresponding to its components. + * Use {@link CtRecord#getFields()} to get the fields of a record. + * + * @return the field corresponding to the component as a view. */ CtField toField();