## helma.doc
Class DocFunction

    java.lang.Object
      helma.doc.DocElement
          helma.doc.DocResourceElement
              helma.doc.DocFunction

    public class DocFunction

extends DocResourceElement

Field Summary

Fields inherited from class helma.doc.DocResourceElement
`resource`

Fields inherited from class helma.doc.DocElement
`ACTION, APPLICATION, FUNCTION, MACRO, PROPERTIES, PROTOTYPE, SKIN, TEMPLATE, typeNames`

Constructor Summary
`protected` `DocFunction(java.lang.String name, Resource res, DocElement parent, int type, int lineno)`

Method Summary
`protected static java.awt.Point` `getPoint(org.mozilla.javascript.Token token)` Returns a pointer to the current position in the TokenStream
`java.lang.String` `getPrototype()` from helma.framework.IPathElement.
`int` `getStartLine()` Get the first line of this function within the containing resource.
`static DocFunction` `newAction(Resource res)` creates a new independent DocFunction object of type ACTION
`static DocFunction` `newAction(Resource res, DocElement parent)` creates a new DocFunction object of type ACTION connected to another DocElement
`static DocFunction[]` `newFunctions(Resource res)` reads a function file and creates independent DocFunction objects of type FUNCTION
`static DocFunction[]` `newFunctions(Resource res, DocElement parent)` reads a function file and creates DocFunction objects of type FUNCTION connected to another DocElement.
`protected static org.mozilla.javascript.Token[]` `parseTokens(Resource res)` Creates a rhino token stream for a given file.

Methods inherited from class helma.doc.DocResourceElement
`toString`

Methods inherited from class helma.doc.DocElement
`addChild, addParameter, addTag, countChildren, debug, getChildElement, getChildren, getComment, getContent, getDocApplication, getElementName, getName, getParentElement, getType, getTypeName, hasParameter, listChildren, listParameters, listTags, listTags, setParent`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DocFunction

    protected DocFunction(java.lang.String name,
                          Resource res,
                          DocElement parent,
                          int type,
                          int lineno)

Method Detail

### newAction

    public static DocFunction newAction(Resource res)
                                 throws java.io.IOException

  creates a new independent DocFunction object of type ACTION

  Throws:
    `java.io.IOException`

### newAction

    public static DocFunction newAction(Resource res,
                                        DocElement parent)
                                 throws java.io.IOException

  creates a new DocFunction object of type ACTION connected to another DocElement

  Throws:
    `java.io.IOException`

### newFunctions

    public static DocFunction[] newFunctions(Resource res)
                                      throws java.io.IOException

  reads a function file and creates independent DocFunction objects of type FUNCTION

  Throws:
    `java.io.IOException`

### newFunctions

    public static DocFunction[] newFunctions(Resource res,
                                             DocElement parent)
                                      throws java.io.IOException

  reads a function file and creates DocFunction objects of type FUNCTION connected to another DocElement.

  Throws:
    `java.io.IOException`

### parseTokens

    protected static org.mozilla.javascript.Token[] parseTokens(Resource res)
                                                         throws java.io.IOException

  Creates a rhino token stream for a given file.

  Parameters:
    `res` - the JS Resource
  Returns:
    a TokenStream wrapper
  Throws:
    `java.io.IOException` - if an I/O exception was raised

### getPoint

    protected static java.awt.Point getPoint(org.mozilla.javascript.Token token)

  Returns a pointer to the current position in the TokenStream

  Parameters:
    `token` - the TokenStream
  Returns:
    the current position

### getPrototype

    public java.lang.String getPrototype()

  from helma.framework.IPathElement. All macros, templates, actions etc have the same prototype.

  Overrides:
    `getPrototype` in class `DocElement`

### getStartLine

    public int getStartLine()

  Get the first line of this function within the containing resource.

  Overrides:
    `getStartLine` in class `DocResourceElement`
  Returns:
    the first line of the function

Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.