Source Code Cross Referenced for AsmNullAdapter.java in  » Net » Terracotta » com » tc » aspectwerkz » transform » inlining » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Terracotta » com.tc.aspectwerkz.transform.inlining 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice.  All rights reserved.
003:         */
004:        package com.tc.aspectwerkz.transform.inlining;
005:
006:        import com.tc.asm.AnnotationVisitor;
007:        import com.tc.asm.Attribute;
008:        import com.tc.asm.ClassVisitor;
009:        import com.tc.asm.FieldVisitor;
010:        import com.tc.asm.Label;
011:        import com.tc.asm.MethodVisitor;
012:
013:        /**
014:         * Visitors that are not writing any bytecode and using a Null ClassVisitor / Code Visitor as a target instead.
015:         *
016:         * @author <a href="mailto:alex@gnilux.com">Alexandre Vasseur</a>
017:         */
018:        public class AsmNullAdapter {
019:
020:            /**
021:             * A NullClassAdapter that does nothing.
022:             * Can be used to speed up ASM and avoid unecessary bytecode writing thru a regular ClassWriter when this is not
023:             * needed (read only purpose).
024:             */
025:            public static class NullClassAdapter implements  ClassVisitor {
026:
027:                public final static ClassVisitor NULL_CLASS_ADAPTER = new NullClassAdapter();
028:
029:                public void visit(int version, int access, String name,
030:                        String signature, String super Name, String[] interfaces) {
031:                }
032:
033:                public void visitInnerClass(String name, String outerName,
034:                        String innerName, int access) {
035:                }
036:
037:                public FieldVisitor visitField(int access, String name,
038:                        String desc, String signature, Object value) {
039:                    return NullFieldAdapter.NULL_FIELD_ADAPTER;
040:                }
041:
042:                public MethodVisitor visitMethod(int access, String name,
043:                        String desc, String signature, String[] exceptions) {
044:                    return NullMethodAdapter.NULL_METHOD_ADAPTER;
045:                }
046:
047:                public void visitSource(String source, String debug) {
048:                }
049:
050:                public void visitOuterClass(String owner, String name,
051:                        String desc) {
052:                }
053:
054:                public AnnotationVisitor visitAnnotation(String desc,
055:                        boolean visible) {
056:                    return NullAnnotationVisitor.NULL_ANNOTATION_ADAPTER;
057:                }
058:
059:                public void visitAttribute(Attribute attribute) {
060:                }
061:
062:                public void visitEnd() {
063:                }
064:            }
065:
066:            /**
067:             * A NullMethodAdapter that does nothing.
068:             * Can be used to speed up ASM and avoid unecessary bytecode writing thru a regular CodeWriter when this is not
069:             * needed (read only purpose)
070:             */
071:            public static class NullMethodAdapter implements  MethodVisitor {
072:
073:                public final static MethodVisitor NULL_METHOD_ADAPTER = new NullMethodAdapter();
074:
075:                public void visitInsn(int opcode) {
076:                }
077:
078:                public void visitIntInsn(int opcode, int operand) {
079:                }
080:
081:                public void visitVarInsn(int opcode, int var) {
082:                }
083:
084:                public void visitTypeInsn(int opcode, String desc) {
085:                }
086:
087:                public void visitFieldInsn(int opcode, String owner,
088:                        String name, String desc) {
089:                }
090:
091:                public void visitMethodInsn(int opcode, String owner,
092:                        String name, String desc) {
093:                }
094:
095:                public void visitJumpInsn(int opcode, Label label) {
096:                }
097:
098:                public void visitLabel(Label label) {
099:                }
100:
101:                public void visitLdcInsn(Object cst) {
102:                }
103:
104:                public void visitIincInsn(int var, int increment) {
105:                }
106:
107:                public void visitTableSwitchInsn(int min, int max, Label dflt,
108:                        Label labels[]) {
109:                }
110:
111:                public void visitLookupSwitchInsn(Label dflt, int keys[],
112:                        Label labels[]) {
113:                }
114:
115:                public void visitMultiANewArrayInsn(String desc, int dims) {
116:                }
117:
118:                public void visitTryCatchBlock(Label start, Label end,
119:                        Label handler, String type) {
120:                }
121:
122:                public void visitMaxs(int maxStack, int maxLocals) {
123:                }
124:
125:                public void visitLocalVariable(String name, String desc,
126:                        String sig, Label start, Label end, int index) {
127:                }
128:
129:                public void visitLineNumber(int line, Label start) {
130:                }
131:
132:                public void visitAttribute(Attribute attr) {
133:                }
134:
135:                public AnnotationVisitor visitAnnotationDefault() {
136:                    return NullAnnotationVisitor.NULL_ANNOTATION_ADAPTER;
137:                }
138:
139:                public AnnotationVisitor visitAnnotation(String desc,
140:                        boolean visible) {
141:                    return NullAnnotationVisitor.NULL_ANNOTATION_ADAPTER;
142:                }
143:
144:                public AnnotationVisitor visitParameterAnnotation(
145:                        int parameter, String desc, boolean visible) {
146:                    return NullAnnotationVisitor.NULL_ANNOTATION_ADAPTER;
147:                }
148:
149:                public void visitCode() {
150:                }
151:
152:                public void visitEnd() {
153:                }
154:
155:                public void visitFrame(int type, int local, Object[] local2,
156:                        int stack, Object[] stack2) {
157:                }
158:            }
159:
160:            /**
161:             * A NullFieldAdapter
162:             */
163:            public static class NullFieldAdapter implements  FieldVisitor {
164:
165:                public final static FieldVisitor NULL_FIELD_ADAPTER = new NullFieldAdapter();
166:
167:                public AnnotationVisitor visitAnnotation(String desc,
168:                        boolean visible) {
169:                    return NullAnnotationVisitor.NULL_ANNOTATION_ADAPTER;
170:                }
171:
172:                public void visitAttribute(Attribute attr) {
173:                }
174:
175:                public void visitEnd() {
176:                }
177:            }
178:
179:            /**
180:             * A NullAnnotationVisitor
181:             */
182:            public static class NullAnnotationVisitor implements 
183:                    AnnotationVisitor {
184:
185:                public final static AnnotationVisitor NULL_ANNOTATION_ADAPTER = new NullAnnotationVisitor();
186:
187:                public void visit(String name, Object value) {
188:                }
189:
190:                public void visitEnum(String name, String desc, String value) {
191:                }
192:
193:                public AnnotationVisitor visitAnnotation(String name,
194:                        String desc) {
195:                    return NULL_ANNOTATION_ADAPTER;
196:                }
197:
198:                public AnnotationVisitor visitArray(String name) {
199:                    return NULL_ANNOTATION_ADAPTER;
200:                }
201:
202:                public void visitEnd() {
203:                }
204:            }
205:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.