The Talon Manual

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

GettersDescriptionZero Garbage
String getXXX()

Returns the field value as a String.

No
String getXXX(String defaultIfNotSet)

Returns the field value as a String, or the provided value if the field is not set.

No

XString getXXXUnsafe()

Returns the raw XString which may be pooled along with the message and point to its backing buffer.

(warning) Note: The caller may not hold a reference to or modify the returned value beyond the pooling lifespan of the object which is typically a message handler.

Yes

XString getXXXUnsafe(XString defaultIfNotSet)

Returns the getXXXUnsafe() or the provided XString if the field is not set. The same Yes
void getXXXTo(XString to)

Copying accessor. Copies the value of the field into the provided XString.

This method is a safer alternative to getXXXUnsafe as the copied value is safe to retain beyond thepooling lifespan of the object.

Yes

void getXXXTo(XString to, XString defaultIfNotSet)

Copying accessor. This is equivalent to getXXXTo(XString to), but if the field is not set the default value is copied into the provided value.

Yes
<T extends XString> T getXXXTo(XString.Factory<T> factory)

Copying accessor. Similar to getXXXTo, but draws the value to copy into from the provided XString factory.

This method is useful when working with a string field that is declared as poolable. This allows the application to preallocate a pool of XStrings to draw upon when copying string fields from a message

Yes
<T extends XString> T getXXXTo(XString.Factory<T>factory, T defaultIfNotSet)

Copying accessor. Similar to getXXXTo(factory), but will copy in the provided default value if the field is not set on the object.

Yes
SettersDescription 

void setXXX(String val)

Sets the value of the fieldYes
void setXXXFrom(long val)Encodes the provider long value as a decimal string.Yes
void setXXXFrom(XString val)Copying setter. This method copies the provided value into the object. This method can be more efficient than the setXXX(String) as it can copy the provided value's backing buffer directly.Yes
void lendXXX(XString)

This method is equivalent to setXXX except that it allows this object to defer copying the value until this object is next serialized.

(warning) Note: This means that the caller must not modify or dispose the value being passed in to this method. See the javadoc on the generated method for more deatils.

(lightbulb) Prior to the version 3.8, ADM generated code would not allow lending of a null value and would result in a NullPointerException, this retriction was relaxed in 3.8 to treat a null value as clearing the field.

Yes

...