abstract class Context extends blackbox.Context with whitebox.Context with Aliases with Enclosures with Names with Reifiers with FrontEnds with Infrastructure with Typers with Parsers with Evals with ExprUtils with Traces with Internals
- Alphabetic
- By Inheritance
- Context
- Internals
- TypingTransformers
- Traces
- Traces
- ExprUtils
- Evals
- Parsers
- Typers
- Infrastructure
- FrontEnds
- Reifiers
- Names
- Enclosures
- Aliases
- Context
- Context
- Internals
- ExprUtils
- Evals
- Parsers
- Typers
- Infrastructure
- FrontEnds
- Reifiers
- Names
- Enclosures
- Aliases
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Context()
Type Members
-
implicit
class
RichOpenImplicit
extends AnyRef
- Definition Classes
- Aliases
-
trait
ContextInternalApi extends MacroInternalApi
- Definition Classes
- Internals
-
type
Expr[+T] = tools.nsc.Global.Expr[T]
- Definition Classes
- Aliases
-
case class
ImplicitCandidate extends Product with Serializable
- Definition Classes
- Context
-
type
Modifiers = tools.nsc.Global.Modifiers
- Definition Classes
- Aliases
-
type
Name = tools.nsc.Global.Name
- Definition Classes
- Aliases
-
type
Position = internal.util.Position
- Definition Classes
- Aliases
-
abstract
type
PrefixType
- Definition Classes
- Context
-
type
Scope = tools.nsc.Global.Scope
- Definition Classes
- Aliases
-
type
Symbol = tools.nsc.Global.Symbol
- Definition Classes
- Aliases
-
type
TermName = tools.nsc.Global.TermName
- Definition Classes
- Aliases
-
type
Tree = tools.nsc.Global.Tree
- Definition Classes
- Aliases
-
type
Type = tools.nsc.Global.Type
- Definition Classes
- Aliases
-
type
TypeName = tools.nsc.Global.TypeName
- Definition Classes
- Aliases
-
type
TypeTag[T] = tools.nsc.Global.TypeTag[T]
- Definition Classes
- Aliases
-
type
TypecheckException = macros.TypecheckException
- Definition Classes
- Typers
-
type
TypecheckMode = Mode
- Definition Classes
- Typers
-
type
WeakTypeTag[T] = tools.nsc.Global.WeakTypeTag[T]
- Definition Classes
- Aliases
-
abstract
class
TypingTransformer
extends Global.Transformer
- Definition Classes
- TypingTransformers
-
type
CompilationUnit = tools.nsc.Global.CompilationUnit
- Definition Classes
- Aliases
- Annotations
- @deprecated
- Deprecated
(Since version 2.11.0) c.enclosingTree-style APIs are now deprecated; consult the scaladoc for more information
-
case class
EnclosureException extends Exception with Product with Serializable
- Definition Classes
- Enclosures
- Annotations
- @deprecated
- Deprecated
(Since version 2.11.0) c.enclosingTree-style APIs are now deprecated; consult the scaladoc for more information
-
type
Run = tools.nsc.Global.Run
- Definition Classes
- Aliases
- Annotations
- @deprecated
- Deprecated
(Since version 2.11.0) c.enclosingTree-style APIs are now deprecated; consult the scaladoc for more information
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
Test two objects for inequality.
Test two objects for inequality.
- returns
true
if !(this == that), false otherwise.
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
Equivalent to
x.hashCode
except for boxed numeric types andnull
.Equivalent to
x.hashCode
except for boxed numeric types andnull
. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. Fornull
returns a hashcode wherenull.hashCode
throws aNullPointerException
.- returns
a hash value consistent with ==
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Context, B)
-
final
def
==(arg0: Any): Boolean
The expression
x == that
is equivalent toif (x eq null) that eq null else x.equals(that)
.The expression
x == that
is equivalent toif (x eq null) that eq null else x.equals(that)
.- returns
true
if the receiver object is equivalent to the argument;false
otherwise.
- Definition Classes
- AnyRef → Any
-
def
Expr[T](tree: Tree)(implicit arg0: WeakTypeTag[T]): Expr[T]
- Definition Classes
- Aliases
-
val
Expr: tools.nsc.Global.Expr.type
- Definition Classes
- Aliases
-
val
PATTERNmode: Mode
- Definition Classes
- Typers
-
val
TERMmode: Mode
- Definition Classes
- Typers
-
val
TYPEmode: Mode
- Definition Classes
- Typers
-
def
TypeTag[T](tpe: Type): TypeTag[T]
- Definition Classes
- Aliases
-
val
TypeTag: tools.nsc.Global.TypeTag.type
- Definition Classes
- Aliases
-
val
TypecheckException: macros.TypecheckException.type
- Definition Classes
- Typers
-
val
TypecheckMode: Mode.type
- Definition Classes
- Typers
-
def
WeakTypeTag[T](tpe: Type): WeakTypeTag[T]
- Definition Classes
- Aliases
-
val
WeakTypeTag: tools.nsc.Global.WeakTypeTag.type
- Definition Classes
- Aliases
-
def
abort(pos: Position, msg: String): Nothing
- Definition Classes
- FrontEnds
-
final
def
asInstanceOf[T0]: T0
Cast the receiver object to be of type
T0
.Cast the receiver object to be of type
T0
.Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression
1.asInstanceOf[String]
will throw aClassCastException
at runtime, while the expressionList(1).asInstanceOf[List[String]]
will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.- returns
the receiver object.
- Definition Classes
- Any
- Exceptions thrown
ClassCastException
if the receiver object is not an instance of the erasure of typeT0
.
-
def
classPath: List[URL]
- Definition Classes
- Infrastructure
-
def
clone(): AnyRef
Create a copy of the receiver object.
Create a copy of the receiver object.
The default implementation of the
clone
method is platform dependent.- returns
a copy of the receiver object.
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- Note
not specified by SLS as a member of AnyRef
-
def
compilerSettings: List[String]
- Definition Classes
- Infrastructure
-
def
echo(pos: Position, msg: String): Unit
- Definition Classes
- FrontEnds
-
val
enclosingClass: Tree
- Definition Classes
- Enclosures
-
def
enclosingDef: tools.nsc.Global.DefDef
- Definition Classes
- Enclosures
-
def
enclosingImpl: tools.nsc.Global.ImplDef
- Definition Classes
- Enclosures
-
val
enclosingImplicits: List[ImplicitCandidate]
- Definition Classes
- Enclosures
-
val
enclosingMacros: List[Context]
- Definition Classes
- Enclosures
-
val
enclosingMethod: Tree
- Definition Classes
- Enclosures
-
def
enclosingPackage: tools.nsc.Global.PackageDef
- Definition Classes
- Enclosures
-
val
enclosingPosition: Position
- Definition Classes
- Enclosures
-
val
enclosingRun: Run
- Definition Classes
- Enclosures
-
def
enclosingTemplate: tools.nsc.Global.Template
- Definition Classes
- Enclosures
-
val
enclosingUnit: CompilationUnit
- Definition Classes
- Enclosures
- def ensuring(cond: (Context) ⇒ Boolean, msg: ⇒ Any): Context
- def ensuring(cond: (Context) ⇒ Boolean): Context
- def ensuring(cond: Boolean, msg: ⇒ Any): Context
- def ensuring(cond: Boolean): Context
-
final
def
eq(arg0: AnyRef): Boolean
Tests whether the argument (
that
) is a reference to the receiver object (this
).Tests whether the argument (
that
) is a reference to the receiver object (this
).The
eq
method implements an equivalence relation on non-null instances ofAnyRef
, and has three additional properties:- It is consistent: for any non-null instances
x
andy
of typeAnyRef
, multiple invocations ofx.eq(y)
consistently returnstrue
or consistently returnsfalse
. - For any non-null instance
x
of typeAnyRef
,x.eq(null)
andnull.eq(x)
returnsfalse
. null.eq(null)
returnstrue
.
When overriding the
equals
orhashCode
methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2
), they should be equal to each other (o1 == o2
) and they should hash to the same value (o1.hashCode == o2.hashCode
).- returns
true
if the argument is a reference to the receiver object;false
otherwise.
- Definition Classes
- AnyRef
- It is consistent: for any non-null instances
-
def
equals(arg0: Any): Boolean
The equality method for reference types.
-
def
error(pos: Position, msg: String): Unit
- Definition Classes
- FrontEnds
-
def
eval[T](expr: Expr[T]): T
- Definition Classes
- Evals
-
def
finalize(): Unit
Called by the garbage collector on the receiver object when there are no more references to the object.
Called by the garbage collector on the receiver object when there are no more references to the object.
The details of when and if the
finalize
method is invoked, as well as the interaction betweenfinalize
and non-local returns and exceptions, are all platform dependent.- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- Note
not specified by SLS as a member of AnyRef
- def formatted(fmtstr: String): String
-
def
fresh[NameType <: Name](name: NameType): NameType
- Definition Classes
- Names
-
def
fresh(name: String): String
- Definition Classes
- Names
-
def
fresh(): String
- Definition Classes
- Names
-
def
freshName[NameType <: Name](name: NameType): NameType
- Definition Classes
- Names
-
def
freshName(name: String): String
- Definition Classes
- Names
-
def
freshName(): String
- Definition Classes
- Names
-
def
freshNameCreator: FreshNameCreator
- Definition Classes
- Names
-
final
def
getClass(): Class[_]
Returns the runtime class representation of the object.
Returns the runtime class representation of the object.
- returns
a class object corresponding to the runtime type of the receiver.
- Definition Classes
- AnyRef → Any
-
val
global: universe.type
- Definition Classes
- Reifiers
- def globalSettings: Settings
-
def
hasErrors: Boolean
- Definition Classes
- FrontEnds
-
def
hasWarnings: Boolean
- Definition Classes
- FrontEnds
-
def
hashCode(): Int
The hashCode method for reference types.
-
def
inferImplicitValue(pt: Type, silent: Boolean = true, withMacrosDisabled: Boolean = false, pos: Position = enclosingPosition): Tree
- Definition Classes
- Typers
-
def
inferImplicitView(tree: Tree, from: Type, to: Type, silent: Boolean = true, withMacrosDisabled: Boolean = false, pos: Position = enclosingPosition): Tree
- Definition Classes
- Typers
-
def
info(pos: Position, msg: String, force: Boolean): Unit
- Definition Classes
- FrontEnds
-
lazy val
internal: ContextInternalApi
- Definition Classes
- Internals
-
final
def
isInstanceOf[T0]: Boolean
Test whether the dynamic type of the receiver object is
T0
.Test whether the dynamic type of the receiver object is
T0
.Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression
1.isInstanceOf[String]
will returnfalse
, while the expressionList(1).isInstanceOf[List[String]]
will returntrue
. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.- returns
true
if the receiver object is an instance of erasure of typeT0
;false
otherwise.
- Definition Classes
- Any
-
def
literal(x: Char): Expr[Char]
- Definition Classes
- ExprUtils
-
def
literal(x: String): Expr[String]
- Definition Classes
- ExprUtils
-
def
literal(x: Double): Expr[Double]
- Definition Classes
- ExprUtils
-
def
literal(x: Float): Expr[Float]
- Definition Classes
- ExprUtils
-
def
literal(x: Long): Expr[Long]
- Definition Classes
- ExprUtils
-
def
literal(x: Int): Expr[Int]
- Definition Classes
- ExprUtils
-
def
literal(x: Short): Expr[Short]
- Definition Classes
- ExprUtils
-
def
literal(x: Byte): Expr[Byte]
- Definition Classes
- ExprUtils
-
def
literal(x: Boolean): Expr[Boolean]
- Definition Classes
- ExprUtils
-
def
literalFalse: Expr[Boolean]
- Definition Classes
- ExprUtils
-
def
literalNull: Expr[Null]
- Definition Classes
- ExprUtils
-
def
literalTrue: Expr[Boolean]
- Definition Classes
- ExprUtils
-
def
literalUnit: Expr[Unit]
- Definition Classes
- ExprUtils
-
val
macroApplication: Tree
- Definition Classes
- Enclosures
-
val
macroDebugLite: Boolean
- Definition Classes
- Traces
-
val
macroDebugVerbose: Boolean
- Definition Classes
- Traces
-
final
def
macroLogLite(msg: ⇒ Any): Unit
- Definition Classes
- Traces
- Annotations
- @inline()
-
final
def
macroLogVerbose(msg: ⇒ Any): Unit
- Definition Classes
- Traces
- Annotations
- @inline()
-
val
mirror: tools.nsc.Global.Mirror
- Definition Classes
- Context → Context
-
final
def
ne(arg0: AnyRef): Boolean
Equivalent to
!(this eq that)
.Equivalent to
!(this eq that)
.- returns
true
if the argument is not a reference to the receiver object;false
otherwise.
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up a single thread that is waiting on the receiver object's monitor.
- Definition Classes
- AnyRef
- Note
not specified by SLS as a member of AnyRef
-
final
def
notifyAll(): Unit
Wakes up all threads that are waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
- Definition Classes
- AnyRef
- Note
not specified by SLS as a member of AnyRef
-
def
openImplicits: List[ImplicitCandidate]
- Definition Classes
- Typers
-
def
openMacros: List[Context]
- Definition Classes
- Typers
-
def
parse(code: String): tools.nsc.Global.Tree
- Definition Classes
- Parsers
-
def
reifyEnclosingRuntimeClass: Tree
- Definition Classes
- Reifiers
-
def
reifyRuntimeClass(tpe: Type, concrete: Boolean = true): Tree
- Definition Classes
- Reifiers
-
def
reifyTree(universe: Tree, mirror: Tree, tree: Tree): Tree
- Definition Classes
- Reifiers
-
def
reifyType(universe: Tree, mirror: Tree, tpe: Type, concrete: Boolean = false): Tree
- Definition Classes
- Reifiers
-
def
resetLocalAttrs(tree: Tree): Tree
- Definition Classes
- Typers
-
def
settings: List[String]
- Definition Classes
- Infrastructure
-
def
symbolOf[T](implicit arg0: Context.WeakTypeTag[T]): tools.nsc.Global.TypeSymbol
- Definition Classes
- Aliases
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
Creates a String representation of this object.
Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.
- returns
a String representation of the object.
- Definition Classes
- AnyRef → Any
-
def
typeOf[T](implicit ttag: TypeTag[T]): Type
- Definition Classes
- Aliases
-
def
typeTag[T](implicit ttag: TypeTag[T]): TypeTag[T]
- Definition Classes
- Aliases
-
def
typecheck(tree: Tree, mode: TypecheckMode = TERMmode, pt: Type = universe.WildcardType, silent: Boolean = false, withImplicitViewsDisabled: Boolean = false, withMacrosDisabled: Boolean = false): Tree
- Definition Classes
- Typers
- See also
-
def
unreifyTree(tree: Tree): Tree
- Definition Classes
- Reifiers
-
def
untypecheck(tree: Tree): Tree
- Definition Classes
- Typers
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
warning(pos: Position, msg: String): Unit
- Definition Classes
- FrontEnds
-
def
weakTypeOf[T](implicit attag: WeakTypeTag[T]): Type
- Definition Classes
- Aliases
-
def
weakTypeTag[T](implicit attag: WeakTypeTag[T]): WeakTypeTag[T]
- Definition Classes
- Aliases
- def →[B](y: B): (Context, B)
Deprecated Value Members
-
def
typeCheck(tree: Context.Tree, pt: Context.Type, silent: Boolean, withImplicitViewsDisabled: Boolean, withMacrosDisabled: Boolean): Context.Tree
- Definition Classes
- Typers
- Annotations
- @deprecated
- Deprecated
(Since version 2.11.0) Use
c.typecheck
instead
The Scala compiler API.
The following resources are useful for Scala plugin/compiler development: