1 21 package oracle.toplink.essentials.indirection; 23 24 import java.io.Serializable ; 25 26 31 public class ValueHolder implements ValueHolderInterface, Cloneable , Serializable { 32 33 36 protected Object value; 37 38 42 public ValueHolder() { 43 super(); 44 } 45 46 50 public ValueHolder(Object value) { 51 this.value = value; 52 } 53 54 57 public Object clone() { 58 try { 59 return super.clone(); 60 } catch (CloneNotSupportedException exception) { 61 ; 62 } 63 64 return null; 65 } 66 67 71 public synchronized Object getValue() { 72 return value; 73 } 74 75 80 public boolean isInstantiated() { 81 return true; 84 } 85 86 90 public void setValue(Object value) { 91 this.value = value; 92 } 93 94 97 public String toString() { 98 if (getValue() == null) { 99 return "{" + null + "}"; 100 } 101 return "{" + getValue().toString() + "}"; 102 } 103 } 104 | Popular Tags |