comparison src/clojure/asm/commons/package.html @ 10:ef7dbbd6452c

added clojure source goodness
author Robert McIntyre <rlm@mit.edu>
date Sat, 21 Aug 2010 06:25:44 -0400
parents
children
comparison
equal deleted inserted replaced
9:35cf337adfcf 10:ef7dbbd6452c
1 <html>
2 <!--
3 * ASM: a very small and fast Java bytecode manipulation framework
4 * Copyright (c) 2000-2005 INRIA, France Telecom
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the copyright holders nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29 * THE POSSIBILITY OF SUCH DAMAGE.
30 -->
31 <body>
32 Provides some useful class and method adapters. <i>The preferred way of using
33 these adapters is by chaining them together and to custom adapters (instead of
34 inheriting from them)</i>. Indeed this approach provides more combination
35 possibilities than inheritance. For instance, suppose you want to implement an
36 adapter MyAdapter than needs sorted local variables and intermediate stack map
37 frame values taking into account the local variables sort. By using inheritance,
38 this would require MyAdapter to extend AnalyzerAdapter, itself extending
39 LocalVariablesSorter. But AnalyzerAdapter is not a subclass of
40 LocalVariablesSorter, so this is not possible. On the contrary, by using
41 delegation, you can make LocalVariablesSorter delegate to AnalyzerAdapter,
42 itself delegating to MyAdapter. In this case AnalyzerAdapter computes
43 intermediate frames based on the output of LocalVariablesSorter, and MyAdapter
44 can add new locals by calling the newLocal method on LocalVariablesSorter, and
45 can get the stack map frame state before each instruction by reading the locals
46 and stack fields in AnalyzerAdapter (this requires references from MyAdapter
47 back to LocalVariablesSorter and AnalyzerAdapter).
48 </body>