JLink`
JLink`

JavaObjectToExpression

JavaObjectToExpression[javaobject]

converts the specified Java object reference into its value as a "native" Wolfram Language expression.

Details and Options

  • To use JavaObjectToExpression, you first need to load J/Link using Needs["JLink`"].
  • Normally, all Java objects that have a meaningful "by value" representation in the Wolfram Language are returned by value to the Wolfram Language automatically. Such objects include strings, arrays (these become lists), and instances of so-called wrapper classes like java.lang.Integer. However, you can get a reference form of one of these types if you explicitly call JavaNew or use the ReturnAsJavaObject function. In such cases, you can use JavaObjectToExpression to retrieve the value.
  • JavaObjectToExpression has no effect on objects that have no meaningful "value" representation in the Wolfram Language.
Wolfram Research (2007), JavaObjectToExpression, Wolfram Language function, https://reference.wolfram.com/language/JLink/ref/JavaObjectToExpression.html.

Text

Wolfram Research (2007), JavaObjectToExpression, Wolfram Language function, https://reference.wolfram.com/language/JLink/ref/JavaObjectToExpression.html.

CMS

Wolfram Language. 2007. "JavaObjectToExpression." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/JLink/ref/JavaObjectToExpression.html.

APA

Wolfram Language. (2007). JavaObjectToExpression. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/JLink/ref/JavaObjectToExpression.html

BibTeX

@misc{reference.wolfram_2023_javaobjecttoexpression, author="Wolfram Research", title="{JavaObjectToExpression}", year="2007", howpublished="\url{https://reference.wolfram.com/language/JLink/ref/JavaObjectToExpression.html}", note=[Accessed: 29-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_javaobjecttoexpression, organization={Wolfram Research}, title={JavaObjectToExpression}, year={2007}, url={https://reference.wolfram.com/language/JLink/ref/JavaObjectToExpression.html}, note=[Accessed: 29-March-2024 ]}