
public class AutoboxUtils extends Object
| Constructor and Description |
|---|
AutoboxUtils(JProgram program) |
| Modifier and Type | Method and Description |
|---|---|
JExpression |
box(JExpression toBox,
JPrimitiveType primitiveType)
Box the expression
toBox into the wrapper type corresponding
to primitiveType. |
Collection<JMethod> |
getBoxMethods() |
Collection<JMethod> |
getUnboxMethods() |
JExpression |
undoUnbox(JExpression arg)
If
x is an unbox expression, then return the expression that
is being unboxed by it. |
public AutoboxUtils(JProgram program)
public JExpression box(JExpression toBox, JPrimitiveType primitiveType)
toBox into the wrapper type corresponding
to primitiveType. If toBox is not already of type
primitiveType, then a cast may be necessary.public Collection<JMethod> getBoxMethods()
public Collection<JMethod> getUnboxMethods()
public JExpression undoUnbox(JExpression arg)
x is an unbox expression, then return the expression that
is being unboxed by it. Otherwise, return null.Copyright © 2018. All rights reserved.