1 | package com.hammurapi.eventbus.tests; |
2 | |
3 | import java.io.ObjectInputStream; |
4 | import java.util.List; |
5 | import java.util.Map; |
6 | |
7 | import com.hammurapi.extract.CompiledExtractorBase; |
8 | import com.hammurapi.extract.Extractor; |
9 | import com.hammurapi.extract.Predicate; |
10 | |
11 | @SuppressWarnings("unchecked") |
12 | class Extractor17 extends CompiledExtractorBase<java.lang.Object, java.lang.Object, java.lang.Object> { |
13 | |
14 | /** |
15 | * Class identity for comparison with other classes. |
16 | */ |
17 | private static final List<Object> IDENTITY; |
18 | |
19 | static { |
20 | try { |
21 | ObjectInputStream ois = new ObjectInputStream(Extractor17.class.getResourceAsStream("Extractor17.identity")); |
22 | try { |
23 | IDENTITY = (List<Object>) ois.readObject(); |
24 | } finally { |
25 | ois.close(); |
26 | } |
27 | } catch (Exception e) { |
28 | throw new ExceptionInInitializerError(e); |
29 | } |
30 | } |
31 | |
32 | Extractor17(int[] map) { |
33 | super(map, false, 1); |
34 | } |
35 | |
36 | @Override |
37 | protected java.lang.Object extractInternal(java.lang.Object eCtx, Map<java.lang.Object, Map<Extractor<java.lang.Object, ? super java.lang.Object, java.lang.Object>, ? super java.lang.Object>> cache, java.lang.Object... obj) { |
38 | |
39 | java.lang.String world = (java.lang.String) obj[mapArg(1)]; |
40 | |
41 | return world; |
42 | } |
43 | |
44 | @Override |
45 | protected List<Object> getIdentity() { |
46 | return IDENTITY; |
47 | } |
48 | |
49 | @Override |
50 | protected CompiledExtractorBase<java.lang.Object, java.lang.Object, java.lang.Object> newInstance(int[] map) { |
51 | return new Extractor17(map); |
52 | } |
53 | |
54 | public String toString() { |
55 | return getClass().getName()+" [Expression = world, Parameters = [Parameter[idx=0, type=class java.lang.String, name=world]], Parameter indices = "+parameterIndices()+"]"; |
56 | } |
57 | |
58 | } |