# com.bea.ide.lang.control.element
ControlMethod Class

public class ControlMethod
extends `JavaMethod`
implements `ILinkedElement`

This is a method in a ControlContainer that is a handler for a callback in a control.

Hierarchy
  `Object`
  `DefaultElement`
  `DefaultTreeElement`
  `DefaultDocumentElement`
  `DefaultSourceElement`
  `JavaElement`
  `JavaModifierSupport`
  `JavaMember`
  `JavaMethod`
  `ControlMethod`

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

## 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.lang.java.element`.`JavaMember``
``PROP_THROWS``

Fields from com.bea.ide.lang.java.element`.`JavaModifierSupport``
``PROP_ABSTRACT`, `PROP_ACCESS`, `PROP_FINAL`, `PROP_NATIVE`, `PROP_STATIC`, `PROP_STRICTFP`, `PROP_SYNCHRONIZED`, `PROP_TRANSIENT`, `PROP_TYPE`, `PROP_VOLATILE``

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

ControlMethod(`Object` compilerCookie) Constructor.

## Method Summary

`public `ControlVariable`` | `getHandledControlInstance`() Get the control instance for the control for which this is an event handler.
`public `IDocumentElement`` | `getLink`() Gets the linked element.
`public `IDocument`` | `getLinkedDocument`() Get the document that this is linked to.
`public static boolean` | `isCallback`(`JavaMethod` method) Determine if this method is a callback method.
`public boolean` | `isCallback`() Determine if this method is a callback method.
`public boolean` | `isCallbackHandler`() Determine if this method is a handler for a control callback
`public boolean` | `isHidden`() Determine if this method should be hidden from designview.
`public static boolean` | `isHidden`(`JavaMethod` method) Determine if the given JavaMethod should be hidden.
`public boolean` | `isOperation`() Determine if this method is an exposed operation.
`public static boolean` | `isOperation`(`JavaMethod` method) Determine if the method is an exposed operation.
`public void` | `setLink`(`IDocumentElement` link) Set the link.
`public void` | `setLinkedDocument`(`IDocument` doc) Sets the linked document.

Methods from `com.bea.ide.lang.java.element.`JavaMethod``
``argsToString`, `getAdditionalRangeProperties`, `getDefaultPropertyDescriptors`, `getMethodBody`, `getMethodBodyRange`, `getRangePrefetchProperties`, `getThrownExceptions`, `getType`, `getTypeCode`, `setMethodBody`, `setMethodBody`, `setThrownExceptions`, `setType`, `toString`, `visit``

Methods from `com.bea.ide.lang.java.element.`JavaMember``
``getAccess`, `getDefaultPropertyDescriptors`, `getName`, `setAccess`, `setName`, `toString``

Methods from `com.bea.ide.lang.java.element.`JavaModifierSupport``
``getAbstract`, `getDefaultPropertyDescriptors`, `getFinal`, `getNative`, `getStatic`, `getStrictFloatingPoint`, `getSynchronized`, `getTransient`, `getVolatile`, `mergePropertyDescriptors`, `setAbstract`, `setFinal`, `setNative`, `setStatic`, `setStrictFloatingPoint`, `setSynchronized`, `setTransient`, `setVolatile``

Methods from `com.bea.ide.lang.java.element.`JavaElement``
``visit``

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.document.`ILinkedElement``
``getLink`, `getLinkedDocument``

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

### ControlMethod

    public ControlMethod(Object compilerCookie)

  Constructor.

## Method Detail

### getHandledControlInstance() Method

    public ControlVariable getHandledControlInstance()

Get the control instance for the control for which this is an event handler.

#### Returns

the ControlVariable representing the control for which this is a handler. This will be null if this is not a handler method.

### getLink() Method

    public IDocumentElement getLink()

Gets the linked element.

#### Returns

the callback method that this handler catches. May be null if the control file has errors or hasn't been parsed yet.

### getLinkedDocument() Method

    public IDocument getLinkedDocument()

Get the document that this is linked to.

#### Returns

the document that contains the callback handled by this method.

### isCallback(JavaMethod) Method

    public static boolean isCallback(JavaMethod method)

Determine if this method is a callback method.

#### Parameters

method
  the method to examine.

#### Returns

true if this is a callback, false otherwise.

### isCallback() Method

    public boolean isCallback()

Determine if this method is a callback method.

#### Returns

true if this is a callback, false otherwise.

### isCallbackHandler() Method

    public boolean isCallbackHandler()

Determine if this method is a handler for a control callback

#### Returns

true if this is a handler for a control's callback method.

### isHidden() Method

    public boolean isHidden()

Determine if this method should be hidden from designview. Based on the "hide" attribute of the @common:operation tag.

#### Returns

true if this is a method flagged as hidden, false otherwise.

### isHidden(JavaMethod) Method

    public static boolean isHidden(JavaMethod method)

Determine if the given JavaMethod should be hidden.

#### Returns

true if the method is tagged as hidden for designview purposed.

### isOperation() Method

    public boolean isOperation()

Determine if this method is an exposed operation.

#### Returns

true if this is an operation, false if it's a plain old method.

### isOperation(JavaMethod) Method

    public static boolean isOperation(JavaMethod method)

Determine if the method is an exposed operation.

#### Returns

true if this is an operation, false if it's a plain old method.

### setLink(IDocumentElement) Method

    public void setLink(IDocumentElement link)

Set the link. This is public only for implementation reasons. It should only be called by the document or builder, not by any consumer of this class.

### setLinkedDocument(IDocument) Method

    public void setLinkedDocument(IDocument doc)

Sets the linked document. This is public only for implementation reasons, and should only be called by the builder, not by any consumer of this class.