|
1 |
| package com.agical.rmock.core.match.reference; |
|
2 |
| |
|
3 |
| import com.agical.rmock.core.match.Expression; |
|
4 |
| import com.agical.rmock.core.match.Reference; |
|
5 |
| |
|
6 |
| public class ReferenceFactory { |
|
7 |
| |
|
8 |
7379
| public Reference create(Object reference) {
|
|
9 |
7379
| if(reference != null && reference.getClass().isArray()) {
|
|
10 |
64
| return new ArrayRefernce(reference);
|
|
11 |
| } |
|
12 |
7315
| else if(reference instanceof Expression) {
|
|
13 |
67
| return new ExpressionReference((Expression) reference);
|
|
14 |
| } |
|
15 |
| else { |
|
16 |
7248
| return new ToStringReference(reference);
|
|
17 |
| } |
|
18 |
| } |
|
19 |
| } |