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

Next revision
Previous revision
research:jtransformer:api:java:pefs:4.2:methodreferencet [2015/06/29 13:34]
127.0.0.1 external edit
research:jtransformer:api:java:pefs:4.2:methodreferencet [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
  
 +----
 +
 +=== methodReferenceT(#​id,​ #parent, #encl, #expr, #type, [#​type_param_1,​...],​ #ref)  ===
 +
 +Represents a method reference. See the [[http://​docs.oracle.com/​javase/​specs/​jls/​se8/​html/​jls-15.html#​jls-15.13|Java Language Specification]].
 +
 +=== Arguments ===
 +
 +==  ==
 +**#id:** id\\  ​
 +the unique ID assigned to this fact.
 +
 +**#​parent:​** id\\ 
 +the ID of the fact that represents the parent of this fact in the prolog AST.
 +
 +**#encl:** [[method_declaration_type|method declaration type]], [[fieldt|fieldT]]\\ ​
 +the ID of the fact that represents the enclosing element.
 +
 +**#​expr:​** ​ [[plastexpression|expression]],​ [[statictypereft|staticTypeRefT]],​ null\\ ​
 +the ID of the fact representing the receiver [[plastexpression|expression]] or type. If the receiver is an array type, a parameterized type or a type parameter, this argument'​s value is ''​null''​ and the argument "​type"​ is used instead.
 +
 +**#​type:​** ​ [[type_inst|type reference]],​ null\\ ​
 +the ID of the fact representing the receiver, if the receiver is an array type, a parameterized type or a type parameter. In all the other cases this argument'​s value is ''​null''​ and the argument "​expr"​ is used instead.
 +
 +**[#​type_param_1,​...]:​** [[type_inst|Type reference]],​ [[wildcardt|wildcardT]]\\ ​
 +list of IDs of the type parameters of this method reference.
 +
 +**#ref:** [[methodt|methodT]] \\
 +ID of the [[methodt|methodT]] fact that represents the declaration of the referenced method.
 +
 +=== Sample Java Source ===
 +
 +==  ==
 +<Code lang-java>​
 +Arrays.sort(someArray,​ String::​compareToIgnoreCase);​
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +
 +==  ==
 +<​Code>​
 +callT(#​CallToSort,​ ..., [#​someArrayParam,​ #​MethodReference],​ ...).
 +methodReferenceT(#​MethodReference,​ #​CallToSort,​ #Enclosing, #​StaticTypeRef,​ null, [], #​ReferenceToCompareMethod).
 +staticTypeRefT(#​StaticTypeRef,​ #​MethodReference,​ #Enclosing, #​RefToString).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_type_spec(methodReferenceT,​[
 +     ​ast_arg(id, ​        ​mult(1,​1,​no ), id,  [methodReferenceT]),​
 +     ​ast_arg(parent, ​    ​mult(1,​1,​no ), id,  [id]),
 +     ​ast_arg(encl, ​      ​mult(1,​1,​no ), id,  [method_declaration_type,​ fieldT]),
 +     ​ast_arg(expr, ​      ​mult(1,​1,​no ), id,  [expressionType,​ staticTypeRefT,​ null_type]),​
 +     ​ast_arg(type, ​      ​mult(1,​1,​no ), id,  [type_inst, null_type]),​
 +     ​ast_arg(typeParams,​ mult(0,​*,​ord),​ id,  [type_inst, wildcardT]),​
 +     ​ast_arg(ref, ​       mult(1,1,no ), id,  [methodT])
 +]).
 +</​Code>​

SEWiki, © 2019