Class JavaObject

  • All Implemented Interfaces:
    java.io.Serializable, org.mozilla.javascript.Scriptable, org.mozilla.javascript.SymbolScriptable, org.mozilla.javascript.Wrapper

    public class JavaObject
    extends org.mozilla.javascript.NativeJavaObject
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.mozilla.javascript.NativeJavaObject

        isAdapter, javaObject, members, parent, prototype, staticType
      • Fields inherited from interface org.mozilla.javascript.Scriptable

        NOT_FOUND
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaObject​(org.mozilla.javascript.Scriptable scope, java.lang.Object obj, java.lang.String protoName, org.mozilla.javascript.Scriptable prototype, RhinoCore core)
      Creates a new JavaObject wrapper.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​(java.lang.String name, org.mozilla.javascript.Scriptable start)
      Get a named property from this object.
      java.lang.Object getResource​(java.lang.String resourceName)
      Returns a prototype's resource of a given name.
      java.lang.Object getResources​(java.lang.String resourceName)
      Returns an array containing the prototype's resource with a given name.
      boolean has​(java.lang.String name, org.mozilla.javascript.Scriptable start)
      Checks whether the given property is defined in this object.
      java.lang.Object href​(java.lang.Object action, java.lang.Object params)
      Get the URL for this object with the application
      boolean renderSkin​(java.lang.Object skinobj, java.lang.Object paramobj)  
      java.lang.String renderSkinAsString​(java.lang.Object skinobj, java.lang.Object paramobj)  
      • Methods inherited from class org.mozilla.javascript.NativeJavaObject

        canConvert, coerceType, createInterfaceAdapter, delete, delete, delete, get, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, initMembers, put, put, put, setParentScope, setPrototype, unwrap, wrap
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavaObject

        public JavaObject​(org.mozilla.javascript.Scriptable scope,
                          java.lang.Object obj,
                          java.lang.String protoName,
                          org.mozilla.javascript.Scriptable prototype,
                          RhinoCore core)
        Creates a new JavaObject wrapper.
    • Method Detail

      • renderSkin

        public boolean renderSkin​(java.lang.Object skinobj,
                                  java.lang.Object paramobj)
                           throws java.io.UnsupportedEncodingException,
                                  java.io.IOException
        Parameters:
        skinobj - ...
        paramobj - ...
        Returns:
        ...
        Throws:
        java.io.UnsupportedEncodingException
        java.io.IOException
      • renderSkinAsString

        public java.lang.String renderSkinAsString​(java.lang.Object skinobj,
                                                   java.lang.Object paramobj)
                                            throws java.io.UnsupportedEncodingException,
                                                   java.io.IOException
        Parameters:
        skinobj - ...
        paramobj - ...
        Returns:
        ...
        Throws:
        java.io.UnsupportedEncodingException
        java.io.IOException
      • href

        public java.lang.Object href​(java.lang.Object action,
                                     java.lang.Object params)
                              throws java.io.UnsupportedEncodingException,
                                     java.io.IOException
        Get the URL for this object with the application
        Parameters:
        action - optional action name
        params - optional query parameters
        Returns:
        the URL for the object
        Throws:
        java.io.UnsupportedEncodingException - if the application's charset property is not a valid encoding name
        java.io.IOException
      • has

        public boolean has​(java.lang.String name,
                           org.mozilla.javascript.Scriptable start)
        Checks whether the given property is defined in this object.
        Specified by:
        has in interface org.mozilla.javascript.Scriptable
        Overrides:
        has in class org.mozilla.javascript.NativeJavaObject
      • get

        public java.lang.Object get​(java.lang.String name,
                                    org.mozilla.javascript.Scriptable start)
        Get a named property from this object.
        Specified by:
        get in interface org.mozilla.javascript.Scriptable
        Overrides:
        get in class org.mozilla.javascript.NativeJavaObject
      • getResource

        public java.lang.Object getResource​(java.lang.String resourceName)
        Returns a prototype's resource of a given name. Walks up the prototype's inheritance chain if the resource is not found
        Parameters:
        resourceName - the name of the resource, e.g. "type.properties", "messages.properties", "script.js", etc.
        Returns:
        the resource, if found, null otherwise
      • getResources

        public java.lang.Object getResources​(java.lang.String resourceName)
        Returns an array containing the prototype's resource with a given name.
        Parameters:
        resourceName - the name of the resource, e.g. "type.properties", "messages.properties", "script.js", etc.
        Returns:
        an array of resources with the given name