( Object value )
| 141 | |
| 142 | // private to prevent invocation with param that isn't a primitive-wrapper |
| 143 | public Primitive( Object value ) |
| 144 | { |
| 145 | if ( value == null ) |
| 146 | throw new InterpreterError( |
| 147 | "Use Primitve.NULL instead of Primitive(null)"); |
| 148 | |
| 149 | if ( value != Special.NULL_VALUE |
| 150 | && value != Special.VOID_TYPE && |
| 151 | !isWrapperType( value.getClass() ) |
| 152 | ) |
| 153 | throw new InterpreterError( "Not a wrapper type: "+value.getClass()); |
| 154 | |
| 155 | this.value = value; |
| 156 | } |
| 157 | |
| 158 | public Primitive(boolean value) { this(value ? Boolean.TRUE : Boolean.FALSE); } |
| 159 | public Primitive(byte value) { this(Byte.valueOf(value)); } |
nothing calls this directly
no test coverage detected