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:java:pefs:4.2:omit_modifiert [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
  
 +----
 +=== omit_modifierT(#​id) ===
 +This fact is used for preserving the original appearance of the source code after transformations. It declares, that a modifier is implicit and not explicitly represented in the code. An example for this behaviour are the ''​public''​ and ''​abstract''​ modifiers for methods in interfaces (see: [[.:​https:::​docs.oracle.com:​javase:​specs:​jls:​se8:​html:​jls-9.html#​jls-9.4|Java Language Specification]]).
 +
 +<Code lang-java>​public interface I {
 + void m();
 +}</​Code>​
 +
 +instead of 
 +
 +<Code lang-java>​public interface I {
 + public abstract void m();
 +}</​Code>​
 +
 +== History ==
 +  * Added in JTransformer 4.1
 +
 +=== Arguments ===
 +== ==
 +**id:** [[modifiert|modifierT]]\\
 +ID of the corresponding modifier
 +
 +===Sample Java Source===
 +== ==
 +<Code lang-java>​
 +public interface I {
 + public abstract void m1();
 + void m2();
 +}
 +</​Code>​
 +
 +===Its PEF Representation ===
 +== ==
 +<​Code>​
 +classT(#​Interface,​ ..., '​I',​ ...),
 +methodT(#​Method1,​ #Interface, m1, [], ...),
 +modiferT(#​Mod1_1,​ #Method1, '​public'​),​
 +modiferT(#​Mod1_2,​ #Method1, '​abstract'​),​
 +methodT(#​Method2,​ #Interface, m2, [], ...),
 +modiferT(#​Mod2_1,​ #Method2, '​public'​),​
 +omit_modifierT(#​Mod2_1),​
 +omit_modifierT(#​Mod2_2).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_relation_type_spec(omit_modiferT,​[
 +   ​ast_arg(id, ​      ​mult(1,​1,​no ), id,   ​[modiferT])
 +]).
 +</​Code>​
research/jtransformer/api/java/pefs/4.2/omit_modifiert.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019