SDA SE Wiki

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

User Tools

Site Tools


Webpage

High Level API (preliminary)

Provides easier use of the interface elements via high level abstractions of classes, interfaces, methods, constructors, fields, method calls, and field accesses. All Arguments starting with an '#' are Ids.

class(#Id, #packageid, Name)

  • condition: will bind all classes and interfaces with name Name and package #packageid.
  • add: An empty class will be created. If the modifier public for the class (Id) exists and there is no toplevel containing this class, a new toplevel (file) will be created. The location of the file will be in the first sourcelocation defined in the project currently holding the JLMP nature: '/Project/sourcelocation/packagefolders/Classname.java'.
  • delete: If the class is a public class (modifierT(CID, public) still exists) the toplevel and all its imports will be deleted, too. In both cases all modifiers of the class will be removed.
  • replace: replaces a class fact with another class fact.

method(#Id, #Class, Name, [#Param1,..], TYPE, [#Excep1,..], #Body)

  • condition: binds all methods (no constructors or initializers) with the specified signature.
  • add: adds a methodDefT fact to the factbase and appends the Id of the method to members list of Class.
  • delete: removes the method from the factbase and deletes the Id from the member list of Class.
  • delete: replaces a declaration with the specified method.
  • replace: replaces a member declaration fact (method, field, constructor) with a method fact.

constructor(#Id, #Class, [#Param1,..], [#Excep1,..], #Body)

Equivalent operations for constructors, see the method(..) abstraction above.

field(Id, #Class, TYPE, Name, #Init)

Equivalent operations for fields, see the method(..) abstraction above.

param(#Id, #Method, TYPE, Name)

  • condition: binds all method (or constructor) parameters with the specified signature.
  • add: adds a paramDefT fact to the factbase and appends Id the Parmeter List of #Method.
  • delete: removes the corresponding paramDefT fact from the factbase and removes Id from the Parmeter List of #Method.
  • replace: replaces a param fact with this param fact.

getField(#Id, #Parent, #Encl, #Receiver, Name, #Field)

Represents the field access expression. #Receiver is the ID of the expression on which the field is accessed or 'null' for the implicit field access. This abstraction is transparent to the AOP API (before/after/around).

setField(#Id, #Parent, #Encl, #Receiver, #Field, #Value)

Represents the field assignment expression. #Expr is the ID of the expression on which the field is accessed or 'null' for the implicit field access. This abstraction is transparent to the AOP API (before/after/around).

methodCall(#Call, #Parent, #Encl, #Receiver, methodname, #Method, [#Arg1,...]).

Represents a method call expression. #Receiver is the ID of the expression on which the field is accessed or 'null' for the implicit field access. This abstraction is transparent to the AOP API (before/after/around).

research/jtransformer/highlevelapi.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019