001: package net.sf.mockcreator.dumby;
002:
003: public class Java15EnumCache extends java.lang.Object {
004: private final static String MOCK_CREATOR_ALERT = "Class net.sf.mockcreator.dumby.Java15EnumCache is a dumby generated by MockCreator. Ensure you dont deploy it onto a real system instead of the actual class";
005: static java.util.Map knownEnums = null;
006:
007: public Java15EnumCache() {
008: super ();
009: }
010:
011: private static String getClassObjectMethodSignature(String method) {
012: return "net.sf.mockcreator.dumby.MockJava15EnumCache" + "#"
013: + method;
014: }
015:
016: public/* static: we cannot use static with generic types :E */class Returnable210273907 {
017: private net.sf.mockcreator.IReturnable ir;
018:
019: public Returnable210273907(net.sf.mockcreator.IReturnable ir) {
020: this .ir = ir;
021: }
022:
023: public void throwable(java.lang.RuntimeException th) {
024: ir.throwable(th);
025: }
026:
027: public void throwable(java.lang.Error th) {
028: ir.throwable(th);
029: }
030:
031: public void throwable(java.lang.Throwable th) {
032: ir.throwable(th);
033: }
034:
035: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> void returns(
036: E v) {
037: ir.returns(v);
038: }
039:
040: }
041:
042: public static <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> E getEnum(
043: java.lang.Class p0, java.lang.String p1) {
044: java.util.List params = new java.util.ArrayList();
045: params.add(p0);
046: params.add(p1);
047:
048: try {
049: java.lang.Object ret = net.sf.mockcreator.MockKernel
050: .getReturnValue(
051: getClassObjectMethodSignature("getEnum(Class,String)"),
052: params);
053:
054: return (E) ret;
055:
056: } catch (java.lang.RuntimeException e) {
057: throw e;
058: }
059:
060: catch (java.lang.Error e) {
061: throw e;
062: }
063:
064: catch (java.lang.Throwable e) {
065: throw new net.sf.mockcreator.exceptions.MockException(
066: "This class of exception is not declared in method signature. Its not a RuntimeException either. Thus it cannot be configured to throw from the method. Fix the test please.",
067: e);
068: } finally {
069: // do nothing ;)
070: }
071: }
072:
073: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> Returnable210273907 expectGetEnum(
074: java.lang.Class p0, java.lang.String p1) {
075: java.util.List params = new java.util.ArrayList();
076: params.add(p0);
077: params.add(p1);
078:
079: return new Returnable210273907(
080: net.sf.mockcreator.MockKernel
081: .addExpectedMethodCall(
082: getClassObjectMethodSignature("getEnum(Class,String)"),
083: params));
084: }
085:
086: public Returnable210273907 acceptGetEnum_Class_String_returning_DaoMappedLocalizedEnumBean(
087: java.lang.Object p0, java.lang.Object p1) {
088: java.util.List params = new java.util.ArrayList();
089: params.add(p0);
090: params.add(p1);
091:
092: return new Returnable210273907(
093: net.sf.mockcreator.MockKernel
094: .addExpectedMethodCall(
095: getClassObjectMethodSignature("getEnum(Class,String)"),
096: params));
097: }
098:
099: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> Returnable210273907 expectZeroOrMoreGetEnum_Class_String_returning_DaoMappedLocalizedEnumBean() {
100: return new Returnable210273907(
101: net.sf.mockcreator.MockKernel
102: .setDummy(
103: getClassObjectMethodSignature("getEnum(Class,String)"),
104: null));
105: }
106:
107: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> Returnable210273907 expectZeroOrMoreGetEnum(
108: java.lang.Class p0, java.lang.String p1) {
109: java.util.List params = new java.util.ArrayList();
110: params.add(p0);
111: params.add(p1);
112:
113: return new Returnable210273907(
114: net.sf.mockcreator.MockKernel
115: .setDummy(
116: getClassObjectMethodSignature("getEnum(Class,String)"),
117: params));
118: }
119:
120: public Returnable210273907 acceptZeroOrMoreGetEnum_Class_String_returning_DaoMappedLocalizedEnumBean(
121: java.lang.Object p0, java.lang.Object p1) {
122: java.util.List params = new java.util.ArrayList();
123: params.add(p0);
124: params.add(p1);
125:
126: return new Returnable210273907(
127: net.sf.mockcreator.MockKernel
128: .setDummy(
129: getClassObjectMethodSignature("getEnum(Class,String)"),
130: params));
131: }
132:
133: public/* static: we cannot use static with generic types :E */class Returnable522825512 {
134: private net.sf.mockcreator.IReturnable ir;
135:
136: public Returnable522825512(net.sf.mockcreator.IReturnable ir) {
137: this .ir = ir;
138: }
139:
140: public void throwable(java.lang.RuntimeException th) {
141: ir.throwable(th);
142: }
143:
144: public void throwable(java.lang.Error th) {
145: ir.throwable(th);
146: }
147:
148: public void throwable(java.lang.Throwable th) {
149: ir.throwable(th);
150: }
151:
152: public void returns(
153: net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean v) {
154: ir.returns(v);
155: }
156:
157: }
158:
159: public static net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean getEnum(
160: java.lang.Class p0, java.lang.Long p1) {
161: java.util.List params = new java.util.ArrayList();
162: params.add(p0);
163: params.add(p1);
164:
165: try {
166: java.lang.Object ret = net.sf.mockcreator.MockKernel
167: .getReturnValue(
168: getClassObjectMethodSignature("getEnum(Class,Long)"),
169: params);
170:
171: return (net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean) ret;
172:
173: } catch (java.lang.RuntimeException e) {
174: throw e;
175: }
176:
177: catch (java.lang.Error e) {
178: throw e;
179: }
180:
181: catch (java.lang.Throwable e) {
182: throw new net.sf.mockcreator.exceptions.MockException(
183: "This class of exception is not declared in method signature. Its not a RuntimeException either. Thus it cannot be configured to throw from the method. Fix the test please.",
184: e);
185: } finally {
186: // do nothing ;)
187: }
188: }
189:
190: public Returnable522825512 expectGetEnum(java.lang.Class p0,
191: java.lang.Long p1) {
192: java.util.List params = new java.util.ArrayList();
193: params.add(p0);
194: params.add(p1);
195:
196: return new Returnable522825512(
197: net.sf.mockcreator.MockKernel
198: .addExpectedMethodCall(
199: getClassObjectMethodSignature("getEnum(Class,Long)"),
200: params));
201: }
202:
203: public Returnable522825512 acceptGetEnum_Class_Long_returning_DaoMappedLocalizedEnumBean(
204: java.lang.Object p0, java.lang.Object p1) {
205: java.util.List params = new java.util.ArrayList();
206: params.add(p0);
207: params.add(p1);
208:
209: return new Returnable522825512(
210: net.sf.mockcreator.MockKernel
211: .addExpectedMethodCall(
212: getClassObjectMethodSignature("getEnum(Class,Long)"),
213: params));
214: }
215:
216: public Returnable522825512 expectZeroOrMoreGetEnum_Class_Long_returning_DaoMappedLocalizedEnumBean() {
217: return new Returnable522825512(
218: net.sf.mockcreator.MockKernel
219: .setDummy(
220: getClassObjectMethodSignature("getEnum(Class,Long)"),
221: null));
222: }
223:
224: public Returnable522825512 expectZeroOrMoreGetEnum(
225: java.lang.Class p0, java.lang.Long p1) {
226: java.util.List params = new java.util.ArrayList();
227: params.add(p0);
228: params.add(p1);
229:
230: return new Returnable522825512(
231: net.sf.mockcreator.MockKernel
232: .setDummy(
233: getClassObjectMethodSignature("getEnum(Class,Long)"),
234: params));
235: }
236:
237: public Returnable522825512 acceptZeroOrMoreGetEnum_Class_Long_returning_DaoMappedLocalizedEnumBean(
238: java.lang.Object p0, java.lang.Object p1) {
239: java.util.List params = new java.util.ArrayList();
240: params.add(p0);
241: params.add(p1);
242:
243: return new Returnable522825512(
244: net.sf.mockcreator.MockKernel
245: .setDummy(
246: getClassObjectMethodSignature("getEnum(Class,Long)"),
247: params));
248: }
249:
250: public/* static: we cannot use static with generic types :E */class Returnable1804479207 {
251: private net.sf.mockcreator.IReturnable ir;
252:
253: public Returnable1804479207(net.sf.mockcreator.IReturnable ir) {
254: this .ir = ir;
255: }
256:
257: public void throwable(java.lang.RuntimeException th) {
258: ir.throwable(th);
259: }
260:
261: public void throwable(java.lang.Error th) {
262: ir.throwable(th);
263: }
264:
265: public void throwable(java.lang.Throwable th) {
266: ir.throwable(th);
267: }
268:
269: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> void returns(
270: java.util.Set<E> v) {
271: ir.returns(v);
272: }
273:
274: }
275:
276: public static <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> java.util.Set<E> getAllKnown(
277: java.lang.Class p0) {
278: java.util.List params = new java.util.ArrayList();
279: params.add(p0);
280:
281: try {
282: java.lang.Object ret = net.sf.mockcreator.MockKernel
283: .getReturnValue(
284: getClassObjectMethodSignature("getAllKnown(Class)"),
285: params);
286:
287: return (java.util.Set<E>) ret;
288:
289: } catch (java.lang.RuntimeException e) {
290: throw e;
291: }
292:
293: catch (java.lang.Error e) {
294: throw e;
295: }
296:
297: catch (java.lang.Throwable e) {
298: throw new net.sf.mockcreator.exceptions.MockException(
299: "This class of exception is not declared in method signature. Its not a RuntimeException either. Thus it cannot be configured to throw from the method. Fix the test please.",
300: e);
301: } finally {
302: // do nothing ;)
303: }
304: }
305:
306: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> Returnable1804479207 expectGetAllKnown(
307: java.lang.Class p0) {
308: java.util.List params = new java.util.ArrayList();
309: params.add(p0);
310:
311: return new Returnable1804479207(
312: net.sf.mockcreator.MockKernel
313: .addExpectedMethodCall(
314: getClassObjectMethodSignature("getAllKnown(Class)"),
315: params));
316: }
317:
318: public Returnable1804479207 acceptGetAllKnown(java.lang.Object p0) {
319: java.util.List params = new java.util.ArrayList();
320: params.add(p0);
321:
322: return new Returnable1804479207(
323: net.sf.mockcreator.MockKernel
324: .addExpectedMethodCall(
325: getClassObjectMethodSignature("getAllKnown(Class)"),
326: params));
327: }
328:
329: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> Returnable1804479207 expectZeroOrMoreGetAllKnown() {
330: return new Returnable1804479207(
331: net.sf.mockcreator.MockKernel
332: .setDummy(
333: getClassObjectMethodSignature("getAllKnown(Class)"),
334: null));
335: }
336:
337: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> Returnable1804479207 expectZeroOrMoreGetAllKnown(
338: java.lang.Class p0) {
339: java.util.List params = new java.util.ArrayList();
340: params.add(p0);
341:
342: return new Returnable1804479207(
343: net.sf.mockcreator.MockKernel
344: .setDummy(
345: getClassObjectMethodSignature("getAllKnown(Class)"),
346: params));
347: }
348:
349: public Returnable1804479207 acceptZeroOrMoreGetAllKnown(
350: java.lang.Object p0) {
351: java.util.List params = new java.util.ArrayList();
352: params.add(p0);
353:
354: return new Returnable1804479207(
355: net.sf.mockcreator.MockKernel
356: .setDummy(
357: getClassObjectMethodSignature("getAllKnown(Class)"),
358: params));
359: }
360:
361: public/* static: we cannot use static with generic types :E */class Returnable900897600 {
362: private net.sf.mockcreator.IReturnable ir;
363:
364: public Returnable900897600(net.sf.mockcreator.IReturnable ir) {
365: this .ir = ir;
366: }
367:
368: public void throwable(java.lang.RuntimeException th) {
369: ir.throwable(th);
370: }
371:
372: public void throwable(java.lang.Error th) {
373: ir.throwable(th);
374: }
375:
376: public void throwable(java.lang.Throwable th) {
377: ir.throwable(th);
378: }
379:
380: public void returns(int v) {
381: ir.returns(v);
382: }
383:
384: public void returns(java.lang.Integer v) {
385: ir.returns(v);
386: }
387:
388: }
389:
390: public static <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> int getEnumPrimitive(
391: java.lang.Class p0, E p1) {
392: java.util.List params = new java.util.ArrayList();
393: params.add(p0);
394: params.add(p1);
395:
396: try {
397: java.lang.Object ret = net.sf.mockcreator.MockKernel
398: .getReturnValue(
399: getClassObjectMethodSignature("getEnumPrimitive(Class,DaoMappedLocalizedEnumBean)"),
400: params);
401:
402: if (ret == null)
403: throw net.sf.mockcreator.MockKernel
404: .makeException("return value is not prepared");
405: return ((Integer) ret).intValue();
406:
407: } catch (java.lang.RuntimeException e) {
408: throw e;
409: }
410:
411: catch (java.lang.Error e) {
412: throw e;
413: }
414:
415: catch (java.lang.Throwable e) {
416: throw new net.sf.mockcreator.exceptions.MockException(
417: "This class of exception is not declared in method signature. Its not a RuntimeException either. Thus it cannot be configured to throw from the method. Fix the test please.",
418: e);
419: } finally {
420: // do nothing ;)
421: }
422: }
423:
424: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> Returnable900897600 expectGetEnumPrimitive(
425: java.lang.Class p0, E p1) {
426: java.util.List params = new java.util.ArrayList();
427: params.add(p0);
428: params.add(p1);
429:
430: return new Returnable900897600(
431: net.sf.mockcreator.MockKernel
432: .addExpectedMethodCall(
433: getClassObjectMethodSignature("getEnumPrimitive(Class,DaoMappedLocalizedEnumBean)"),
434: params));
435: }
436:
437: public Returnable900897600 acceptGetEnumPrimitive(
438: java.lang.Object p0, java.lang.Object p1) {
439: java.util.List params = new java.util.ArrayList();
440: params.add(p0);
441: params.add(p1);
442:
443: return new Returnable900897600(
444: net.sf.mockcreator.MockKernel
445: .addExpectedMethodCall(
446: getClassObjectMethodSignature("getEnumPrimitive(Class,DaoMappedLocalizedEnumBean)"),
447: params));
448: }
449:
450: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> Returnable900897600 expectZeroOrMoreGetEnumPrimitive() {
451: return new Returnable900897600(
452: net.sf.mockcreator.MockKernel
453: .setDummy(
454: getClassObjectMethodSignature("getEnumPrimitive(Class,DaoMappedLocalizedEnumBean)"),
455: null));
456: }
457:
458: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> Returnable900897600 expectZeroOrMoreGetEnumPrimitive(
459: java.lang.Class p0, E p1) {
460: java.util.List params = new java.util.ArrayList();
461: params.add(p0);
462: params.add(p1);
463:
464: return new Returnable900897600(
465: net.sf.mockcreator.MockKernel
466: .setDummy(
467: getClassObjectMethodSignature("getEnumPrimitive(Class,DaoMappedLocalizedEnumBean)"),
468: params));
469: }
470:
471: public Returnable900897600 acceptZeroOrMoreGetEnumPrimitive(
472: java.lang.Object p0, java.lang.Object p1) {
473: java.util.List params = new java.util.ArrayList();
474: params.add(p0);
475: params.add(p1);
476:
477: return new Returnable900897600(
478: net.sf.mockcreator.MockKernel
479: .setDummy(
480: getClassObjectMethodSignature("getEnumPrimitive(Class,DaoMappedLocalizedEnumBean)"),
481: params));
482: }
483:
484: public/* static: we cannot use static with generic types :E */class Returnablex623529856 {
485: private net.sf.mockcreator.IReturnable ir;
486:
487: public Returnablex623529856(net.sf.mockcreator.IReturnable ir) {
488: this .ir = ir;
489: }
490:
491: public void throwable(java.lang.RuntimeException th) {
492: ir.throwable(th);
493: }
494:
495: public void throwable(java.lang.Error th) {
496: ir.throwable(th);
497: }
498:
499: public void throwable(java.lang.Throwable th) {
500: ir.throwable(th);
501: }
502:
503: }
504:
505: public static <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> void setAllKnown(
506: java.lang.Class p0, java.util.Set<E> p1) {
507: java.util.List params = new java.util.ArrayList();
508: params.add(p0);
509: params.add(p1);
510:
511: try {
512:
513: net.sf.mockcreator.MockKernel
514: .getReturnValue(
515: getClassObjectMethodSignature("setAllKnown(Class,Set)"),
516: params);
517:
518: } catch (java.lang.RuntimeException e) {
519: throw e;
520: }
521:
522: catch (java.lang.Error e) {
523: throw e;
524: }
525:
526: catch (java.lang.Throwable e) {
527: throw new net.sf.mockcreator.exceptions.MockException(
528: "This class of exception is not declared in method signature. Its not a RuntimeException either. Thus it cannot be configured to throw from the method. Fix the test please.",
529: e);
530: } finally {
531: // do nothing ;)
532: }
533: }
534:
535: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> Returnablex623529856 expectSetAllKnown(
536: java.lang.Class p0, java.util.Set<E> p1) {
537: java.util.List params = new java.util.ArrayList();
538: params.add(p0);
539: params.add(p1);
540:
541: return new Returnablex623529856(
542: net.sf.mockcreator.MockKernel
543: .addExpectedMethodCall(
544: getClassObjectMethodSignature("setAllKnown(Class,Set)"),
545: params));
546: }
547:
548: public Returnablex623529856 acceptSetAllKnown(java.lang.Object p0,
549: java.lang.Object p1) {
550: java.util.List params = new java.util.ArrayList();
551: params.add(p0);
552: params.add(p1);
553:
554: return new Returnablex623529856(
555: net.sf.mockcreator.MockKernel
556: .addExpectedMethodCall(
557: getClassObjectMethodSignature("setAllKnown(Class,Set)"),
558: params));
559: }
560:
561: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> Returnablex623529856 expectZeroOrMoreSetAllKnown() {
562: return new Returnablex623529856(
563: net.sf.mockcreator.MockKernel
564: .setDummy(
565: getClassObjectMethodSignature("setAllKnown(Class,Set)"),
566: null));
567: }
568:
569: public <E extends net.sf.mockcreator.dumby.DaoMappedLocalizedEnumBean> Returnablex623529856 expectZeroOrMoreSetAllKnown(
570: java.lang.Class p0, java.util.Set<E> p1) {
571: java.util.List params = new java.util.ArrayList();
572: params.add(p0);
573: params.add(p1);
574:
575: return new Returnablex623529856(
576: net.sf.mockcreator.MockKernel
577: .setDummy(
578: getClassObjectMethodSignature("setAllKnown(Class,Set)"),
579: params));
580: }
581:
582: }
|