Skip to main content

ModelCenter Remote Execution Java API 2026 R1

Class: PHXFile

Last update: 22.06.2026

Package: com.phoenix_int.aserver.types

Class Hierarchy

↳ java.lang.Object
  ↳ [PHXSimpleType](PHXSimpleType.md)
    ↳ PHXFile

Implemented Interfaces


Declaration

@Deprecated
public class PHXFile
extends PHXSimpleType

Deprecated.

Internal data type used for certain types of files. End users should use PHXRawFile to implement file variables in their custom components.

  • name: String
  • contents: String

Nested Class Summary

Nested classes/interfaces inherited from interface IPHXType2

IPHXType2.IVisitor<t>

Constructor Summary

Constructor and Description
PHXFile()
Deprecated.
PHXFile(PHXFile other)
Deprecated. Clone another PHXFile's value and metadata.
PHXFile(java.lang.String fileName)
Deprecated.
PHXFile(java.lang.String baseName, java.lang.String name)
Deprecated.

Method Summary

Modifier and Type Method and Description
<t> T Accept([IPHXType2](IPHXType2.md).IVisitor<t> visitor)
Deprecated. Accept a Visitor.
PHXFile createCopy()
Deprecated. Create a copy of this instance, including the value and metadata.
boolean equalsNatural([PHXSimpleType](PHXSimpleType.md) toCompare)
Deprecated. Compare this PHXSimpleType to another PHXSimpleType.
void fromObject(java.lang.Object toRead)
Deprecated. Load the value of this object from the specified object.
void fromString(java.lang.String value)
Deprecated. Converts a String representation to the internal value.
void fromString2(PHXStringBuffer value)
Deprecated. Converts a PHXStringBuffer representation to the internal value.
java.lang.String getContents()
Deprecated. Retrieves the contents of the file.
java.lang.String getName()
Deprecated. Retrieves the name of the file.
java.lang.String getNameCoded()
Deprecated. Retrieves the name of the file in coded form (without $variables replaced).
boolean hasChanged()
Deprecated. Checks to see if the file has changed since the last time getContents() was called.
void markAsRead()
Deprecated. Call this function after you manually get the contents of the file.
void setBaseName(java.lang.String v)
Deprecated. Sets the base name of the file.
void setName(java.lang.String v)
Deprecated. Sets the name of the file.
void setStringReplacer(PHXStringReplacer r)
Deprecated. Specifies a PHXStringReplacer object for use in forming the full file name.
java.lang.String toString()
Deprecated. Converts the variable to a string.
PHXStringBuffer toString2()
Deprecated. Converts the variable to a string.

Methods inherited from class PHXSimpleType

_copyMetadataFromOther, addPropertyChangeListener, getDescription, getEnumTokens, getHasChanged, getUnits, removePropertyChangeListener, setDescription, setHasChanged, setUnits

Methods inherited from class java.lang.Object

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

Constructor Detail

PHXFile

public PHXFile()

Deprecated.

PHXFile

public PHXFile(java.lang.String fileName)

Deprecated.

PHXFile

public PHXFile(java.lang.String baseName,
               java.lang.String name)

Deprecated.

PHXFile

public PHXFile(PHXFile other)

Parameters:

  • other - the other PHXFile to clone.

Deprecated. Clone another PHXFile's value and metadata.

Method Detail

getName

public java.lang.String getName()

Deprecated. Retrieves the name of the file.

Returns:

  • the name of the file

getNameCoded

public java.lang.String getNameCoded()

Deprecated. Retrieves the name of the file in coded form (without $variables replaced).

Returns:

  • the name of the file in coded form

setName

public void setName(java.lang.String v)

Parameters:

  • v - the name

Deprecated. Sets the name of the file.

setBaseName

public void setBaseName(java.lang.String v)

Parameters:

  • v - the name

Deprecated. Sets the base name of the file.

setStringReplacer

public void setStringReplacer(PHXStringReplacer r)

Parameters:

  • r - the string replacer object

Deprecated. Specifies a PHXStringReplacer object for use in forming the full file name.

getContents

public java.lang.String getContents()
                             throws java.io.IOException

Deprecated. Retrieves the contents of the file.

Returns:

  • the contents of the file

Throws:

  • java.io.IOException

markAsRead

public void markAsRead()

Deprecated. Call this function after you manually get the contents of the file. The function records its name and timestamp for use with the hasChanged() function.

hasChanged

public boolean hasChanged()

Deprecated. Checks to see if the file has changed since the last time getContents() was called.

Returns:

  • true if the timestamp of the file is new, or if the file name has changed

toString2

public PHXStringBuffer toString2()

Deprecated. Converts the variable to a string.

Returns:

  • a PHXStringBuffer representation of the variable

toString

public java.lang.String toString()

Deprecated. Converts the variable to a string.

Specified by:

Overrides:

  • toString in class java.lang.Object

Returns:

  • a String representation of the variable

fromString2

public void fromString2(PHXStringBuffer value)

Parameters:

  • value - the value to convert

Deprecated. Converts a PHXStringBuffer representation to the internal value.

fromString

public void fromString(java.lang.String value)

Parameters:

  • value - the value to convert

Deprecated. Converts a String representation to the internal value.

equalsNatural

public boolean equalsNatural(PHXSimpleType toCompare)
                      throws PHXTypeMismatchException

Deprecated. Compare this PHXSimpleType to another PHXSimpleType. This type of comparison is different than Comparable in that it does a natural comparison between numbers. It is not designed, nor suited, for use in things such as sets, and may behave oddly if put in those circumstances.

Specified by:

Parameters:

  • toCompare -

Returns:

  • a negative number if this object is less than toCompare, a positive number if this object is greater than to compare, and zero if these two objects are equal.

Throws:

fromObject

public void fromObject(java.lang.Object toRead)
                throws PHXInvalidTypeException

Deprecated. Load the value of this object from the specified object. This will read the object and attempt to convert it if it is a known type. If the type isn't recognized, it will throw a PHXInvalidTypeException. If there is an error in conversion, it will also throw a PHXInvalidTypeException.

NOTE: while it might be logical to think you can create a PHX(Type)Array from, say, an array of java.lang.(Type), that is not currently supported. You MUST use the PHX string array formatting style.

Specified by:

Parameters:

  • toRead - to object from which to load this objects value.

Throws:

Accept

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

Deprecated. Accept a Visitor.

Type Parameters:

  • T - Type of the result of the visit.

Parameters:

  • visitor - The visitor to accept.

Returns:

  • The results of the visit.

createCopy

public PHXFile createCopy()

Deprecated. Description copied from class: PHXSimpleType. Create a copy of this instance, including the value and metadata.

Specified by:

Returns:

  • a newly constructed copy of this instance.

Connect with Ansys