SDA SE Wiki

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

User Tools

Site Tools



paramT(#id, #parent, #type, 'name')

Represents the program element (method, catch clause, foreach loop) parametrized by this parameter declaration.

Renamed in JT 2.8: Up to 2.8.0 it was defined as paramDefT.

Arguments

#id: id
the unique ID assigned to this fact.

#parent: methodT, constructorT, catchT, foreachT, lambdaT
ID of the enclosing PEF

#type: Types, unionTypeT
the id of the type of the parameter. It might be of type unionTypeT in case of a multi-catch in a try-catch.

'name': atom
the name of the parameter.

Sample Java Source

class HelloWorld  { 
  public static void main(String[] args){   //String [] args is the corresponding code part to paramT
    ...
  }
}

Its PEF Representation

methodT(#method, ..., 'main', [#param], #returnType, [], ...).
paramT(#param, #method, #paramType, 'args').

AST Specification

ast_node_type_spec(paramT,[
     ast_arg(id,      mult(1,1,no ),  id,  [paramT]),
     ast_arg(parent,  mult(1,1,no ),  id,  [methodT, constructorT, catchT, foreachT, lambdaT]), 
     ast_arg(type,    mult(1,1,no ),  id,  [type_inst, unionTypeT]), 
     ast_arg(name,    mult(1,1,no ),  attr,[atomic])
]).
research/jtransformer/api/java/pefs/4.2/paramt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2024