JavaType is the implementation of CType for a Java class.
Slots
- arrayOfSource
-
JavaType? arrayOf
If this an array, this is the component type.
- arrayRankSource
-
Int arrayRank := 0
The rank of the array where 0 is not an array, 1 is one dimension, 2 is two dimensional, etc.
- baseSource
-
override CType? base
Overrides compiler::CType.base
- classLiteralSource
-
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
- facetSource
-
override CFacet? facet(Str qname)
Overrides compiler::CType.facet
- fitsSource
-
Overrides compiler::CType.fits
- flagsSource
-
override Int flags
Overrides compiler::CType.flags
- inferredArrayOfSource
-
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.
- inferredAsSource
-
override CType inferredAs()
Overrides compiler::CType.inferredAs
- isArraySource
-
Bool isArray()
Is this a array type such as
[java]foo.bar::[Baz
- isForeignSource
-
override Bool isForeign()
Overrides compiler::CType.isForeign
- isGenericSource
-
override Bool isGeneric()
Overrides compiler::CType.isGeneric
- isGenericParameterSource
-
override Bool isGenericParameter()
Overrides compiler::CType.isGenericParameter
- isInteropArraySource
-
Bool isInteropArray()
Return if this is an interop array like
fanx.interop.IntArray
which modelsint[]
. - isNullableSource
-
override Bool isNullable()
Overrides compiler::CType.isNullable
- isParameterizedSource
-
override Bool isParameterized()
Overrides compiler::CType.isParameterized
- isPrimitiveSource
-
Bool isPrimitive()
- isPrimitiveFloatSource
-
Bool isPrimitiveFloat()
- isPrimitiveIntLikeSource
-
Bool isPrimitiveIntLike()
- isSupportedSource
-
override Bool isSupported()
Overrides compiler::CType.isSupported
- isValSource
-
override Bool isVal()
Overrides compiler::CType.isVal
-
private Void load()
-
private Bool loaded := false
- makeSource
-
new make(JavaPod pod, Str name, CType? primitiveNullable := null)
Construct with loaded Type.
- methodSource
-
override CMethod? method(Str name)
Overrides compiler::CType.method
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
- mixinsSource
-
override CType[] mixins
Overrides compiler::CType.mixins
- nameSource
-
override readonly Str name
Overrides compiler::CType.name
- newMethodSource
-
CMethod newMethod()
We use an implicit constructor called "<new>" on each type as the protocol for telling the Java runtime to perform a
new
opcode for object allocation:CallNew Type.<new> // allocate object args... // arguments are pushed onto stack CallCtor <init> // call to java constructor
- nsSource
-
override CNamespace ns()
Overrides compiler::CType.ns
- podSource
-
override readonly JavaPod pod
Overrides compiler::CType.pod
-
private CType? primitiveNullable
- qnameSource
-
override readonly Str qname
Overrides compiler::CType.qname
- signatureSource
-
override Str signature()
Overrides compiler::CType.signature
- slotSource
-
override CSlot? slot(Str name)
Overrides compiler::CType.slot
- slotsSource
-
override readonly Str:CSlot slots
Overrides compiler::CType.slots
- toArrayOfSource
-
JavaType toArrayOf()
Get the type which is an array of this type.
- toJavaClassNameSource
-
Str toJavaClassName()
Get this type's Java class name:
[java]java.lang::Class => java.lang.Class [java]java.lang::[Class => [Ljava.lang.Class;
- toListOfSource
-
override CType toListOf()
Overrides compiler::CType.toListOf
- toNullableSource
-
override CType toNullable()
Overrides compiler::CType.toNullable