IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IKVM.Runtime.RuntimeManagedByteCodeJavaTypeFactory Class Reference

Public Member Functions

 RuntimeManagedByteCodeJavaTypeFactory (RuntimeContext context)
 Initializes a new instance.
 
RuntimeManagedByteCodeJavaType newInstance (string name, Type type)
 Creates a new instance of the appropriate runtime type.
 

Detailed Description

Definition at line 52 of file RuntimeManagedByteCodeJavaType.cs.

Constructor & Destructor Documentation

◆ RuntimeManagedByteCodeJavaTypeFactory()

IKVM.Runtime.RuntimeManagedByteCodeJavaTypeFactory.RuntimeManagedByteCodeJavaTypeFactory ( RuntimeContext context)

Initializes a new instance.

Parameters
context

Definition at line 61 of file RuntimeManagedByteCodeJavaType.cs.

62 {
63 this.context = context ?? throw new ArgumentNullException(nameof(context));
64 }

Member Function Documentation

◆ newInstance()

RuntimeManagedByteCodeJavaType IKVM.Runtime.RuntimeManagedByteCodeJavaTypeFactory.newInstance ( string name,
Type type )

Creates a new instance of the appropriate runtime type.

Parameters
name
type
Returns

Definition at line 72 of file RuntimeManagedByteCodeJavaType.cs.

73 {
74 // TODO since ghost and remapped types can only exist in the core library assembly, we probably
75 // should be able to remove the Type.IsDefined() tests in most cases
76 if (type.IsValueType && context.AttributeHelper.IsGhostInterface(type))
77 {
78 return new RuntimeManagedByteCodeJavaType.GhostJavaType(context, name, type);
79 }
80 else if (context.AttributeHelper.IsRemappedType(type))
81 {
82 return new RuntimeManagedByteCodeJavaType.RemappedJavaType(context, name, type);
83 }
84 else
85 {
86 return new RuntimeManagedByteCodeJavaType(context, name, type);
87 }
88 }
AttributeHelper AttributeHelper
Gets the AttributeHelper associated with this instance of the runtime.

The documentation for this class was generated from the following file: