congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • getResourceAsStream (ClassLoader)
  • getSupportFragmentManager (FragmentActivity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • String (java.lang)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Socket (java.net)
    Provides a client-side TCP socket.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • JList (javax.swing)
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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