RECODER 0.92

recoder.kit.transformation
Class AppendMember

java.lang.Object
  extended by recoder.kit.Transformation
      extended by recoder.kit.TwoPassTransformation
          extended by recoder.kit.transformation.AppendMember

Deprecated. Does not (yet) check ambiguity or conflicts.

public class AppendMember
extends TwoPassTransformation

Syntactic transformation that adds the given MemberDeclaration to the list in the given TypeDeclaration at a convenient position. No checks for redundancy or vadility are performed, such as allowed modifiers, name ambiguity. The insert position is behind the last occurance of a member of the same type in the type declaration. If there is no matching member, a predefined order of member types is followed: fields - initializers - constructors - methods - member types.


Field Summary
 
Fields inherited from class recoder.kit.Transformation
EQUIVALENCE, IDENTITY, NO_PROBLEM
 
Constructor Summary
AppendMember(CrossReferenceServiceConfiguration sc, boolean isVisible, MemberDeclaration child, TypeDeclaration parent)
          Deprecated. Creates a new transformation object that adds the given MemberDeclaration to the list in the given TypeDeclaration at a convenient position.
 
Method Summary
 ProblemReport analyze()
          Deprecated. Finds out where to insert the new member.
 boolean isVisible()
          Deprecated. Checks if this transformation is meant to be visible and shall report changes to the model.
 void transform()
          Deprecated. Attaches the member at the proper position.
 
Methods inherited from class recoder.kit.TwoPassTransformation
execute
 
Methods inherited from class recoder.kit.Transformation
attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attachAsArgument, attachAsArgument, attachAsArgument, attachAsArgument, attachAsArgument, attachAsArgument, attachAsArgument, attachAsArgument, attachAsBody, attachAsCondition, attachAsGuard, attachAsInitializer, attachAsLabel, attachAsMessage, attachAsPrefix, attachAsPrefix, attachAsPrefix, attachAsPrefix, attachAsUpdate, detach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsBody, doAttachAsCondition, doAttachAsGuard, doAttachAsInitializer, doAttachAsLabel, doAttachAsMessage, doAttachAsPrefix, doAttachAsPrefix, doAttachAsPrefix, doAttachAsPrefix, doAttachAsUpdate, doDetach, doReplace, getChangeHistory, getCrossReferenceSourceInfo, getNameInfo, getProblemReport, getProgramFactory, getServiceConfiguration, getSourceFileRepository, getSourceInfo, replace, rollback, setProblemReport, setServiceConfiguration, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AppendMember

public AppendMember(CrossReferenceServiceConfiguration sc,
                    boolean isVisible,
                    MemberDeclaration child,
                    TypeDeclaration parent)
Deprecated. 
Creates a new transformation object that adds the given MemberDeclaration to the list in the given TypeDeclaration at a convenient position.

Parameters:
sc - the service configuration to use.
isVisible - flag indicating if this transformation shall be visible.
decl - the declaration to modify. may not be null and must denote a valid identifier name.
code - the modifier to create, encoded using the codes from ModifierKit.
Method Detail

isVisible

public boolean isVisible()
Deprecated. 
Description copied from class: Transformation
Checks if this transformation is meant to be visible and shall report changes to the model. If a transformation is not visible, it may not change parts of the current model. This default implementation returns true.

Overrides:
isVisible in class Transformation
Returns:
true.

analyze

public ProblemReport analyze()
Deprecated. 
Finds out where to insert the new member.

Overrides:
analyze in class TwoPassTransformation
Returns:
the problem report.

transform

public void transform()
Deprecated. 
Attaches the member at the proper position.

Overrides:
transform in class TwoPassTransformation
Throws:
java.lang.IllegalStateException - if the analyzation has not been called.
See Also:
analyze()

RECODER 0.92