public final class TextFileReference extends java.lang.Object implements AsciiSerializable
| Modifier and Type | Class and Description |
|---|---|
static interface |
TextFileReference.FilenameProvider |
| Constructor and Description |
|---|
TextFileReference() |
TextFileReference(TextFileReference.FilenameProvider provider) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getFieldObject(java.lang.reflect.Field fld)
This method allows access to java.lang.reflect.Field objects within the implementing
class.
|
java.lang.String |
getFilename() |
java.lang.String |
getValue() |
static java.lang.String |
getValue(TextFileReference ref,
java.lang.String defaultVal)
Useful when a TextFileReference is used along side a String field and
only one object is meant to hold the current value.
|
boolean |
readValue(Identifier remoteId) |
boolean |
setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
This allows access to fields withing the implementing object to set there data.
|
void |
setFilename(java.lang.String filename) |
void |
setValue(java.lang.String value) |
static java.lang.String |
setValue(TextFileReference ref,
java.lang.String script)
Useful when a TextFileReference is used along side a String field and
only one object is meant to hold the current value.
|
boolean |
writeValue(Identifier remoteId) |
public TextFileReference()
public TextFileReference(TextFileReference.FilenameProvider provider)
public java.lang.String getValue()
public void setValue(java.lang.String value)
public java.lang.String getFilename()
public void setFilename(java.lang.String filename)
public boolean setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
FieldAccessorsetFieldObject in interface FieldAccessorfld - The java field object representing the member field to be setfobj - The data to set in that fieldpublic java.lang.Object getFieldObject(java.lang.reflect.Field fld)
FieldAccessorgetFieldObject in interface FieldAccessorfld - The field to get.public static java.lang.String getValue(TextFileReference ref, java.lang.String defaultVal)
ref - defaultVal - public static java.lang.String setValue(TextFileReference ref, java.lang.String script)
Retrieving the value from the two fields can be accomplished like: String currentValue = TextFileReference.getValue(_initScriptRef, _initScript);
ref - script - public boolean writeValue(Identifier remoteId) throws java.io.IOException
java.io.IOExceptionpublic boolean readValue(Identifier remoteId) throws java.io.IOException
java.io.IOException