class PDActionJavaScript extends PDAction
{
    /**
     * This type of action this object represents.
     */
    public static final String SUB_TYPE = "JavaScript";

    /**
     * Constructor #1.
     */
    public PDActionJavaScript()
    {
        setSubType( SUB_TYPE );
    }

    /**
     * Constructor.
     *
     * @param js Some javascript code.
     */
    public PDActionJavaScript( String js )
    {
        this();
        setAction(js);
    }

    /**
     * Constructor #2.
     *
     *  @param a The action dictionary.
     */
    public PDActionJavaScript(COSDictionary a)
    {
        super(a);
    }
    
    /**
     * @param sAction The JavaScript.
     */
    public final void setAction(String sAction)
    {
        action.setString(COSName.JS, sAction);
    }

    /**
     * @return The Javascript Code.
     */
    public String getAction()
    {<FILL_FUNCTION_BODY>}
}

        COSBase base = action.getDictionaryObject( COSName.JS );
        if (base instanceof COSString)
        {
            return ((COSString)base).getString();
        }
        else if (base instanceof COSStream)
        {
            return ((COSStream)base).toTextString();
        }
        else
        {
            return null;
        }
    
<methods>public void <init>() ,public void <init>(org.apache.pdfbox.cos.COSDictionary) ,public org.apache.pdfbox.cos.COSDictionary getCOSObject() ,public List<org.apache.pdfbox.pdmodel.interactive.action.PDAction> getNext() ,public final java.lang.String getSubType() ,public final java.lang.String getType() ,public void setNext(List<org.apache.pdfbox.pdmodel.interactive.action.PDAction>) <variables>public static final java.lang.String TYPE,protected final non-sealed org.apache.pdfbox.cos.COSDictionary action