View Javadoc

1   // NullInterfaceImpl.java, created Wed Dec 11 11:59:03 2002 by mcmartin
2   // Copyright (C) 2001-3 John Whaley <jwhaley@alum.mit.edu>
3   // Licensed under the terms of the GNU LGPL; see COPYING for details.
4   package joeq.ClassLib.Common;
5   
6   import joeq.Runtime.ObjectTraverser;
7   import joeq.Class.jq_InstanceField;
8   import joeq.Class.jq_StaticField;
9   
10  /***
11   * NullInterfaceImpl
12   *
13   * @author  John Whaley <jwhaley@alum.mit.edu>
14   * @author  Michael Martin <mcmartin@stanford.edu>
15   * @version $Id: NullInterfaceImpl.java 1465 2004-03-10 22:40:47Z jwhaley $
16   */
17  public class NullInterfaceImpl implements joeq.ClassLib.Common.Interface {
18  
19      /*** Creates new Interface */
20      public NullInterfaceImpl() {}
21  
22      public java.util.Iterator getImplementationClassDescs(joeq.UTF.Utf8 desc) {
23          return java.util.Collections.EMPTY_SET.iterator();
24      }
25      
26      public ObjectTraverser getObjectTraverser() {
27          return NullObjectTraverser.INSTANCE;
28      }
29  
30      public static class NullObjectTraverser extends ObjectTraverser {
31          public void initialize () { }
32          public Object mapStaticField(jq_StaticField f) { return NO_OBJECT; }
33          public Object mapInstanceField(Object o, jq_InstanceField f) { return NO_OBJECT; }
34          public Object mapValue(Object o) { return NO_OBJECT; }
35          public static final NullObjectTraverser INSTANCE = new NullObjectTraverser();
36      }
37      
38      public java.lang.Class createNewClass(joeq.Class.jq_Type f) {
39          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
40      }
41      
42      public java.lang.reflect.Constructor createNewConstructor(joeq.Class.jq_Initializer f) {
43          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
44      }
45      
46      public void initNewConstructor(java.lang.reflect.Constructor dis, joeq.Class.jq_Initializer f) {
47          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
48      }
49      
50      public java.lang.reflect.Field createNewField(joeq.Class.jq_Field f) {
51          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
52      }
53      
54      public void initNewField(java.lang.reflect.Field dis, joeq.Class.jq_Field f) {
55          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
56      }
57      
58      public java.lang.reflect.Method createNewMethod(joeq.Class.jq_Method f) {
59          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
60      }
61      
62      public void initNewMethod(java.lang.reflect.Method dis, joeq.Class.jq_Method f) {
63          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
64      }
65      
66      public joeq.Class.jq_Field getJQField(java.lang.reflect.Field f) {
67          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
68      }
69      
70      public joeq.Class.jq_Initializer getJQInitializer(java.lang.reflect.Constructor f) {
71          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
72      }
73      
74      public joeq.Class.jq_Method getJQMethod(java.lang.reflect.Method f) {
75          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
76      }
77      
78      public joeq.Class.jq_Type getJQType(java.lang.Class k) {
79          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
80      }
81      
82      public joeq.Class.jq_Type getOrCreateType(java.lang.ClassLoader cl, joeq.UTF.Utf8 desc) {
83          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
84      }
85      
86      public void unloadType(java.lang.ClassLoader cl, joeq.Class.jq_Type t) {
87          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
88      }
89      
90      public void init_zipfile(java.util.zip.ZipFile dis, java.lang.String name) throws java.io.IOException {
91          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
92      }
93      
94      public void init_inflater(java.util.zip.Inflater dis, boolean nowrap) throws java.io.IOException {
95          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
96      }
97      
98      public void initializeSystemClass() throws java.lang.Throwable {
99          throw new UnsupportedOperationException("Using a Null ClassLib Interface!");
100     }
101 }