org.appcelerator.kroll.annotations
Annotation Type Kroll.setProperty


@Documented
@Retention(value=SOURCE)
@Target(value=METHOD)
public static @interface Kroll.setProperty

Declares a method as a property setter of this Kroll.proxy or Kroll.module.

Setter methods must have at least one argument: The value to set. Optionally, setter methods may also have a KrollInvocation object as the first argument (with the value as the second), and may also have as many optional arguments as necessary after the value when exposed as a Kroll.method.

See Also:
name(), nativeConverter(), javascriptConverter(), retain(), runOnUiThread(), KrollInvocation, Kroll.argument.optional(), @Kroll.method


Optional Element Summary
 java.lang.Class<? extends KrollJavascriptConverter> javascriptConverter
          Converter of Rhino/Javascript objects to Java objects suitable for use in Titanium
 java.lang.String name
          The name of this property in the API.
 java.lang.Class<? extends KrollNativeConverter> nativeConverter
          Converter of Java objects to Javascript objects suitable for use by the Rhino runtime
 boolean retain
          When set to true, the value of this property is retained in the internal property map of this Kroll.proxy
 boolean runOnUiThread
          When set to true, this property setter will only be executed on the UI thread.
 

name

public abstract java.lang.String name
The name of this property in the API.

Default Value:
The method name stripped of "set", and lower-camel-cased or the method name itself.
Default:
"__default_name__"

nativeConverter

public abstract java.lang.Class<? extends KrollNativeConverter> nativeConverter
Converter of Java objects to Javascript objects suitable for use by the Rhino runtime

The value should be the fully qualified name of a class that implements KrollNativeConverter. The class must also implement a static instance getter called getInstance().

See Also:
KrollNativeConverter
Default:
org.appcelerator.kroll.KrollConverter.class

javascriptConverter

public abstract java.lang.Class<? extends KrollJavascriptConverter> javascriptConverter
Converter of Rhino/Javascript objects to Java objects suitable for use in Titanium

The value should be the fully qualified name of a class that implements KrollJavascriptConverter. The class must also implement a static instance getter called getInstance().

See Also:
KrollJavascriptConverter
Default:
org.appcelerator.kroll.KrollConverter.class

retain

public abstract boolean retain
When set to true, the value of this property is retained in the internal property map of this Kroll.proxy

Default:
true

runOnUiThread

public abstract boolean runOnUiThread
When set to true, this property setter will only be executed on the UI thread.

Default:
false


Copyright © 2010 Appcelerator, Inc. Licensed under the Apache License 2.0