Skip to main content

ModelCenter Remote Execution Java API 2026 R1

Class PHXReference

Last update: 22.06.2026

Package: com.phoenix_int.aserver.types

↳ java.lang.Object
  ↳ com.phoenix_int.aserver.types.PHXReference

All Implemented Interfaces:


public class PHXReference
extends java.lang.Object
implements IPHXAlwaysWriteable, IPHXType2

The type for references. This class matches up to references in ModelCenter. Users may define their own properties in addition to the value property.

  • value: double
  • properties: PHXRefProperty[]
  • reference: String

Nested Class Summary

Nested classes/interfaces inherited from interface com.phoenix_int.aserver.types.IPHXType2

IPHXType2.IVisitor<T>

Constructor Summary

Constructor and Description
PHXReference()constructor

Method Summary

Modifier and Type Method and Description
PHXRefProperty _getProperty(java.lang.String name)
retrieves a named property
<T> T Accept(IPHXType2.IVisitor<T> visitor)
Accept a Visitor.
IPHXRefPropInfo createRefProp(java.lang.String name, java.lang.String type)
adds a property to the variable
void fromString(java.lang.String s)
converts from a string
void fromString2(PHXStringBuffers)
converts from a PHXStringBuffer
java.lang.String getDescription()
PHXRefProperty[] getProperties()
retrieves the properties of the variable
java.lang.String getReference()
retrieves the current reference string.
boolean getRefPropValueBoolean(java.lang.String name)
double getRefPropValueDouble(java.lang.String name)
gets a value for a ref prop
long getRefPropValueLong(java.lang.String name)
java.lang.String getRefPropValueString(java.lang.String name)
double getValue()
retrieves the current value of the variable
void setDescription(java.lang.String desc)
void setProperties(PHXRefProperty[] v)
void setReference(java.lang.String ref)
sets the value for the reference string.
void setRefPropValue(java.lang.String name, boolean value)
void setRefPropValue(java.lang.String name, double value)
sets a value for a ref prop
void setRefPropValue(java.lang.String name, long value)
void setRefPropValue(java.lang.String name, java.lang.String value)
void setValue(double v)
sets the value for the variable
java.lang.String toString()
converts to a string
PHXStringBuffer toString2()
converts to a PHXStringBuffer

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PHXReference

public PHXReference()

Constructor

Method Detail

getValue

public double getValue()

Retrieves the current value of the variable

Returns:

  • the value of the variable

setValue

public void setValue(double v)

Sets the value for the variable

Parameters:

  • v - the value

getReference

public java.lang.String getReference()

Retrieves the current reference string. This is a client-supplied value describing what the reference value points to.

Returns:

  • the reference string

setReference

public void setReference(java.lang.String ref)

Sets the value for the reference string. This should only be called by the client application, e.g. ModelCenter.

Parameters:

  • ref - the reference string

getProperties

public PHXRefProperty[] getProperties()

Retrieves the properties of the variable

Returns:

  • the properties of the variable

setProperties

public void setProperties(PHXRefProperty[] v)

createRefProp

public IPHXRefPropInfo createRefProp(java.lang.String name,
                                     java.lang.String type)

Adds a property to the variable

Parameters:

  • name - the name of the property
  • type - property type: "long", "double", "boolean", or "string"

getRefPropValueDouble

public double getRefPropValueDouble(java.lang.String name)
                             throws PHXTypeMismatchException

Gets a value for a ref prop

Parameters:

  • name - the name of the property

Returns:

  • the value of the property

Throws:

getRefPropValueLong

public long getRefPropValueLong(java.lang.String name)
                         throws PHXTypeMismatchException

Throws:

getRefPropValueBoolean

public boolean getRefPropValueBoolean(java.lang.String name)
                               throws PHXTypeMismatchException

Throws:

getRefPropValueString

public java.lang.String getRefPropValueString(java.lang.String name)
                                       throws PHXTypeMismatchException

Throws:

setRefPropValue

public void setRefPropValue(java.lang.String name,
                            double value)
                     throws PHXTypeMismatchException

Sets a value for a ref prop

Parameters:

  • name - the name of the property
  • value - the value of the property

Throws:

setRefPropValue

public void setRefPropValue(java.lang.String name,
                            long value)
                     throws PHXTypeMismatchException

Throws:

setRefPropValue

public void setRefPropValue(java.lang.String name,
                            boolean value)
                     throws PHXTypeMismatchException

Throws:

setRefPropValue

public void setRefPropValue(java.lang.String name,
                            java.lang.String value)
                     throws PHXTypeMismatchException

Throws:

_getProperty

public PHXRefProperty _getProperty(java.lang.String name)

Retrieves a named property

Parameters:

  • name - the name of the property

Returns:

  • the property matching the specified name

toString2

public PHXStringBuffer toString2()

Converts to a PHXStringBuffer

Specified by:

Returns:

  • a PHXStringBuffer

toString

public java.lang.String toString()

converts to a string

Specified by:

Overrides:

  • toString in class java.lang.Object

Returns:

  • a string

fromString2

public void fromString2(PHXStringBuffer s)

Converts from a PHXStringBuffer

Specified by:

Parameters:

  • s - the PHXStringBuffer value

fromString

public void fromString(java.lang.String s)

Converts from a string

Specified by:

Parameters:

  • s - the string value

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String desc)

Accept

public <T> T Accept(IPHXType2.IVisitor<T> visitor)

Accept a Visitor.

Specified by:

Type Parameters:

  • T - Type of the result of the visit.

Parameters:

  • visitor - The visitor to accept.

Returns:

  • The results of the visit.

Connect with Ansys