com.togethersoft.openapi.sci
Interface SciInitializer


public interface SciInitializer
extends SciElement

Represents a class or an instance initializer (Java only).


This interface provides access to the code of a Java class or instance initializer.


Note that initializers are not treated as members of classes and can be requested only using Java-specific extensions of the SciLanguageHelper interface.

Author:
TogetherSoft
Since: Together 4.0
See Also: SciLanguageHelper, SciJavaHelper

Method Summary
 booleancanSetBody(SciCodeBlock body)
          Checks whether it is possible to set the body of this function to the specified code block value.
 SciCodeBlockgetBody()
          Returns a code block with the body of this function.
 SciClassgetContainingClass()
          Returns the class or interface containing this member.
 voidsetBody(SciCodeBlock body)
          Sets the body of this function to the specified code block value.

Methods inherited from interface com.togethersoft.openapi.sci.SciElement
accept, canSetName, canSetProperty, getDeclarationText, getName, getQualifiedName, getTagList, getUniqueName, hasProperty, isDeleted, isPropertyReadable, isPropertyWritable, setName, setProperty, visitReferences, visitReferences

Methods inherited from interface com.togethersoft.openapi.sci.SciObject
canCut, canDelete, canReplace, copy, cut, delete, getContainingFile, getContainingScope, getLanguage, getPositions, getText, getUserProperty, isReadOnly, replace, setUserProperty

Method Detail

canSetBody

public boolean canSetBody(SciCodeBlock body)
Checks whether it is possible to set the body of this function to the specified code block value.
Parameters:
body The SciCodeBlock containing a body for this function. Usually, it is
created using the SciGenericFactory.newCodeBlock
or SciFactory.newCodeBlock methods.
Returns: true if the specified code block value can be set as a body for this function

getBody

public SciCodeBlock getBody()
Returns a code block with the body of this function.
Returns: SciCodeBlock with the body of this function

getContainingClass

public SciClass getContainingClass()
Returns the class or interface containing this member.
Returns: the SciClass containing this member

setBody

public void setBody(SciCodeBlock body)
Sets the body of this function to the specified code block value.
Parameters:
body The SciCodeBlock containing a body for this function. Usually, it is
created using the SciGenericFactory.newCodeBlock
or SciFactory.newCodeBlock methods.