Class BytecodeBoundClass
- java.lang.Object
-
- com.google.turbine.binder.bytecode.BytecodeBoundClass
-
- All Implemented Interfaces:
BoundClass,HeaderBoundClass,TypeBoundClass
public class BytecodeBoundClass extends java.lang.Object implements TypeBoundClass
A bound class backed by a class file.Implements all of the phase-specific bound class interfaces, and lazily fills in data from the classfile needed to implement them. This is safe because the types in bytecode are already fully resolved and canonicalized so there are no cycles. The laziness also minimizes the amount of work done on the classpath.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.turbine.binder.bound.TypeBoundClass
TypeBoundClass.FieldInfo, TypeBoundClass.MethodInfo, TypeBoundClass.ParamInfo, TypeBoundClass.RecordComponentInfo, TypeBoundClass.TyVarInfo
-
-
Constructor Summary
Constructors Constructor Description BytecodeBoundClass(ClassSymbol sym, com.google.common.base.Supplier<byte[]> bytes, Env<ClassSymbol,BytecodeBoundClass> env, @Nullable java.lang.String jarFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaccess()Class access bits (see JVMS table 4.1).@Nullable AnnotationMetadataannotationMetadata()Annotation metadata, e.g.com.google.common.collect.ImmutableList<AnnoInfo>annotations()Declaration annotations.com.google.common.collect.ImmutableMap<java.lang.String,ClassSymbol>children()Member type declarations, by simple name.ClassFileclassFile()The class file the symbol was loaded from.com.google.common.collect.ImmutableList<TypeBoundClass.RecordComponentInfo>components()Record components.com.google.common.collect.ImmutableList<TypeBoundClass.FieldInfo>fields()Declared fields.com.google.common.collect.ImmutableList<ClassSymbol>interfaces()The interfaces of the declaration.com.google.common.collect.ImmutableList<Type>interfaceTypes()Implemented interface types.@Nullable java.lang.StringjarFile()The jar file the symbol was loaded from.TurbineTyKindkind()The kind of declared type (class, interface, enum, or annotation).com.google.common.collect.ImmutableList<TypeBoundClass.MethodInfo>methods()Declared methods.@Nullable ClassSymbolowner()The enclosing declaration for member types, ornullfor top-level declarations.com.google.common.collect.ImmutableList<ClassSymbol>permits()The permitted direct subclasses.@Nullable ClassSymbolsuperclass()The superclass of the declaration.@Nullable Type.ClassTysuperClassType()The super-class type.com.google.common.collect.ImmutableMap<java.lang.String,TyVarSymbol>typeParameters()Declared type parameters.com.google.common.collect.ImmutableMap<TyVarSymbol,TypeBoundClass.TyVarInfo>typeParameterTypes()
-
-
-
Constructor Detail
-
BytecodeBoundClass
public BytecodeBoundClass(ClassSymbol sym, com.google.common.base.Supplier<byte[]> bytes, Env<ClassSymbol,BytecodeBoundClass> env, @Nullable java.lang.String jarFile)
-
-
Method Detail
-
kind
public TurbineTyKind kind()
Description copied from interface:BoundClassThe kind of declared type (class, interface, enum, or annotation).- Specified by:
kindin interfaceBoundClass
-
owner
public @Nullable ClassSymbol owner()
Description copied from interface:BoundClassThe enclosing declaration for member types, ornullfor top-level declarations.- Specified by:
ownerin interfaceBoundClass
-
children
public com.google.common.collect.ImmutableMap<java.lang.String,ClassSymbol> children()
Description copied from interface:BoundClassMember type declarations, by simple name.- Specified by:
childrenin interfaceBoundClass
-
access
public int access()
Description copied from interface:BoundClassClass access bits (see JVMS table 4.1).- Specified by:
accessin interfaceBoundClass
-
typeParameters
public com.google.common.collect.ImmutableMap<java.lang.String,TyVarSymbol> typeParameters()
Description copied from interface:HeaderBoundClassDeclared type parameters.- Specified by:
typeParametersin interfaceHeaderBoundClass
-
superclass
public @Nullable ClassSymbol superclass()
Description copied from interface:HeaderBoundClassThe superclass of the declaration.- Specified by:
superclassin interfaceHeaderBoundClass
-
interfaces
public com.google.common.collect.ImmutableList<ClassSymbol> interfaces()
Description copied from interface:HeaderBoundClassThe interfaces of the declaration.- Specified by:
interfacesin interfaceHeaderBoundClass
-
superClassType
public @Nullable Type.ClassTy superClassType()
Description copied from interface:TypeBoundClassThe super-class type.- Specified by:
superClassTypein interfaceTypeBoundClass
-
interfaceTypes
public com.google.common.collect.ImmutableList<Type> interfaceTypes()
Description copied from interface:TypeBoundClassImplemented interface types.- Specified by:
interfaceTypesin interfaceTypeBoundClass
-
permits
public com.google.common.collect.ImmutableList<ClassSymbol> permits()
Description copied from interface:TypeBoundClassThe permitted direct subclasses.- Specified by:
permitsin interfaceTypeBoundClass
-
typeParameterTypes
public com.google.common.collect.ImmutableMap<TyVarSymbol,TypeBoundClass.TyVarInfo> typeParameterTypes()
- Specified by:
typeParameterTypesin interfaceTypeBoundClass
-
fields
public com.google.common.collect.ImmutableList<TypeBoundClass.FieldInfo> fields()
Description copied from interface:TypeBoundClassDeclared fields.- Specified by:
fieldsin interfaceTypeBoundClass
-
methods
public com.google.common.collect.ImmutableList<TypeBoundClass.MethodInfo> methods()
Description copied from interface:TypeBoundClassDeclared methods.- Specified by:
methodsin interfaceTypeBoundClass
-
components
public com.google.common.collect.ImmutableList<TypeBoundClass.RecordComponentInfo> components()
Description copied from interface:TypeBoundClassRecord components.- Specified by:
componentsin interfaceTypeBoundClass
-
annotationMetadata
public @Nullable AnnotationMetadata annotationMetadata()
Description copied from interface:TypeBoundClassAnnotation metadata, e.g. fromTarget,Retention, andRepeatable.- Specified by:
annotationMetadatain interfaceTypeBoundClass
-
annotations
public com.google.common.collect.ImmutableList<AnnoInfo> annotations()
Description copied from interface:TypeBoundClassDeclaration annotations.- Specified by:
annotationsin interfaceTypeBoundClass
-
jarFile
public @Nullable java.lang.String jarFile()
The jar file the symbol was loaded from.
-
classFile
public ClassFile classFile()
The class file the symbol was loaded from.
-
-