KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > IntrospectionDependency


1 package jfun.yan;
2
3 import jfun.yan.function.Signature;
4
5
6 class IntrospectionDependency implements Dependency {
7   private final ComponentMap cmap;
8   private final Object JavaDoc key;
9   
10   public IntrospectionDependency(ComponentMap cmap, Object JavaDoc key) {
11     this.cmap = cmap;
12     this.key = key;
13   }
14
15   public Object JavaDoc getArgument(Signature source, int i, Class JavaDoc type)
16       throws IrresolveableArgumentException, ParameterTypeMismatchException,
17       AmbiguousComponentResolutionException, ComponentInstantiationException,
18       YanException {
19     throw new UnsupportedOperationException JavaDoc("getArgument cannot be called for introspection");
20   }
21
22   public Class JavaDoc verifyArgument(Signature source, int i, Class JavaDoc type)
23       throws IrresolveableArgumentException, ParameterTypeMismatchException,
24       AmbiguousComponentResolutionException, YanException {
25     return type;
26   }
27
28   public Object JavaDoc getProperty(Class JavaDoc component_type, Object JavaDoc key, Class JavaDoc type)
29       throws IrresolveablePropertyException, PropertyTypeMismatchException,
30       AmbiguousComponentResolutionException, ComponentInstantiationException,
31       YanException {
32     throw new UnsupportedOperationException JavaDoc("getArgument cannot be called for introspection");
33   }
34
35   public Class JavaDoc verifyProperty(Class JavaDoc component_type, Object JavaDoc key, Class JavaDoc type)
36       throws IrresolveablePropertyException, PropertyTypeMismatchException,
37       AmbiguousComponentResolutionException, YanException {
38     return type;
39   }
40   public Dependency seal(){
41     return this;
42   }
43   public Dependency getOriginal() {
44     return this;
45   }
46
47   public ComponentMap getComponentMap() {
48     return cmap;
49   }
50
51   public Object JavaDoc getComponentKey() {
52     return key;
53   }
54
55   public Dependency getParent() {
56     return null;
57   }
58
59 }
60
Popular Tags