-
Notifications
You must be signed in to change notification settings - Fork 4
/
api.html
189 lines (166 loc) · 8.63 KB
/
api.html
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JavaMoney</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<meta name="keywords" content="">
<!-- Le styles -->
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/asciidoctor.css" rel="stylesheet">
<link href="/css/base.css" rel="stylesheet">
<link href="/css/bootstrap-responsive.min.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="/js/html5shiv.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
<!--<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">-->
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
<div id="wrap">
<!-- Fixed navbar -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="/">JavaMoney</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="/archive.html">Blog</a></li>
<li><a href="https://github.com/JavaMoney/" target="_blank">View on GitHub</a></li>
<li><a href="feed.xml" target="_blank">RSS Subscribe</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Links <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="nav-header">JSR 354</li>
<li><a href="/api.html">API</a></li>
<li><a href="apidocs/">API (JavaDoc)</a></li>
<li><a href="/ri.html">Moneta Reference Implementation (RI)</a></li>
<li><a href="/tck.html">Technical Compatibility Kit (TCK)</a></li>
<li><a href="https://jcp.org/en/jsr/detail?id=354" target="_blank">Detail Page</a></li>
<li class="divider"></li>
<li class="nav-header">JavaMoney</li>
<li><a href="/lib.html">Library</a></li>
<li><a href="/midas.html">Midas</a></li>
<li><a href="https://github.com/JavaMoney/javamoney-examples" target="_blank">Examples</a></li>
<li><a href="/shelter.html">Shelter</a></li>
<li><a href="http://jadira.sourceforge.net/usertype.extended/" target="_blank">Jadira Usertype Extended (Hibernate support)</a></li>
<li><a href="https://github.com/zalando/jackson-datatype-money" target="_blank">Jackson Datatype Money by Zalando</a></li>
<li class="divider"></li>
<li class="nav-header">Additional Information</li>
<li><a href="https://groups.io/g/javamoney/" target="_blank">[email protected]</a></li>
<li><a href="https://github.com/JavaMoney/jsr354-api-bp" target="_blank">API - Backport to Java 7 (API BP)</a></li>
<li><a href="https://github.com/JavaMoney/jsr354-ri-bp" target="_blank">Moneta Reference Implementation - Backport to Java 7 (RI BP)</a></li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container">
<div class="page-header">
<h1>API (JSR 354)</h1>
</div>
<p><em>16 Juni 2020</em></p>
<p>
<h2>Money & Currency API</h2>
<section id="downloads" class="clearfix">
<a href="https://github.com/JavaMoney/jsr354-api/zipball/master"
id="download-zip" class="button"><span>Download .zip</span></a> <a
href="https://github.com/JavaMoney/jsr354-api/tarball/master"
id="download-tar-gz" class="button"><span>Download .tar.gz</span></a>
<a href="https://github.com/JavaMoney/jsr354-api" id="view-on-github"
class="button"><span>View on GitHub</span></a>
</section>
<hr>
<section id="main_content">
<h3>
<a name="what-is-jsr-354"
class="anchor"
href="#what-is-jsr-354"><span
class="octicon octicon-link"></span></a>What is JSR 354?
</h3>
<p>JSR 354 provides a portable and extendible framework for handling of Money & Currency. The API
models monetary amounts and currencies in a platform independent and portable way, including well
defined extension points. It's API defines a simple yet flexible contract that enables users to choose
the implementation matching their target requirements best and having full control about the numeric state
at all stages during monetary processing. <br/>
The JSR is lead by Trivadis AG (<a href="https://www.trivadis.com" class="user-mention">trivadis.com</a>), Werner Keil (<a href="https://github.com/keilw" class="user-mention">@keilw</a>) and Otavio Santana (<a href="https://github.com/otaviojava" class="user-mention">@otaviojava</a>)
<br/>You can access the API by adding the following Maven
dependencies:</p>
<pre><code><dependency>
<groupId>javax.money</groupId>
<artifactId>money-api</artifactId>
<version>1.1</version>
</dependency>
</code></pre>
<p>Further versions can be found <a href="http://mvnrepository.com/artifact/javax.money/money-api/" target="_blank">here</a>.</p>
<p>
The release artifacts should be accessible from the following repositories:
<ul>
<li>Maven Central</li>
</ul>
</p>
<p>Though it is possible to compile your programs completely with the API, in most cases, you will also have to
add an implementation, e.g. the <a href="ri.html">Moneta</a> reference implementation.</p>
<h3>
<a name="overview" class="anchor"
href="#overview"><span
class="octicon octicon-link"></span></a>Overview
</h3>
<p>
The API basically consists of four packages:
<ul>
<li><code>javax.money</code> contains the main artifacts of the API, e.g. the interfaces for <code>MonetaryAmount</code>, <code>CurrencyUnit</code>, <code>MonetaryOperator</code>, <code>MonetaryQuery</code>, and the
accessor singletons for amounts, currencies and roundings.</li>
<li><code>javax.money.convert</code> contains currency conversion logic.</li>
<li><code>javax.money.format</code> contains the formatting logic, which has some similarities with <code>java.text</code> but relies
more on immutable artifacts and builders.</li>
<li><code>javax.money.spi</code> contains the service provider interfaces and the bootstrap logic, which allows to configure the API
also within EE contexts (e.g. running it within a CDI container).</li>
</ul>
The Java 9 "Jigsaw" module is <code>java.money</code>.
</p>
<h3>
<a name="documentation" class="anchor" href="#documentation"><span
class="octicon octicon-link"></span></a>Documentation
</h3>
<p>
Since it a Java Specification Request check out out JSR's specification from the <a href="https://jcp.org/en/jsr/detail?id=354">JSR 354 Detail Page</a>.
</p>
</section>
</p>
<hr>
</div>
<div id="push"></div>
</div>
<div id="footer">
<div class="container">
<p>Having trouble with JavaMoney?
Ask your question at <a href="https://stackoverflow.com/questions/tagged/java-money+jsr354" target="_blank">StackOverflow</a> with tag <code>java-money</code>.
Join the Gitter chat <a href="https://gitter.im/orgs/JavaMoney/rooms" target="_blank"><img src="https://badges.gitter.im/Join%20Chat.svg"/></a>.
Or contact <a href="mailto:[email protected]">[email protected]</a>
</p>
<p class="muted credit">© 2024 JavaMoney | Mixed with <a href="https://getbootstrap.com/">Bootstrap v2.3.2</a> | Baked with <a href="http://jbake.org">JBake v2.6.7</a></p>
</div>
</div>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/js/jquery-1.9.1.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/run_prettify.js"></script>
</body>
</html>