SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

research:jtransformer:api:meta:sourcelocations:sl_typet [2019/01/29 21:56] (current)
Günter Kniesel created
Line 1: Line 1:
  
 +=== sl_typeT (#id, #type, '​start',​ '​length'​ )  ===
 +
 +
 +Represents the source location of the type reference within a declaration element, e.g. a field, method, etc.  ​
 +
 +=== Arguments ===
 +==  ==
 +**#id:** id\\ 
 +The id of the declaration element (e.g. of the field) that contains the type reference.
 +
 +**#type:** id \\ 
 +The id of the referenced type.
 +
 +**'​start':​** integer \\ 
 +Character position within the file. Position of the first character of the type reference.
 +
 +**'​length':​** integer \\
 +Length of (=number of characters in) the type reference.
 +
 +
 +
 +=== Sample Java Source ===
 +
 + ​== ​ ==
 +<Code lang-java>​
 +private List list;
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +==  ==
 +<Code lang-prolog>​
 +fieldT(#id, ...).
 +slT(#id, 0, 18).                      % <-- Source location of entire field declaration (Start=0, Length=18).
 +sl_typeT(#​id,​ #​idOfClassList,​ 9, 4).  % <-- Source location of reference to type "​List"​ (Start=0, Length=18).
 +</​Code>​
 +/*
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_type_spec(compilationUnitT,​[
 +     ​ast_arg(id, ​    ​mult(1,​1,​no ), id,    [compilationUnitT]),​
 +     ​ast_arg(parent,​ mult(0,​1,​no), ​ id,    [packageT]),​
 +     ​ast_arg(file, ​  ​mult(1,​1,​no ), id,    [fileS]),
 +     ​ast_arg(imports,​mult(0,​*,​ord),​ id,    [importT]),
 +     ​ast_arg(defs, ​  ​mult(0,​*,​ord),​ id,    [classT])
 +]).
 +</​Code>​
 +*/
research/jtransformer/api/meta/sourcelocations/sl_typet.txt · Last modified: 2019/01/29 21:56 by Günter Kniesel

SEWiki, © 2019