aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/host/jvm/method.lux
blob: d7e8354e8dbf7a64da4a3432e1db77f572fb0aa9 (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
(.module:
  [lux (#- static)
   [control
    [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 format
  (Format Method)
  ($_ binary.and
      ..modifier-format
      //index.format
      //index.format
      (binary.row/16 //attribute.format)))