Annotations

dotty.tools.dotc.core.Annotations
object Annotations

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

abstract class Annotation extends Showable

Attributes

Companion
object
Supertypes
trait Showable
class Object
trait Matchable
class Any
Known subtypes
object Annotation

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Annotation.type
abstract class BodyAnnotation extends Annotation

An annotation indicating the body of a right-hand side, typically of an inline method. Treated specially in pickling/unpickling and TypeTreeMaps

An annotation indicating the body of a right-hand side, typically of an inline method. Treated specially in pickling/unpickling and TypeTreeMaps

Attributes

Supertypes
class Annotation
trait Showable
class Object
trait Matchable
class Any
Known subtypes
class CompactAnnotation(val tpe: Type) extends Annotation

A class for optimized, compact annotations that are defined by a type instead of a tree. This makes mapping such annotations a lot faster and safer. In fact, in retrospect, most annotations would better be represented as CompactAnnotations.

A class for optimized, compact annotations that are defined by a type instead of a tree. This makes mapping such annotations a lot faster and safer. In fact, in retrospect, most annotations would better be represented as CompactAnnotations.

CompactAnnotation is extended by cc.RetainingAnnotation, which is reserved for @retains, @retainsByName and @retainsCap. For now there are no CompactAnnotations other than RetainingAnnotations but this could be changed in the future, after 3.9 has shipped.

Attributes

Companion
object
Supertypes
class Annotation
trait Showable
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
case class ConcreteAnnotation(t: Tree) extends Annotation

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Annotation
trait Showable
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class Annotation
trait Showable
class Object
trait Matchable
class Any
Show all
class DeferredSymAndTree(symFn: Context ?=> Symbol, treeFn: Context ?=> Tree) extends LazyAnnotation

Attributes

Supertypes
class Annotation
trait Showable
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
abstract class LazyAnnotation extends Annotation

Attributes

Supertypes
class Annotation
trait Showable
class Object
trait Matchable
class Any
Known subtypes
abstract class LazyBodyAnnotation extends BodyAnnotation

Attributes

Companion
object
Supertypes
class Annotation
trait Showable
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Extracts the type of the thrown exception from an annotation.

Extracts the type of the thrown exception from an annotation.

Supports both "old-style" @throws(classOf[Exception]) as well as "new-style" @throws[Exception]("cause") annotations.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def annotClass(tree: Tree)(using Context): Symbol

Concrete fields

An annotation that is used as a result of mapping annotations to indicate that the resulting typemap should drop the annotation (in derivedAnnotatedType).

An annotation that is used as a result of mapping annotations to indicate that the resulting typemap should drop the annotation (in derivedAnnotatedType).

Attributes