1 23 24 package org.objectweb.fractal.jonathan; 25 26 import org.objectweb.jonathan.apis.kernel.Component; 27 import org.objectweb.jonathan.apis.kernel.Context; 28 import org.objectweb.jonathan.apis.kernel.ContextFactory; 29 import org.objectweb.jonathan.apis.kernel.Element; 30 import org.objectweb.jonathan.apis.kernel.JonathanException; 31 import org.objectweb.jonathan.apis.kernel.Name; 32 33 import java.util.Enumeration ; 34 import java.util.HashMap ; 35 36 39 40 public class JContextFactory implements ContextFactory { 41 42 public Context newContext () { 43 return new JContext(); 44 } 45 46 public Context newContext (Context context) { 47 return new JContext(); 48 } 49 50 53 54 static class JContext extends HashMap implements Context { 55 56 public void acquire () { 57 } 58 59 public Element addElement (Name name, Class aClass, int i) { 60 throw new RuntimeException ("Not implemented"); 61 } 62 63 public Element addElement (Name name, Class aClass, Object o) { 64 throw new RuntimeException ("Not implemented"); 65 } 66 67 public Element addElement (Name name, Component component) { 68 throw new RuntimeException ("Not implemented"); 69 } 70 71 public Element addElement (String s, Class aClass, int i, char c) { 72 put(s, new Integer (i)); 73 return null; 74 } 75 76 public Element addElement (String s, Class aClass, Object o, char c) { 77 put(s, o); 78 return null; 79 } 80 81 public Element addElement (String s, Component component, char c) { 82 throw new RuntimeException ("Not implemented"); 83 } 84 85 public Context addOrGetContext (Name name) { 86 throw new RuntimeException ("Not implemented"); 87 } 88 89 public Context addOrGetContext (String s, char c) { 90 throw new RuntimeException ("Not implemented"); 91 } 92 93 public Component fork () { 94 throw new RuntimeException ("Not implemented"); 95 } 96 97 public Component getComponent (Name name) { 98 throw new RuntimeException ("Not implemented"); 99 } 100 101 public Component getComponent (String s, char c) { 102 throw new RuntimeException ("Not implemented"); 103 } 104 105 public Element getElement (Name name) { 106 throw new RuntimeException ("Not implemented"); 107 } 108 109 public Element getElement (String s, char c) { 110 throw new RuntimeException ("Not implemented"); 111 } 112 113 public Enumeration getElements () { 114 throw new RuntimeException ("Not implemented"); 115 } 116 117 public Object getFactoryValue () throws JonathanException { 118 throw new RuntimeException ("Not implemented"); 119 } 120 121 public int getIntValue () { 122 throw new RuntimeException ("Not implemented"); 123 } 124 125 public int getIntValue (Name name) { 126 throw new RuntimeException ("Not implemented"); 127 } 128 129 public int getIntValue (String s, char c) { 130 return ((Integer )get(s)).intValue(); 131 } 132 133 public Element getReference () { 134 throw new RuntimeException ("Not implemented"); 135 } 136 137 public Context getScope () { 138 throw new RuntimeException ("Not implemented"); 139 } 140 141 public Class getType () { 142 throw new RuntimeException ("Not implemented"); 143 } 144 145 public Object getValue () { 146 throw new RuntimeException ("Not implemented"); 147 } 148 149 public Object getValue (Name name) { 150 throw new RuntimeException ("Not implemented"); 151 } 152 153 public Object getValue (String s, char c) { 154 return get(s); 155 } 156 157 public void release () { 158 } 159 160 public void reset () { 161 throw new RuntimeException ("Not implemented"); 162 } 163 164 public Element setReference (Element element) { 165 throw new RuntimeException ("Not implemented"); 166 } 167 168 public Context setScope (Context context) { 169 throw new RuntimeException ("Not implemented"); 170 } 171 } 172 } 173 | Popular Tags |