SDA SE Wiki

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

User Tools

Site Tools



importT(#id, #parent, #import)

Represents the import declaration.

In case of a Single Static Import Declaration and Static-Import-on-Demand Declaration the created importT(#import, , ) fact is acompanied by an additional modifierT(#id, #import, 'static') fact.

In case of an import on demand declaration ( JLS 7.5.2 and JLS 7.5.4), the created importT(#import, , ) fact references a packageT fact and is acompanied by an additional importOnDemandT(#import) fact.

Arguments

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

#parent: compilationUnitT
ID of the compilation unit that contains this import declaration.

#import: packageT, classT, methodT, fieldT
ID of the imported element.

Sample Java Source

import java.io.IOException;

Its PEF Representation

importT(#id, #parentID, #importId).

AST Specification

ast_node_def('Java',importT,[
     ast_arg(id,      mult(1,1,no ), id,  [importT]), 
     ast_arg(parent,  mult(1,1,no ), id,  [compilationUnitT]),
     ast_arg(import,  mult(1,1,no ), id,  [packageT, classT, methodT, fieldT])
]).
research/jtransformer/api/java/pefs/4.2/importt.txt · Last modified: 2019/01/15 13:06 by Günter Kniesel

SEWiki, © 2024