abstract class ClassfileParser extends AnyRef
This abstract class implements a class file parser.
- Source
- ClassfileParser.scala
- Alphabetic
- By Inheritance
- ClassfileParser
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ClassfileParser(reader: ReusableInstance[ReusableDataReader])
Type Members
- case class InnerClassEntry(external: NameOrString, outer: NameOrString, name: NameOrString, jflags: JavaAccFlags) extends Product with Serializable
An entry in the InnerClasses attribute of this class file.
- class LazyAliasType extends (symbolTable)#LazyType with (symbolTable)#FlagAgnosticCompleter
- class TypeParamsType extends (symbolTable)#LazyType with (symbolTable)#FlagAgnosticCompleter
Abstract Value Members
- abstract def classPath: ClassPath
The compiler classpath.
- abstract val loaders: SymbolLoaders { val symbolTable: ClassfileParser.this.symbolTable.type }
- abstract val symbolTable: SymbolTable { def settings: scala.tools.nsc.Settings }
Concrete Value Members
- def addEnclosingTParams(clazz: (symbolTable)#Symbol): Unit
Add type parameters of enclosing classes
- def addJavaFlagsAnnotations(sym: (symbolTable)#Symbol, flags: JavaAccFlags): Unit
Apply
@native
/@transient
/@volatile
annotations tosym
, if the corresponding flag is set inflags
. - def classNameToSymbol(name: String): (symbolTable)#Symbol
Return the class symbol of the given name.
- def getClassSymbol(name: String): (symbolTable)#Symbol
- def parse(file: AbstractFile, clazz: (symbolTable)#ClassSymbol, module: (symbolTable)#ModuleSymbol): Unit
clazz
andmodule
are the class and module symbols corresponding to the classfile being parsed.clazz
andmodule
are the class and module symbols corresponding to the classfile being parsed. Note that the ClassfileLoader unconditionally creates both of these symbols, they may may get invalidated later on (.exists).Note that using
companionModule
/companionClass
does not always work to navigate between those two symbols, namely when they are shadowed by a type / value in the a package object (scala-dev#248). - def parseAnnotArg(): Option[(symbolTable)#ClassfileAnnotArg]
- def parseAnnotation(attrNameIndex: Int): Option[(symbolTable)#AnnotationInfo]
Parse and return a single annotation.
Parse and return a single annotation. If it is malformed, return None.
- def parseClass(): Unit
- def parseField(): Unit
- def parseMethod(): Unit
- def skipAttributes(): Unit
- def skipMembers(): Unit
- def skipSuperclasses(): Unit
- def srcfile: Option[AbstractFile]
- def stubClassSymbol(name: (symbolTable)#Name): (symbolTable)#Symbol
- def unpickleOrParseInnerClasses(): Unit
Either
Either
- set
isScala
and invoke the unpickler, or - set
isScalaRaw
, or - parse inner classes (for Java classfiles)
Expects
in.bp
to point to theaccess_flags
entry, restores the oldbp
. - set
- object TastyUniverse extends TastyUniverse
- object innerClasses
Return the class symbol for the given name.
Return the class symbol for the given name. It looks it up in its outer class. Forces all outer class symbols to be completed.
If the given name is not an inner class, it returns the symbol found in
definitions
.
The Scala compiler and reflection APIs.