Package system.reflection.emit
Class ModuleBuilder
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.reflection.Module
-
- system.reflection.emit.ModuleBuilder
-
- All Implemented Interfaces:
IJCOBridgeReflected
public class ModuleBuilder extends Module
The base .NET class managing System.Reflection.Emit.ModuleBuilder, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Reflection.Emit.ModuleBuilder
Powered by JCOBridge: more info at https://www.jcobridge.com
- Version:
- 1.14.3.0
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static String
assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798estatic String
assemblyShortName
Assembly name: System.Private.CoreLibstatic String
className
Qualified class name: System.Reflection.Emit.ModuleBuilderstatic JCType
classType
The type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description ModuleBuilder()
ModuleBuilder(Object instance)
Internal constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ModuleBuilder
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoModuleBuilder
, a cast assert is made to check if types are compatible.void
CreateGlobalFunctions()
EnumBuilder
DefineEnum(String name, TypeAttributes visibility, NetType underlyingType)
MethodBuilder
DefineGlobalMethod(String name, MethodAttributes attributes, NetType returnType, NetType[] parameterTypes)
MethodBuilder
DefineGlobalMethod(String name, MethodAttributes attributes, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes)
FieldBuilder
DefineInitializedData(String name, byte[] data, FieldAttributes attributes)
FieldBuilder
DefineInitializedData(String dupParam0, JCORefOut dupParam1, FieldAttributes dupParam2)
MethodBuilder
DefinePInvokeMethod(String name, String dllName, String entryName, MethodAttributes attributes, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet)
MethodBuilder
DefinePInvokeMethod(String name, String dllName, MethodAttributes attributes, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet)
TypeBuilder
DefineType(String name)
TypeBuilder
DefineType(String name, TypeAttributes attr)
TypeBuilder
DefineType(String name, TypeAttributes attr, NetType parent)
TypeBuilder
DefineType(String name, TypeAttributes attr, NetType parent, int typesize)
TypeBuilder
DefineType(String name, TypeAttributes attr, NetType parent, NetType[] interfaces)
TypeBuilder
DefineType(String name, TypeAttributes attr, NetType parent, PackingSize packsize)
TypeBuilder
DefineType(String name, TypeAttributes attr, NetType parent, PackingSize packingSize, int typesize)
FieldBuilder
DefineUninitializedData(String name, int size, FieldAttributes attributes)
MethodInfo
GetArrayMethod(NetType arrayClass, String methodName, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes)
NetObject[]
GetCustomAttributes(boolean inherit)
NetObject[]
GetCustomAttributes(NetType attributeType, boolean inherit)
FieldInfo
GetField(String name, BindingFlags bindingAttr)
FieldInfo[]
GetFields(BindingFlags bindingFlags)
String
getJCOAssemblyName()
Returns the reflected Assembly nameString
getJCOClassName()
Returns the reflected Class nameObject
getJCOInstance()
Returns the instantiated classString
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class TypeMethodInfo[]
GetMethods(BindingFlags bindingFlags)
void
GetPEKind(JCORefOut<PortableExecutableKinds> peKind, JCORefOut<ImageFileMachine> machine)
NetType
GetType(String className)
NetType
GetType(String className, boolean ignoreCase)
NetType
GetType(String className, boolean throwOnError, boolean ignoreCase)
NetType[]
GetTypes()
boolean
IsDefined(NetType attributeType, boolean inherit)
boolean
IsResource()
FieldInfo
ResolveField(int metadataToken, NetType[] genericTypeArguments, NetType[] genericMethodArguments)
MemberInfo
ResolveMember(int metadataToken, NetType[] genericTypeArguments, NetType[] genericMethodArguments)
MethodBase
ResolveMethod(int metadataToken, NetType[] genericTypeArguments, NetType[] genericMethodArguments)
byte[]
ResolveSignature(int metadataToken)
String
ResolveString(int metadataToken)
NetType
ResolveType(int metadataToken, NetType[] genericTypeArguments, NetType[] genericMethodArguments)
void
SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
void
SetCustomAttribute(ConstructorInfo dupParam0, JCORefOut dupParam1)
void
SetCustomAttribute(CustomAttributeBuilder customBuilder)
void
setJCOInstance(JCObject instance)
-
Methods inherited from class system.reflection.Module
FindTypes, getAssembly, GetField, GetFields, getFullyQualifiedName, getMDStreamVersion, getMetadataToken, GetMethod, GetMethod, GetMethod, GetMethods, getModuleHandle, getModuleVersionId, getName, GetObjectData, getScopeName, ResolveField, ResolveMember, ResolveMethod, ResolveType
-
Methods inherited from class org.mases.jcobridge.netreflection.NetObject
Equals, Equals, GetHashCode, GetType, hashCode, toObjectFromArray, toObjectFromArray, toString, ToString, translateException
-
-
-
-
Field Detail
-
assemblyFullName
public static final String assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e- See Also:
- Constant Field Values
-
assemblyShortName
public static final String assemblyShortName
Assembly name: System.Private.CoreLib- See Also:
- Constant Field Values
-
className
public static final String className
Qualified class name: System.Reflection.Emit.ModuleBuilder- See Also:
- Constant Field Values
-
-
Method Detail
-
getJCOAssemblyName
public String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classModule
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classModule
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classModule
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classModule
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classModule
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classModule
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static ModuleBuilder cast(IJCOBridgeReflected from) throws Throwable
Try to cast theIJCOBridgeReflected
instance intoModuleBuilder
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
ModuleBuilder
instance- Throws:
Throwable
- in case of error during cast operation
-
IsDefined
public boolean IsDefined(NetType attributeType, boolean inherit) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
IsResource
public boolean IsResource() throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
ResolveSignature
public byte[] ResolveSignature(int metadataToken) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
GetCustomAttributes
public NetObject[] GetCustomAttributes(boolean inherit) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
- Overrides:
GetCustomAttributes
in classModule
- Throws:
Throwable
ArgumentException
ArgumentOutOfRangeException
IndexOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ArgumentNullException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
-
GetCustomAttributes
public NetObject[] GetCustomAttributes(NetType attributeType, boolean inherit) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
- Overrides:
GetCustomAttributes
in classModule
- Throws:
Throwable
ArgumentException
ArgumentOutOfRangeException
IndexOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ArgumentNullException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
-
DefineEnum
public EnumBuilder DefineEnum(String name, TypeAttributes visibility, NetType underlyingType) throws Throwable, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException
-
DefineInitializedData
public FieldBuilder DefineInitializedData(String name, byte[] data, FieldAttributes attributes) throws Throwable, PlatformNotSupportedException, InvalidOperationException, ArgumentNullException, ArgumentException, IndexOutOfRangeException, CultureNotFoundException, KeyNotFoundException, ArgumentOutOfRangeException, NotSupportedException
-
DefineInitializedData
public FieldBuilder DefineInitializedData(String dupParam0, JCORefOut dupParam1, FieldAttributes dupParam2) throws Throwable, PlatformNotSupportedException, InvalidOperationException, ArgumentNullException, ArgumentException, IndexOutOfRangeException, CultureNotFoundException, KeyNotFoundException, ArgumentOutOfRangeException, NotSupportedException
-
DefineUninitializedData
public FieldBuilder DefineUninitializedData(String name, int size, FieldAttributes attributes) throws Throwable, PlatformNotSupportedException, InvalidOperationException, ArgumentNullException, ArgumentException, IndexOutOfRangeException, CultureNotFoundException, KeyNotFoundException, ArgumentOutOfRangeException, NotSupportedException
-
DefineGlobalMethod
public MethodBuilder DefineGlobalMethod(String name, MethodAttributes attributes, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes) throws Throwable, PlatformNotSupportedException, ArgumentException, InvalidOperationException, ArgumentNullException, ArgumentOutOfRangeException, FormatException, IndexOutOfRangeException, RankException, ArrayTypeMismatchException
-
DefineGlobalMethod
public MethodBuilder DefineGlobalMethod(String name, MethodAttributes attributes, NetType returnType, NetType[] parameterTypes) throws Throwable, PlatformNotSupportedException, ArgumentException, InvalidOperationException, ArgumentNullException, FormatException, IndexOutOfRangeException, RankException, ArgumentOutOfRangeException, ArrayTypeMismatchException
-
DefinePInvokeMethod
public MethodBuilder DefinePInvokeMethod(String name, String dllName, MethodAttributes attributes, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) throws Throwable, PlatformNotSupportedException, ArgumentException, ArgumentNullException, InvalidOperationException, IndexOutOfRangeException, RankException, ArgumentOutOfRangeException, ArrayTypeMismatchException, NotSupportedException
-
DefinePInvokeMethod
public MethodBuilder DefinePInvokeMethod(String name, String dllName, String entryName, MethodAttributes attributes, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) throws Throwable, PlatformNotSupportedException, ArgumentException, ArgumentNullException, InvalidOperationException, IndexOutOfRangeException, RankException, ArgumentOutOfRangeException, ArrayTypeMismatchException, NotSupportedException, FormatException
-
DefineType
public TypeBuilder DefineType(String name, TypeAttributes attr, NetType parent, int typesize) throws Throwable, PlatformNotSupportedException, ArgumentNullException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
DefineType
public TypeBuilder DefineType(String name, TypeAttributes attr, NetType parent, PackingSize packingSize, int typesize) throws Throwable, PlatformNotSupportedException, ArgumentNullException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
DefineType
public TypeBuilder DefineType(String name, TypeAttributes attr, NetType parent, PackingSize packsize) throws Throwable, PlatformNotSupportedException, ArgumentNullException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
DefineType
public TypeBuilder DefineType(String name, TypeAttributes attr, NetType parent, NetType[] interfaces) throws Throwable, PlatformNotSupportedException, ArgumentNullException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
DefineType
public TypeBuilder DefineType(String name, TypeAttributes attr, NetType parent) throws Throwable, PlatformNotSupportedException, ArgumentException, ArgumentNullException, IndexOutOfRangeException, ArgumentOutOfRangeException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
DefineType
public TypeBuilder DefineType(String name, TypeAttributes attr) throws Throwable, PlatformNotSupportedException, ArgumentNullException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
DefineType
public TypeBuilder DefineType(String name) throws Throwable, PlatformNotSupportedException, ArgumentNullException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
GetField
public FieldInfo GetField(String name, BindingFlags bindingAttr) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
ResolveField
public FieldInfo ResolveField(int metadataToken, NetType[] genericTypeArguments, NetType[] genericMethodArguments) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
GetFields
public FieldInfo[] GetFields(BindingFlags bindingFlags) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
ResolveMember
public MemberInfo ResolveMember(int metadataToken, NetType[] genericTypeArguments, NetType[] genericMethodArguments) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
ResolveMethod
public MethodBase ResolveMethod(int metadataToken, NetType[] genericTypeArguments, NetType[] genericMethodArguments) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
GetArrayMethod
public MethodInfo GetArrayMethod(NetType arrayClass, String methodName, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes) throws Throwable, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, ArrayTypeMismatchException, FormatException, IndexOutOfRangeException
-
GetMethods
public MethodInfo[] GetMethods(BindingFlags bindingFlags) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
ResolveString
public String ResolveString(int metadataToken) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
GetType
public NetType GetType(String className, boolean throwOnError, boolean ignoreCase) throws Throwable, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArgumentException, IndexOutOfRangeException, ArgumentNullException, ArrayTypeMismatchException, OutOfMemoryException, CultureNotFoundException, ExternalException, KeyNotFoundException
- Overrides:
GetType
in classModule
- Throws:
Throwable
PlatformNotSupportedException
ArgumentOutOfRangeException
InvalidOperationException
NotSupportedException
ArgumentException
IndexOutOfRangeException
ArgumentNullException
ArrayTypeMismatchException
OutOfMemoryException
CultureNotFoundException
ExternalException
KeyNotFoundException
-
GetType
public NetType GetType(String className, boolean ignoreCase) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
GetType
public NetType GetType(String className) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
ResolveType
public NetType ResolveType(int metadataToken, NetType[] genericTypeArguments, NetType[] genericMethodArguments) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
GetTypes
public NetType[] GetTypes() throws Throwable, PlatformNotSupportedException, ArgumentNullException, InvalidOperationException
- Overrides:
GetTypes
in classModule
- Throws:
Throwable
PlatformNotSupportedException
ArgumentNullException
InvalidOperationException
-
CreateGlobalFunctions
public void CreateGlobalFunctions() throws Throwable, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, ArgumentException, NotSupportedException, FormatException
-
GetPEKind
public void GetPEKind(JCORefOut<PortableExecutableKinds> peKind, JCORefOut<ImageFileMachine> machine) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
SetCustomAttribute
public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) throws Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, NotSupportedException, CultureNotFoundException, ObjectDisposedException
-
SetCustomAttribute
public void SetCustomAttribute(ConstructorInfo dupParam0, JCORefOut dupParam1) throws Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, NotSupportedException, CultureNotFoundException, ObjectDisposedException
-
SetCustomAttribute
public void SetCustomAttribute(CustomAttributeBuilder customBuilder) throws Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, NotSupportedException, CultureNotFoundException, ObjectDisposedException
-
-