object Patch
- Alphabetic
- By Inheritance
- Patch
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addGlobalImport(symbol: Symbol)(implicit c: SemanticContext): Patch
Place named import for this symbol at the bottom of the global import list
- def addGlobalImport(importer: Importer): Patch
Add this importer to the global import list.
- def addLeft(tree: Tree, toAdd: String): Patch
Add this string to the left of this tree.
- def addLeft(tok: scala.meta.Token, toAdd: String): Patch
Add this string to the left of this token.
- def addRight(tree: Tree, toAdd: String): Patch
Add this string to the right of this tree.
- def addRight(tok: scala.meta.Token, toAdd: String): Patch
Add this string to the right of this token.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val empty: Patch
Do nothing: no diff, no diagnostics.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def fromIterable(seq: Iterable[Patch]): Patch
Combine a sequence of patches into a single patch.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lint(msg: lint.Diagnostic): Patch
Reports error/warning/info message at a position.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def removeGlobalImport(symbol: Symbol)(implicit c: SemanticContext): Patch
Remove named imports for this symbol.
Remove named imports for this symbol.
Does not remove wildcard imports for the enclosing package or class.
- def removeImportee(importee: Importee): Patch
Remove this importee reference.
- def removeToken(token: scala.meta.Token): Patch
Remove this single token from the source file.
- def removeTokens(tokens: Iterable[scala.meta.Token]): Patch
Remove all of the these tokens from the source file.
- def renameSymbol(fromSymbol: Symbol, toName: String)(implicit c: SemanticContext): Patch
Replace occurrences of fromSymbol to use toName instead
- def replaceSymbols(toReplace: (String, String)*)(implicit c: SemanticContext): Patch
Replace occurrences of fromSymbol to reference toSymbol instead.
Replace occurrences of fromSymbol to reference toSymbol instead.
toSymbol
must be a global symbol such as an object/class or a static method.May produce broken code in some cases, works best when toSymbol has the same depth as fromSymbol, example: - good: replace:com.foo.Bar/org.qux.Buz - bad: replace:com.Bar/org.qux.Buz
- def replaceToken(token: scala.meta.Token, toReplace: String): Patch
Remove the token and insert this string at the same position.
- def replaceTree(from: Tree, to: String): Patch
Remove all tokens from this tree and add a string add the same position.
Remove all tokens from this tree and add a string add the same position.
Beware that this patch does not compose with other patches touching the same tree node or its children. Avoid using this method for large tree nodes like classes of methods. It's recommended to target as precise tree nodes as possible.
It is better to use addRight/addLeft if you only insert new code, example: - bad: Patch.replaceTree(tree, "(" + tree.syntax + ")") - good: Patch.addLeft(tree, "(") + Patch.addRight(tree, + ")")
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()