SDA SE Wiki

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

User Tools

Site Tools



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: Java Language Specification).

public interface I {
	void m();
}

instead of

public interface I {
	public abstract void m();
}
History
  • Added in JTransformer 4.1

Arguments

id: modifierT
ID of the corresponding modifier

Sample Java Source

public interface I {
	public abstract void m1();
	void m2();
}

Its PEF Representation

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).

AST Specification

ast_relation_type_spec(omit_modiferT,[
   ast_arg(id,       mult(1,1,no ), id,   [modiferT])
]).
research/jtransformer/api/java/pefs/4.2/omit_modifiert.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019