Last change
on this file since 77 was
77,
checked in by psniegowski, 11 years ago
|
Add new java codebase.
|
File size:
858 bytes
|
Line | |
---|
1 | package com.framsticks.params.types; |
---|
2 | |
---|
3 | import com.framsticks.params.AccessInterface; |
---|
4 | import com.framsticks.params.CastFailure; |
---|
5 | |
---|
6 | /** |
---|
7 | * @author Piotr Sniegowski |
---|
8 | */ |
---|
9 | public class ObjectParam extends CompositeParam { |
---|
10 | |
---|
11 | public ObjectParam(String containedTypeName) { |
---|
12 | super(containedTypeName); |
---|
13 | } |
---|
14 | |
---|
15 | @Override |
---|
16 | public String computeAccessId() { |
---|
17 | return containedTypeName; |
---|
18 | } |
---|
19 | |
---|
20 | @Override |
---|
21 | public Class getStorageType() { |
---|
22 | return Object.class; |
---|
23 | } |
---|
24 | |
---|
25 | @Override |
---|
26 | public boolean isEmptyAvailable() { |
---|
27 | return true; |
---|
28 | } |
---|
29 | |
---|
30 | @Override |
---|
31 | public Object reassign(Object newValue, Object oldValue) throws CastFailure { |
---|
32 | return newValue; |
---|
33 | } |
---|
34 | |
---|
35 | @Override |
---|
36 | public AccessInterface prepareAccessInterface(AccessInterface access) { |
---|
37 | return access; |
---|
38 | } |
---|
39 | |
---|
40 | @Override |
---|
41 | public String getType() { |
---|
42 | return "o " + containedTypeName; |
---|
43 | } |
---|
44 | |
---|
45 | |
---|
46 | |
---|
47 | |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.