# com.bea.ide.lang.java.element
JavaElement Class

public abstract class JavaElement
extends `DefaultSourceElement`

Hierarchy
  `Object`
  `DefaultElement`
  `DefaultTreeElement`
  `DefaultDocumentElement`
  `DefaultSourceElement`
  `JavaElement`

All Implemented Interfaces
  `IDocumentElement`, `IElement`, `ISourceElement`, `IStructureFeature.IStructureNode`, `ITreeElement`

Direct Known Subclasses
  `JavaComment`, `JavaDocAttribute`, `JavaDocTag`, `JavaImport`, `JavaModifierSupport`, `JavaPackage`, `JavaUnit`

## Nested Class Summary

Nested classes from com.bea.ide.sourceeditor.element`.`DefaultSourceElement``
``DefaultSourceElement.CompilerPropertyDescriptor`, `DefaultSourceElement.DefaultAuthorElement`, `DefaultSourceElement.StaticCompilerPropertyDescriptor`, `DefaultSourceElement.StickyRange``

## Field Summary

Fields from com.bea.ide.sourceeditor.element`.`DefaultSourceElement``
``_range`, `PROP_NAME`, `PROP_VALUE``

Fields from com.bea.ide.element`.`DefaultTreeElement``
``_parent`, `_vChildren``

Fields from interface com.bea.ide.sourceeditor.element`.`ISourceElement``
``STATUS_IN_TREE`, `STATUS_NOT_IN_TREE`, `STATUS_REMOVED_FROM_TREE``

## Constructor Summary

JavaElement(`Object` structureNodeCookie) Creates a new object containing the specified cookie.

## Method Summary

`public abstract `Object`` | `visit`(`JavaVisitor` visitor, `Object` args) Provides visitor support for JavaElement objects.

Methods from `com.bea.ide.sourceeditor.element.`DefaultSourceElement``
``addChild`, `createAuthorNode`, `debugDump`, `equals`, `getChildrenByClass`, `getClassLoader`, `getCookie`, `getDefaultPropertyDescriptors`, `getDiagnostics`, `getGroup`, `getInstanceName`, `getProperty`, `getPropertyCode`, `getPropertyDescriptors`, `getPropertySourceRange`, `getPropertySourceRanges`, `getPropertySourceText`, `getPropertySourceText`, `getRange`, `getRange`, `getRangePrefetchProperties`, `getStatus`, `getTypeCode`, `initializeRange`, `initializeRange`, `insertChild`, `isAuthorProperty`, `markRemovedFromTree`, `mergeElements`, `mergeFrom`, `propertyModified`, `removeChild`, `removeChild`, `replaceChild`, `requestAddChild`, `requestAddChild`, `requestRemoveChild`, `requestSetProperty`, `setProperty`, `setStatus``

Methods from `com.bea.ide.document.`DefaultDocumentElement``
``addChild`, `getDocument`, `setDocument``

Methods from `com.bea.ide.element.`DefaultTreeElement``
``addChild`, `children`, `getChild`, `getChildCount`, `getParent`, `removeChild``

Methods from `com.bea.ide.element.`DefaultElement``
``getProperty`, `getPropertyDescriptors`, `setProperty``

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

Methods from interface `com.bea.ide.document.`IDocumentElement``
``getDocument``

Methods from interface `com.bea.ide.element.`IElement``
``getProperty`, `getPropertyDescriptors`, `setProperty``

Methods from interface `com.bea.ide.sourceeditor.element.`ISourceElement``
``createAuthorNode`, `getCookie`, `getDiagnostics`, `getPropertyCode`, `getRange`, `getStatus`, `mergeFrom`, `requestAddChild`, `requestAddChild`, `requestRemoveChild`, `requestSetProperty``

Methods from interface `com.bea.compiler.feature.`IStructureFeature.IStructureNode``
`getCookie, getTypeCode`

Methods from interface `com.bea.ide.element.`ITreeElement``
``children`, `getChild`, `getChildCount`, `getParent``

## Constructor Detail

### JavaElement

    public JavaElement(Object structureNodeCookie)

  Creates a new object containing the specified cookie. This constructor should only be called by `ILanguageBuilder``` implementations.

## Method Detail

### visit(JavaVisitor, Object) Method

    public abstract Object visit(JavaVisitor visitor,
                                 Object args)

Provides visitor support for JavaElement objects. See `JavaVisitor``` for more information.

#### Parameters

visitor
  The visitor

args
  An argument to the visit, to be interpreted by the visitor.

#### Returns

Object returned by the visitor.