aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/host/jvm/method.lux
blob: 7bdc147dae04cfed502b2ee3c4bd10a4e8ffac61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
(.module:
  [lux (#- static)
   [control
    ["." equivalence (#+ Equivalence)]
    [monoid (#+)]
    [parser (#+)]
    ["." monad (#+ do)]
    ["." state (#+ State)]]
   [data
    [number (#+)
     [i64 (#+)]]
    [format
     ["." binary (#+ Format)]]
    [collection
     ["." row (#+ Row)]]]
   [type
    [abstract (#+)]]]
  [//
   [encoding (#+)]
   [modifier (#+ modifiers:)]
   ["//." constant (#+ UTF8)]
   ["//." index (#+ Index)]
   ["//." attribute (#+ Attribute)]
   ["//." descriptor (#+ Descriptor)]])

(modifiers:
  ["0001" public]
  ["0002" private]
  ["0004" protected]
  ["0008" static]
  ["0010" final]
  ["0020" synchronized]
  ["0040" bridge]
  ["0080" var-args]
  ["0100" native]
  ["0400" abstract]
  ["0800" strict]
  ["1000" synthetic]
  )

(type: #export Method
  {#modifier Modifier
   #name (Index UTF8)
   #descriptor (Index (Descriptor //descriptor.Method))
   #attributes (Row Attribute)})

(def: #export Equivalence<Method>
  (Equivalence Method)
  ($_ equivalence.product
      ..Equivalence<Modifier>
      //index.Equivalence<Index>
      //index.Equivalence<Index>
      (row.Equivalence<Row> //attribute.Equivalence<Attribute>)))

(def: #export format
  (Format Method)
  ($_ binary.and
      ..modifier-format
      //index.format
      //index.format
      (binary.row/16 //attribute.format)))