public class CodeBlock
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CodeBlock.BlockType |
static class |
CodeBlock.Modifier |
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
code
Source code
|
int |
end
Indicate the end position of block in the source code
|
boolean |
hasParent
Indicate if the code block is nested or not.
|
CodeBlock.Modifier |
modifier
define modifier type (public, private, protected)
|
java.lang.String |
name
Black name for Class or function or Annotation
|
int |
offset
Start/End offset
|
java.lang.String |
returnType
Type name of the object returned by the function (optional)
|
int |
start
Indicate the star position of block in the source code
|
java.util.ArrayList<CodeBlock> |
subBlocks
Sub blocks of code contains by the current block
|
java.lang.String |
subCode
Sub source code (nested by function, class...)
|
CodeBlock.BlockType |
type
Define type of block
|
java.util.ArrayList<CodeString> |
words
Source code of the block split in words (useful for processing)
|
| Constructor and Description |
|---|
CodeBlock() |
| Modifier and Type | Method and Description |
|---|---|
int |
getEnd() |
int |
getStart() |
java.lang.String |
toCode() |
java.lang.String |
toCode(boolean formatted) |
java.lang.String |
toString() |
java.lang.String |
wordsToString() |
public int start
public int end
public int offset
public java.lang.String code
public java.lang.String subCode
public java.lang.String name
public CodeBlock.BlockType type
public CodeBlock.Modifier modifier
public java.lang.String returnType
public java.util.ArrayList<CodeBlock> subBlocks
public java.util.ArrayList<CodeString> words
public boolean hasParent
public int getStart()
public int getEnd()
public java.lang.String wordsToString()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toCode()
public java.lang.String toCode(boolean formatted)