File:  [parser3project] / parser3 / tests / 384.html
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Thu Feb 16 17:28:33 2017 UTC (9 years, 3 months ago) by moko
Branches: MAIN
CVS tags: release_3_5_1, release_3_5_0, release_3_4_6, release_3_4_5, HEAD
test for ^reflection:mixin[; $.name[] ] option added (related to feature #1089)

@main[]

a before: ^show[$a:CLASS]

b before: ^show[$b:CLASS]

^reflection:mixin[$b:CLASS; $.name[method_b] $.to[$a:CLASS] $.fields(false) ]
1. ^show[$a:CLASS]

^reflection:mixin[$b:CLASS; $.to[$a:CLASS] $.fields(false) ]
2. ^show[$a:CLASS]

^reflection:mixin[$b:CLASS; $.to[$a:CLASS] ]
3. ^show[$a:CLASS]

^a:mixin[ $.methods(false) $.name[field] $.overwrite(true) ]
4. ^show[$a:CLASS]

^a:mixin[ $.methods(false) $.overwrite(true) ]
5. ^show[$a:CLASS]

$a:b[check]
property copied: $a:b

^a:mixin[ $.overwrite(true) ]
6. ^show[$a:CLASS]


inheritance check: ^show[$c:CLASS]

@show[v]
fields: ^json:string[$v]
$methods[^reflection:methods[$v.CLASS_NAME; $.reverse(false) ]]
^methods.foreach[name;]{method ${name}:^if(^name.left(6) eq 'method'){ ^v.$name[]}
}


@CLASS
a

@auto[]
$field[a]
$field_a[a specific]

@create[]
$value[a]

@method[]
a

@method_a[]
a specific

@mixin[options]
^reflection:mixin[$b:CLASS;$options]

@CLASS
b

@auto[]
$field[b]
$field_b[b specific]

@method[]
b

@method_b[]
b specific

@GET_b[]
b property "$property"

@SET_b[value]
$self.property[$value]


@CLASS
c

@BASE
a

@method_c[]
c specific

E-mail: