public class TypeBuilder extends TypeInfo
.NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Reflection.Emit.TypeBuilder
Powered by JCOBridge: more info at https://www.jcobridge.com
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
|
static java.lang.String |
assemblyShortName
Assembly name: System.Private.CoreLib
|
static java.lang.String |
className
Qualified class name: System.Reflection.Emit.TypeBuilder
|
static JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
TypeBuilder() |
TypeBuilder(java.lang.Object instance)
Internal constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
AddInterfaceImplementation(NetType interfaceType) |
static TypeBuilder |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into TypeBuilder, a cast assert is made to check if types are compatible. |
NetType |
CreateType() |
TypeInfo |
CreateTypeInfo() |
ConstructorBuilder |
DefineConstructor(MethodAttributes attributes,
CallingConventions callingConvention,
NetType[] parameterTypes) |
ConstructorBuilder |
DefineDefaultConstructor(MethodAttributes attributes) |
EventBuilder |
DefineEvent(java.lang.String name,
EventAttributes attributes,
NetType eventtype) |
FieldBuilder |
DefineField(java.lang.String fieldName,
NetType type,
FieldAttributes attributes) |
FieldBuilder |
DefineField(java.lang.String fieldName,
NetType type,
NetType[] requiredCustomModifiers,
NetType[] optionalCustomModifiers,
FieldAttributes attributes) |
GenericTypeParameterBuilder[] |
DefineGenericParameters(JCORefOut dupParam0) |
GenericTypeParameterBuilder[] |
DefineGenericParameters(java.lang.String... names) |
FieldBuilder |
DefineInitializedData(java.lang.String name,
byte[] data,
FieldAttributes attributes) |
FieldBuilder |
DefineInitializedData(java.lang.String dupParam0,
JCORefOut dupParam1,
FieldAttributes dupParam2) |
MethodBuilder |
DefineMethod(java.lang.String name,
MethodAttributes attributes) |
MethodBuilder |
DefineMethod(java.lang.String name,
MethodAttributes attributes,
CallingConventions callingConvention) |
MethodBuilder |
DefineMethod(java.lang.String name,
MethodAttributes attributes,
CallingConventions callingConvention,
NetType returnType,
NetType[] parameterTypes) |
MethodBuilder |
DefineMethod(java.lang.String name,
MethodAttributes attributes,
NetType returnType,
NetType[] parameterTypes) |
void |
DefineMethodOverride(MethodInfo methodInfoBody,
MethodInfo methodInfoDeclaration) |
TypeBuilder |
DefineNestedType(java.lang.String name) |
TypeBuilder |
DefineNestedType(java.lang.String name,
TypeAttributes attr) |
TypeBuilder |
DefineNestedType(java.lang.String name,
TypeAttributes attr,
NetType parent) |
TypeBuilder |
DefineNestedType(java.lang.String name,
TypeAttributes attr,
NetType parent,
int typeSize) |
TypeBuilder |
DefineNestedType(java.lang.String name,
TypeAttributes attr,
NetType parent,
NetType[] interfaces) |
TypeBuilder |
DefineNestedType(java.lang.String name,
TypeAttributes attr,
NetType parent,
PackingSize packSize) |
TypeBuilder |
DefineNestedType(java.lang.String name,
TypeAttributes attr,
NetType parent,
PackingSize packSize,
int typeSize) |
MethodBuilder |
DefinePInvokeMethod(java.lang.String name,
java.lang.String dllName,
MethodAttributes attributes,
CallingConventions callingConvention,
NetType returnType,
NetType[] parameterTypes,
CallingConvention nativeCallConv,
CharSet nativeCharSet) |
MethodBuilder |
DefinePInvokeMethod(java.lang.String name,
java.lang.String dllName,
java.lang.String entryName,
MethodAttributes attributes,
CallingConventions callingConvention,
NetType returnType,
NetType[] parameterTypes,
CallingConvention nativeCallConv,
CharSet nativeCharSet) |
PropertyBuilder |
DefineProperty(java.lang.String name,
PropertyAttributes attributes,
CallingConventions callingConvention,
NetType returnType,
NetType[] parameterTypes) |
PropertyBuilder |
DefineProperty(java.lang.String name,
PropertyAttributes attributes,
NetType returnType,
NetType[] parameterTypes) |
ConstructorBuilder |
DefineTypeInitializer() |
FieldBuilder |
DefineUninitializedData(java.lang.String name,
int size,
FieldAttributes attributes) |
static ConstructorInfo |
GetConstructor(NetType type,
ConstructorInfo constructor) |
static FieldInfo |
GetField(NetType type,
FieldInfo field) |
java.lang.String |
getJCOAssemblyName()
Returns the reflected Assembly name
|
java.lang.String |
getJCOClassName()
Returns the reflected Class name
|
java.lang.Object |
getJCOInstance()
Returns the instantiated class
|
java.lang.String |
getJCOObjectName()
Returns the reflected Class name used to build the object
|
JCType |
getJCOType()
Returns the instantiated class Type
|
static MethodInfo |
GetMethod(NetType type,
MethodInfo method) |
PackingSize |
getPackingSize() |
int |
getSize() |
boolean |
IsCreated() |
NetType |
MakeArrayType() |
NetType |
MakeArrayType(int rank) |
NetType |
MakeByRefType() |
NetType |
MakeGenericType(NetType... typeArguments) |
NetType |
MakePointerType() |
void |
SetCustomAttribute(ConstructorInfo con,
byte[] binaryAttribute) |
void |
SetCustomAttribute(ConstructorInfo dupParam0,
JCORefOut dupParam1) |
void |
SetCustomAttribute(CustomAttributeBuilder customBuilder) |
void |
setJCOInstance(JCObject instance) |
void |
SetParent(NetType parent) |
AsType, GetDeclaredEvent, GetDeclaredField, GetDeclaredMethod, GetDeclaredNestedType, GetDeclaredProperty, getGenericTypeParameters, IsAssignableFromEquals, Equals, GetHashCode, GetType, hashCode, toString, ToStringGetTypeInfo, ToIReflectableTypepublic static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public TypeBuilder()
throws java.lang.Throwable
java.lang.Throwablepublic TypeBuilder(java.lang.Object instance)
throws java.lang.Throwable
java.lang.Throwablepublic void AddInterfaceImplementation(NetType interfaceType) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static TypeBuilder cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into TypeBuilder, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedTypeBuilder instancejava.lang.Throwable - in case of error during cast operationpublic NetType CreateType() throws java.lang.Throwable
java.lang.Throwablepublic TypeInfo CreateTypeInfo() throws java.lang.Throwable
java.lang.Throwablepublic ConstructorBuilder DefineConstructor(MethodAttributes attributes, CallingConventions callingConvention, NetType[] parameterTypes) throws java.lang.Throwable
java.lang.Throwablepublic ConstructorBuilder DefineDefaultConstructor(MethodAttributes attributes) throws java.lang.Throwable
java.lang.Throwablepublic EventBuilder DefineEvent(java.lang.String name, EventAttributes attributes, NetType eventtype) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException
java.lang.ThrowableNotSupportedExceptionArgumentExceptionArgumentNullExceptionpublic FieldBuilder DefineField(java.lang.String fieldName, NetType type, FieldAttributes attributes) throws java.lang.Throwable, ArgumentNullException, ArgumentException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionpublic FieldBuilder DefineField(java.lang.String fieldName, NetType type, NetType[] requiredCustomModifiers, NetType[] optionalCustomModifiers, FieldAttributes attributes) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException
java.lang.ThrowableNotSupportedExceptionArgumentExceptionArgumentNullExceptionpublic GenericTypeParameterBuilder[] DefineGenericParameters(JCORefOut dupParam0) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public GenericTypeParameterBuilder[] DefineGenericParameters(java.lang.String... names) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public FieldBuilder DefineInitializedData(java.lang.String name, byte[] data, FieldAttributes attributes) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public FieldBuilder DefineInitializedData(java.lang.String dupParam0, JCORefOut dupParam1, FieldAttributes dupParam2) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public MethodBuilder DefineMethod(java.lang.String name, MethodAttributes attributes) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, IndexOutOfRangeException, ArgumentOutOfRangeException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionpublic MethodBuilder DefineMethod(java.lang.String name, MethodAttributes attributes, CallingConventions callingConvention) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, IndexOutOfRangeException, ArgumentOutOfRangeException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionpublic MethodBuilder DefineMethod(java.lang.String name, MethodAttributes attributes, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, IndexOutOfRangeException, ArgumentOutOfRangeException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionpublic MethodBuilder DefineMethod(java.lang.String name, MethodAttributes attributes, NetType returnType, NetType[] parameterTypes) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, IndexOutOfRangeException, ArgumentOutOfRangeException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionpublic void DefineMethodOverride(MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public TypeBuilder DefineNestedType(java.lang.String name) throws java.lang.Throwable, ArgumentNullException, ArgumentException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionpublic TypeBuilder DefineNestedType(java.lang.String name, TypeAttributes attr) throws java.lang.Throwable, ArgumentNullException, ArgumentException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionpublic TypeBuilder DefineNestedType(java.lang.String name, TypeAttributes attr, NetType parent) throws java.lang.Throwable, ArgumentNullException, ArgumentException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionpublic TypeBuilder DefineNestedType(java.lang.String name, TypeAttributes attr, NetType parent, int typeSize) throws java.lang.Throwable, ArgumentNullException, ArgumentException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionpublic TypeBuilder DefineNestedType(java.lang.String name, TypeAttributes attr, NetType parent, NetType[] interfaces) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException
java.lang.ThrowableNotSupportedExceptionArgumentExceptionArgumentNullExceptionpublic TypeBuilder DefineNestedType(java.lang.String name, TypeAttributes attr, NetType parent, PackingSize packSize) throws java.lang.Throwable, ArgumentNullException, ArgumentException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionpublic TypeBuilder DefineNestedType(java.lang.String name, TypeAttributes attr, NetType parent, PackingSize packSize, int typeSize) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException
java.lang.ThrowableNotSupportedExceptionArgumentExceptionArgumentNullExceptionpublic MethodBuilder DefinePInvokeMethod(java.lang.String name, java.lang.String dllName, MethodAttributes attributes, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) throws java.lang.Throwable, ArgumentNullException, ArgumentException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionpublic MethodBuilder DefinePInvokeMethod(java.lang.String name, java.lang.String dllName, java.lang.String entryName, MethodAttributes attributes, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) throws java.lang.Throwable, ArgumentNullException, ArgumentException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionpublic PropertyBuilder DefineProperty(java.lang.String name, PropertyAttributes attributes, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes) throws java.lang.Throwable, ArgumentNullException, ArgumentException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionpublic PropertyBuilder DefineProperty(java.lang.String name, PropertyAttributes attributes, NetType returnType, NetType[] parameterTypes) throws java.lang.Throwable, ArgumentNullException, ArgumentException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionpublic ConstructorBuilder DefineTypeInitializer() throws java.lang.Throwable
java.lang.Throwablepublic FieldBuilder DefineUninitializedData(java.lang.String name, int size, FieldAttributes attributes) throws java.lang.Throwable
java.lang.Throwablepublic static ConstructorInfo GetConstructor(NetType type, ConstructorInfo constructor) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException
public static FieldInfo GetField(NetType type, FieldInfo field) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException
public java.lang.String getJCOAssemblyName()
IJCOBridgeReflectedgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in interface IReflectableTypegetJCOAssemblyName in class TypeInfoString representing the Fullname of reflected Assemblypublic java.lang.String getJCOClassName()
IJCOBridgeReflectedgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in interface IReflectableTypegetJCOClassName in class TypeInfoString representing the Fullname of reflected Classpublic java.lang.Object getJCOInstance()
IJCOBridgeReflectedgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in interface IReflectableTypegetJCOInstance in class TypeInfoObject representing the CLR instance of the instantiated Classpublic java.lang.String getJCOObjectName()
IJCOBridgeReflectedgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in interface IReflectableTypegetJCOObjectName in class TypeInfoString representing the name used to allocated the object
in CLR contextpublic JCType getJCOType()
IJCOBridgeReflectedgetJCOType in interface IJCOBridgeReflectedgetJCOType in interface IReflectableTypegetJCOType in class TypeInfoJCType representing the CLR Type of the instantiated Classpublic static MethodInfo GetMethod(NetType type, MethodInfo method) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException
public PackingSize getPackingSize() throws java.lang.Throwable
java.lang.Throwablepublic int getSize()
throws java.lang.Throwable
java.lang.Throwablepublic boolean IsCreated()
throws java.lang.Throwable
java.lang.Throwablepublic NetType MakeArrayType() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException
public NetType MakeArrayType(int rank) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, OutOfMemoryException
public NetType MakeByRefType() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException
public NetType MakeGenericType(NetType... typeArguments) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException
public NetType MakePointerType() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException
public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public void SetCustomAttribute(ConstructorInfo dupParam0, JCORefOut dupParam1) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public void SetCustomAttribute(CustomAttributeBuilder customBuilder) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public void setJCOInstance(JCObject instance)
setJCOInstance in class TypeInfopublic void SetParent(NetType parent) throws java.lang.Throwable
java.lang.Throwable