SDA SE Wiki

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

User Tools

Site Tools


Module java_modifications

Classes

remove_from_class(+Class, +Member) is det

Removes a member from the class, if Member is
an element of the class.
add_to_class(+Class, +MemberOrMemberList) is semidet

Adds Member(s) to the class, if the Member is not already in the
member list.
deleteToplevelOfClass(+ClassId) is det

Deletes a file and all imports if the
given class (ClassId) is a public, file class.

Methods

add_body(+Method, +Body) is semidet

Replaces the current body of Method with Body.
removeFromMethodArgs(+Method, +Pef) is det

Removes Pef from the parameters of Method.
addToMethodArgs(+Method, +Pef) is det

Adds Pef to the parameters of Method.

Other PEFs

createThisIdent(-Ident, +Parent, +Encl, +Class) is det

Create new this identT fact with Parent as its parent
Encl as its enclosing element and Class as its
instance type.
removeFromBlock(+Block, +Pef) is det

Removes Pef from Block.
addToBlock(+Block, +PefOrPefList) is det

Appends a pef or a pef list to a block.

Deleting

deepDelete(+PefOrPefList) is det

Deeply deletes Pef or list of pefs and all their derived predicates.
deepRetract(+PefOrPefList) is det

Deeply retracts Pef or a list of pefs.

Utils

rec_set_encl_method(+Id, +Encl) is semidet

Set the enclosing element of the tree Id
and all its sub trees to Encl.
rec_set_parent(+Id, +Parent) is semidet

Sets the parent of the tree Id or the list of
trees IdList to Parent.
replaceId(+PefId, +OldId, +NewId) is semidet

Replaces OldId with NewId in the fact
represented by PefId.
replaceIdInTerm(+Term, -TranslatedTerm, +OldId, +NewId) is semidet

Replaces OldId with NewId in Term an binds the resulting
Term to TranslatedTerm.
replaceIdInList(+List, -TranslatedList, +OldMember, +MewMember) is semidet

Replaces the member OldMember with NewMember in the
list List an binds the resulting List to TranslatedList.

remove_from_class/2

remove_from_class(+Class, +Member) is det

Removes a member from the class, if Member is
an element of the class.
Fails if Class or Member is not bound and if Class is not a
of type classT.
Parameters:
Class- classT
Member- methodT | fieldT | classT

add_to_class/2

add_to_class(+Class, +MemberOrMemberList) is semidet

Adds Member(s) to the class, if the Member is not already in the
member list.
Fails if Class or Member is not bound and if Class is not a
of type classT.

deleteToplevelOfClass/1

deleteToplevelOfClass(+ClassId) is det

Deletes a file and all imports if the
given class (ClassId) is a public, file class.
The deletion operation is logged and
will be undone in the next rollback/0 operation.

This operation is triggered by the delete(class(_,_,_,_)) action.



add_body/2

add_body(+Method, +Body) is semidet

Replaces the current body of Method with Body.

removeFromMethodArgs/2

removeFromMethodArgs(+Method, +Pef) is det

Removes Pef from the parameters of Method.

addToMethodArgs/2

addToMethodArgs(+Method, +Pef) is det

Adds Pef to the parameters of Method.


createThisIdent/4

createThisIdent(-Ident, +Parent, +Encl, +Class) is det

Create new this identT fact with Parent as its parent
Encl as its enclosing element and Class as its
instance type.

removeFromBlock/2

removeFromBlock(+Block, +Pef) is det

Removes Pef from Block.
This operation is logged and will be undone.

addToBlock/2

addToBlock(+Block, +PefOrPefList) is det

Appends a pef or a pef list to a block.


deepDelete/1

deepDelete(+PefOrPefList) is det

Deeply deletes Pef or list of pefs and all their derived predicates.
To remove the element retract_and_track_rollback_info/1 is used.
Therefore the deletions are logged and
will be undone in the next rollback.

deepRetract/1

deepRetract(+PefOrPefList) is det

Deeply retracts Pef or a list of pefs.
In contrast to deepDelete/1 the pefs
are simply retracted from the factbase
without logging the operation for future
rollback operations.


rec_set_encl_method/2

rec_set_encl_method(+Id, +Encl) is semidet

Set the enclosing element of the tree Id
and all its sub trees to Encl.
The old facts will be retracted and
new facts with Encl asserted.

INFO: This predicate uses the add/1 and delete/1
predicates which track all changes to
the factbase in the rollback facility.
Use rollback/0 to undo this operation.


rec_set_parent/2

rec_set_parent(+Id, +Parent) is semidet

Sets the parent of the tree Id or the list of
trees IdList to Parent.
Then it recursive sets the parents of
the subtrees to their parent.

INFO: This predicate uses the add/1 and delete/1
predicates which track all changes to
the factbase in the rollback functionality.


replaceId/3

replaceId(+PefId, +OldId, +NewId) is semidet

Replaces OldId with NewId in the fact
represented by PefId.

replaceIdInTerm/4

replaceIdInTerm(+Term, -TranslatedTerm, +OldId, +NewId) is semidet

Replaces OldId with NewId in Term an binds the resulting
Term to TranslatedTerm.

replaceIdInList/4

replaceIdInList(+List, -TranslatedList, +OldMember, +MewMember) is semidet

Replaces the member OldMember with NewMember in the
list List an binds the resulting List to TranslatedList.
Term to TranslatedTerm.

research/jtransformer/api/java/transformations/transformationapi_alternative.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019