MCPcopy Create free account
hub / github.com/beanshell/beanshell / Primitive

Method Primitive

src/bsh/Primitive.java:143–156  ·  view source on GitHub ↗
( Object value )

Source from the content-addressed store, hash-verified

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)); }

Callers

nothing calls this directly

Calls 2

isWrapperTypeMethod · 0.95
getClassMethod · 0.80

Tested by

no test coverage detected