class compilerJava::JavaType
sys::Obj compilerJava::JavaType : compiler::CType
JavaType is the implementation of CType for a Java class.
- arrayOf
-
JavaType? arrayOf { private set }If this an array, this is the component type.
- arrayRank
-
const Int arrayRank := 0The rank of the array where 0 is not an array, 1 is one dimension, 2 is two dimensional, etc.
- base
-
virtual override CType? base - classLiteral
-
static CMethod classLiteral(JavaBridge bridge, CType base)We use an implicit method called "<class>" on each type as the protocol for telling the Java runtime to load a class literal
- classfile
-
const File? classfileClassfile to use for loading
- doc
-
virtual override CDoc? doc() - facet
- fits
- flags
-
virtual override Int flags - inferredArrayOf
-
CType? inferredArrayOf()The arrayOf field always stores a JavaType so that we can correctly resolve the FFI qname. This means that that an array of java.lang.Object will have an arrayOf value of
[java]java.lang::Object. This method correctly maps the arrayOf map to its canonical Fantom type. - inferredAs
-
virtual override CType inferredAs() - isArray
-
Bool isArray()Is this a array type such as
[java]foo.bar::[Baz - isForeign
-
virtual override Bool isForeign() - isGeneric
-
virtual override Bool isGeneric() - isGenericParameter
-
virtual override Bool isGenericParameter() - isInteropArray
-
Bool isInteropArray()Return if this is an interop array like
fanx.interop.IntArraywhich modelsint[]. - isNullable
-
virtual override Bool isNullable() - isParameterized
-
virtual override Bool isParameterized() - isPrimitive
-
Bool isPrimitive() - isPrimitiveFloat
-
Bool isPrimitiveFloat() - isPrimitiveIntLike
-
Bool isPrimitiveIntLike() - isSupported
-
virtual override Bool isSupported() - isVal
-
virtual override Bool isVal() - makeArray
-
new makeArray(JavaType of) - makeDasm
- makePrimitive
-
new makePrimitive(JavaPod pod, Str name, CType primitiveNullable) - method
-
virtual override CMethod? method(Str name)Handle the case where a field and method have the same name; in this case the field will always be first with a linked list to the overloaded methods
- mixins
-
virtual override CType[] mixins - name
-
virtual const override Str name - newMethod
-
CMethod newMethod()We use an implicit constructor called "<new>" on each type as the protocol for telling the Java runtime to perform a
newopcode for object allocation:CallNew Type.<new> // allocate object args... // arguments are pushed onto stack CallCtor <init> // call to java constructor
- ns
-
virtual override CNamespace ns() - operators
-
virtual override COperators operators() - pod
-
virtual override JavaPod pod - qname
-
virtual const override Str qname - signature
-
virtual override Str signature() - slot
- slots
-
virtual override Str:CSlot slots := [Str:CSlot][:] { private set } - toArrayOf
-
JavaType toArrayOf()Get the type which is an array of this type.
- toJavaClassName
-
Str toJavaClassName()Get this type's Java class name:
[java]java.lang::Class => java.lang.Class [java]java.lang::[Class => [Ljava.lang.Class;
- toListOf
-
virtual override CType toListOf() - toNullable
-
virtual override CType toNullable() - useReflection
-
const static Bool useReflection := falseTODO: hook to fallback to old reflection loader in case we run into trouble with disassembler loader