Result
Collection analysis result
Operations
- GetCode
- GetDescription
- GetEndLine
- GetEndPosition
- GetKind
- GetName
- GetResults
- GetStartLine
- GetStartPosition
- ToString
GetDescription #
Get result description
method : public : GetDescription() ~ StringReturn
| Type | Description |
|---|---|
| String | result description |
GetEndPosition #
Get end position
method : public : GetEndPosition() ~ IntReturn
| Type | Description |
|---|---|
| Int | end position |
GetKind #
Get result kind
method : public : GetKind() ~ Result->KindReturn
| Type | Description |
|---|---|
| Result->Kind | result kind |
GetName #
Get result name
method : public : GetName() ~ StringReturn
| Type | Description |
|---|---|
| String | result name |
Example
analysis := System.Diagnostics.Analyzer->ParseFile("app.obs");
syms := analysis->GetSymbols("file:///app.obs", "/usr/lib/objeck");
if(syms <> Nil) {
syms->GetName()->PrintLine(); # e.g. bundle or class name
};
analysis->Release();GetResults #
Get child results
method : public : GetResults() ~ Result[]Return
| Type | Description |
|---|---|
| Result | child results |
GetStartLine #
Get start line
method : public : GetStartLine() ~ IntReturn
| Type | Description |
|---|---|
| Int | start line |
Example
analysis := System.Diagnostics.Analyzer->ParseFile("app.obs");
defn := analysis->FindDefinition("file:///app.obs", 10, 4, "/usr/lib/objeck");
if(defn <> Nil) {
line := defn->GetStartLine(); # 0-based line of the symbol
"line={$line}"->PrintLine();
};
analysis->Release();