congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CtLiteral.replace
Code IndexAdd Tabnine to your IDE (free)

How to use
replace
method
in
spoon.reflect.code.CtLiteral

Best Java code snippets using spoon.reflect.code.CtLiteral.replace (Showing top 4 results out of 315)

origin: SpoonLabs/astor

@Override
public void revert() {
  newLiteral.replace(previousVariable);
}
origin: STAMP-project/dspot

private CtMethod<?> createCharacterMutant(CtMethod method, int original_lit_index, Character newValue) {
  CtMethod cloned_method = CloneHelper.cloneTestMethodForAmp(method, "_literalMutationChar");
  Counter.updateInputOf(cloned_method, 1);
  CtLiteral toReplace = Query.getElements(cloned_method.getBody(), new LiteralToBeMutedFilter())
      .get(original_lit_index);
  toReplace.replace(cloned_method.getFactory().Code().createLiteral(newValue));
  DSpotUtils.addComment(toReplace, "TestDataMutator on strings", CtComment.CommentType.INLINE);
  return cloned_method;
}
origin: STAMP-project/dspot

private CtMethod<?> createStringMutant(CtMethod<?> method, int original_lit_index, String newValue) {
  CtMethod<?> cloned_method = CloneHelper.cloneTestMethodForAmp(method, "_literalMutationString");
  Counter.updateInputOf(cloned_method, 1);
  CtLiteral toReplace = Query.getElements(cloned_method.getBody(), new LiteralToBeMutedFilter())
      .get(original_lit_index);
  toReplace.replace(cloned_method.getFactory().Code().createLiteral(newValue));
  DSpotUtils.addComment(toReplace, "TestDataMutator on strings", CtComment.CommentType.INLINE);
  return cloned_method;
}
origin: eu.stamp-project/assert-fixer

      .getCatchers().contains(catches.get(0))
  ) {
((CtLiteral<String>) failInvocation.get(0).getArguments().get(0)).replace(
    spoon.getFactory().createLiteral(PREFIX_MESSAGE_EXPECTED_EXCEPTION + exceptionName)
);
spoon.reflect.codeCtLiteralreplace

Popular methods of CtLiteral

  • getValue
    Gets the actual value of the literal (statically known).
  • setValue
    Sets the actual value of the literal.
  • getType
  • getTypeCasts
  • getAnnotations
  • getFactory
  • getParent
  • setFactory
  • setType
  • setTypeCasts
  • addTypeCast
  • clone
  • addTypeCast,
  • clone,
  • getComments,
  • getPosition,
  • setAnnotations,
  • setComments

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now