class example_for_string definition.
public section.
data value type string read-only.
methods constructor
importing value type string.
endclass.
class example_for_string implementation.
method constructor.
me->value = value.
endmethod.
endclass.
data example_for_string type ref to example_for_string.
me->example_for_string = new #( example_for_string ).
* alternative:
example_for_string = new #( i_example_for_string ).
class ${name} definition.
public section.
data value type ${type} read-only.
methods constructor
importing value type ${type}.
endclass.
* to local implementations
CLASS ${name} IMPLEMENTATION.
METHOD constructor.
me->value = value.
ENDMETHOD.
ENDCLASS.
* to class attributes
data ${name} type ref to ${name}.
* to implementation
me->${name} = new #( ${name} ).
if example_for_string->value is initial.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |