PluginOps
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- PluginOps.type
Members list
Value members
Concrete methods
Creates the full body of the new toString
method. For example, given the following case class
Creates the full body of the new toString
method. For example, given the following case class
case class User(id: UUID, nickname: String, @redacted email: String)
this method will create the AST equivalent of the following string concatenation
"User(" + this.id + "," + this.nickname + "," + "***" + ")"
Attributes
- tree
the
tpd.Tree
from which we want to derive a customizedtoString
body implementation.- x$2
implicit Context parameter.
- Returns:
the
tpd.Tree
of the customizedtoString
body implementation, wrapped in aTry
.
Does this tree contain a reference to a tpd.Template
? If so, return it wrapped into an Option
.
Does this tree contain a reference to a tpd.Template
? If so, return it wrapped into an Option
.
Attributes
- tree
the tree from which return its
tpd.Template
- x$2
implicit Context parameter.
- Returns:
the template wrapped in an
Option
, if it does exist, orNone
if not.
Given the original tpd.Template
that represents a case class, and a tpd.Tree
that contains the new body
implementation of the toString
method, this utility function will search for the existing toString
method
defined in the template, and replace the default one (provided by the Scala compiler) with the one passed as
second parameter.
Given the original tpd.Template
that represents a case class, and a tpd.Tree
that contains the new body
implementation of the toString
method, this utility function will search for the existing toString
method
defined in the template, and replace the default one (provided by the Scala compiler) with the one passed as
second parameter.
Attributes
- newToStringBody
the new implementation of the
toString
body.- template
the
tpd.Template
for which we want to replace the currenttoString
body implementation.- x$3
implicit Context parameter.
- Returns:
the
tpd.Template
with the updatedtoString
method, wrapped in aTry
.
Given the original tpd.TypeDef
, try to replace its tpd.Template
with the one provided as second argument.
Given the original tpd.TypeDef
, try to replace its tpd.Template
with the one provided as second argument.
Attributes
- newTemplate
the
tpd.Template
that contains the updatedtoString
method.- tree
the original
tpd.TypeDef
that we would like to update..- x$3
implicit Context parameter.
- Returns:
the
tpd.TypeDef
with the updatedtoString
method, wrapped in aTry
.
Checks whether the tpd.TypeDef
being inspected:
Checks whether the tpd.TypeDef
being inspected:
- is a case class
- has fields annotated with
@redacted
and returns an option containing the validated tpd.TypeDef
.
Attributes
- tree
the tree to be validated.
- x$2
implicit Context parameter.
- Returns:
the tree wrapped in an optional, if valid, or
None
if not.