abstract class AnnotationInfo extends SymbolTable.AnnotationApi
Typed information about an annotation. It can be attached to either a symbol or an annotated type.
Annotations are written to the classfile as Java annotations
if atp
conforms to ClassfileAnnotation
(the classfile parser adds
this interface to any Java annotation class).
Annotations are pickled (written to scala symtab attribute in the
classfile) if atp
inherits form StaticAnnotation
.
args
stores arguments to Scala annotations, represented as typed
trees. Note that these trees are not transformed by any phases
following the type-checker.
assocs
stores arguments to classfile annotations as name-value pairs.
- Alphabetic
- By Inheritance
- AnnotationInfo
- AnnotationApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AnnotationInfo()
Abstract Value Members
- abstract def args: List[SymbolTable.Tree]
- abstract def assocs: List[(SymbolTable.Name, SymbolTable.ClassfileAnnotArg)]
- abstract def atp: SymbolTable.Type
- abstract def original: SymbolTable.Tree
- abstract def setOriginal(t: SymbolTable.Tree): AnnotationInfo.this.type
Concrete 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 argAtIndex(index: Int): Option[SymbolTable.Tree]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def booleanArg(index: Int): Option[Boolean]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def completeInfo(): Unit
- def constantAtIndex(index: Int): Option[SymbolTable.Constant]
-
def
defaultTargets: collection.immutable.List[SymbolTable.Symbol]
The default kind of members to which this annotation is attached.
The default kind of members to which this annotation is attached. For instance, for scala.deprecated defaultTargets = List(getter, setter, beanGetter, beanSetter).
NOTE: have to call symbol.initialize, since we won't get any annotations if the symbol hasn't yet been completed
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(other: Any): Boolean
- Definition Classes
- AnnotationInfo → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hasArgWhich(p: (SymbolTable.Tree) ⇒ Boolean): Boolean
-
def
hashCode(): Int
- Definition Classes
- AnnotationInfo → AnyRef → Any
- def intArg(index: Int): Option[Int]
-
def
isErroneous: Boolean
Check whether the type or any of the arguments are erroneous
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isStatic: Boolean
- lazy val isTrivial: Boolean
-
def
javaArgs: ListMap[SymbolTable.Name, SymbolTable.ClassfileAnnotArg]
Payload of the Java annotation: a list of name-value pairs.
Payload of the Java annotation: a list of name-value pairs. Empty for Scala annotations.
- Definition Classes
- AnnotationInfo → AnnotationApi
- def matches(clazz: SymbolTable.Symbol): Boolean
-
def
metaAnnotations: List[SymbolTable.AnnotationInfo]
These are meta-annotations attached at the use site; they only apply to this annotation usage.
These are meta-annotations attached at the use site; they only apply to this annotation usage. For instance, in
@(deprecated @setter @field) val ...
metaAnnotations = List(setter, field). -
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 pos: SymbolTable.Position
-
def
refsSymbol(sym: SymbolTable.Symbol): Boolean
Check whether any of the arguments mention a symbol
-
def
scalaArgs: List[SymbolTable.Tree]
Payload of the Scala annotation: a list of abstract syntax trees that represent the argument.
Payload of the Scala annotation: a list of abstract syntax trees that represent the argument. Empty for Java annotations.
- Definition Classes
- AnnotationInfo → AnnotationApi
- def setPos(pos: SymbolTable.Position): AnnotationInfo.this.type
- def stringArg(index: Int): Option[String]
-
def
symbol: SymbolTable.Symbol
Annotations annotating annotations are confusing so I drew an example.
Annotations annotating annotations are confusing so I drew an example. Given the following code:
class A {
- def symbolArg(index: Int): Option[SymbolTable.TermName]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
tpe: SymbolTable.Type
The type of the annotation.
The type of the annotation.
- Definition Classes
- AnnotationInfo → AnnotationApi
- def transformArgs(f: (List[SymbolTable.Tree]) ⇒ List[SymbolTable.Tree]): SymbolTable.AnnotationInfo
-
def
tree: SymbolTable.Tree
The tree underlying the annotation.
The tree underlying the annotation.
- Definition Classes
- AnnotationApi
-
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( ... ) @native()