Constructor | Description |
---|---|
ReferenceImpl(String objectReference,
String applicationReference) |
Modifier and Type | Method | Description |
---|---|---|
ReferenceImpl |
_decode(String objectReference,
String applicationReference) |
Parse the given reference and create a corresponding
Java object for it.
|
String |
_encode(Object reference) |
Encode the given object as valid AppleScript object reference.
|
TypeClass[] |
_getAppleScriptTypes() |
Array of AppleScript types that can be decoded
with this class.
|
Class<? extends Reference> |
_getJavaType() |
The type used in Java interfaces that this
Codec corresponds to. |
<T> T |
cast(Class<T> klass) |
Cast this object to another AppleScript type.
|
boolean |
equals(Object o) |
|
String |
getApplicationReference() |
Application reference.
|
static ReferenceImpl |
getInstance() |
Null instance used for
Codec implementation. |
String |
getObjectReference() |
Object reference.
|
TypeClass |
getTypeClass() |
Returns the AppleScript runtime class for this object.
|
int |
hashCode() |
|
boolean |
isInstanceOf(TypeClass typeClass) |
Indicates whether this object is an instance of the given
TypeClass . |
String |
toString() |
public static ReferenceImpl getInstance()
Codec
implementation.public String getObjectReference()
Reference
getObjectReference
in interface Reference
public String getApplicationReference()
Reference
getApplicationReference
in interface Reference
public TypeClass getTypeClass()
Reference
Note that the runtime may be different from the class corresponding to the Java interface you are currently using as a proxy, i.e. the Java interface may be less specialized.
getTypeClass
in interface Reference
public boolean isInstanceOf(TypeClass typeClass)
Reference
TypeClass
.isInstanceOf
in interface Reference
typeClass
- type classpublic <T> T cast(Class<T> klass)
Reference
public String _encode(Object reference)
Codec
public Class<? extends Reference> _getJavaType()
Codec
Codec
corresponds to.
In case a primitive type is available (e.g. Integer.TYPE
), that type
should be returned._getJavaType
in interface Codec<Reference>
public TypeClass[] _getAppleScriptTypes()
Codec
_getAppleScriptTypes
in interface Codec<Reference>
public ReferenceImpl _decode(String objectReference, String applicationReference)
Codec
Reference
object itself, but may also be a primitive, e.g. a string
or a number.