Codota Logo
CtLiteral.replace
Code IndexAdd Codota 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)

  • Common ways to obtain CtLiteral
private void myMethod () {
CtLiteral c =
  • Codota IconCtLiteral ctLiteral;Object value;ctLiteral.setValue(value)
  • Smart code suggestions by Codota
}
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
  • getSupportFragmentManager (FragmentActivity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSharedPreferences (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • 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
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now