All Downloads are FREE. Search and download functionalities are using the official Maven repository.

system.reflection.emit.ModuleBuilder Maven / Gradle / Ivy

/*
 *  MIT License
 *
 *  Copyright (c) 2022 MASES s.r.l.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

/**************************************************************************************
 * 
 *      This code was generated from a template using JCOReflector
 * 
 *      Manual changes to this file may cause unexpected behavior in your application.
 *      Manual changes to this file will be overwritten if the code is regenerated.
 * 
 *************************************************************************************/

package system.reflection.emit;

import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;

// Import section
import system.reflection.Module;
import system.diagnostics.symbolstore.ISymbolDocumentWriter;
import system.diagnostics.symbolstore.ISymbolDocumentWriterImplementation;
import system.Guid;
import system.reflection.emit.EnumBuilder;
import system.reflection.TypeAttributes;
import system.reflection.emit.FieldBuilder;
import system.reflection.FieldAttributes;
import system.reflection.emit.FieldToken;
import system.reflection.FieldInfo;
import system.reflection.emit.MethodBuilder;
import system.reflection.MethodAttributes;
import system.reflection.CallingConventions;
import system.runtime.interopservices.CallingConvention;
import system.runtime.interopservices.CharSet;
import system.reflection.emit.MethodToken;
import system.reflection.ConstructorInfo;
import system.reflection.MethodInfo;
import system.reflection.emit.SignatureToken;
import system.reflection.emit.SignatureHelper;
import system.reflection.emit.StringToken;
import system.reflection.emit.TypeBuilder;
import system.reflection.emit.PackingSize;
import system.reflection.emit.TypeToken;
import system.reflection.BindingFlags;
import system.reflection.MemberInfo;
import system.reflection.MethodBase;
import system.reflection.PortableExecutableKinds;
import system.reflection.ImageFileMachine;
import system.reflection.emit.CustomAttributeBuilder;
import system.reflection.Assembly;


/**
 * The base .NET class managing System.Reflection.Emit.ModuleBuilder, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e.
 * 

* * See: https://docs.microsoft.com/en-us/dotnet/api/System.Reflection.Emit.ModuleBuilder */ public class ModuleBuilder extends Module { /** * Fully assembly qualified name: System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e */ public static final String assemblyFullName = "System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"; /** * Assembly name: System.Private.CoreLib */ public static final String assemblyShortName = "System.Private.CoreLib"; /** * Qualified class name: System.Reflection.Emit.ModuleBuilder */ public static final String className = "System.Reflection.Emit.ModuleBuilder"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { String classToCreate = className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); if (JCOReflector.getDebug()) JCOReflector.writeLog("Creating %s", classToCreate); JCType typeCreated = bridge.GetType(classToCreate); if (JCOReflector.getDebug()) JCOReflector.writeLog("Created: %s", (typeCreated != null) ? typeCreated.toString() : "Returned null value"); return typeCreated; } catch (JCException e) { JCOReflector.writeLog(e); return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * Internal constructor. Use with caution */ public ModuleBuilder(java.lang.Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public java.lang.Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link ModuleBuilder}, a cast assert is made to check if types are compatible. * @param from {@link IJCOBridgeReflected} instance to be casted * @return {@link ModuleBuilder} instance * @throws java.lang.Throwable in case of error during cast operation */ public static ModuleBuilder cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new ModuleBuilder(from.getJCOInstance()); } // Constructors section public ModuleBuilder() throws Throwable { } // Methods section public boolean IsDefined(NetType attributeType, boolean inherit) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Invoke("IsDefined", attributeType == null ? null : attributeType.getJCOInstance(), inherit); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean IsResource() throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Invoke("IsResource"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean IsTransient() throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Invoke("IsTransient"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public byte[] ResolveSignature(int metadataToken) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classInstance.Invoke("ResolveSignature", metadataToken); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } byte[] resultingArray = new byte[resultingArrayList.size()]; for(int indexResolveSignature = 0; indexResolveSignature < resultingArrayList.size(); indexResolveSignature++ ) { resultingArray[indexResolveSignature] = (byte)resultingArrayList.get(indexResolveSignature); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public ISymbolDocumentWriter DefineDocument(java.lang.String url, Guid language, Guid languageVendor, Guid documentType) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineDocument = (JCObject)classInstance.Invoke("DefineDocument", url, language == null ? null : language.getJCOInstance(), languageVendor == null ? null : languageVendor.getJCOInstance(), documentType == null ? null : documentType.getJCOInstance()); return new ISymbolDocumentWriterImplementation(objDefineDocument); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetObject[] GetCustomAttributes(boolean inherit) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classInstance.Invoke("GetCustomAttributes", inherit); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(new NetObject(resultingObject)); } NetObject[] resultingArray = new NetObject[resultingArrayList.size()]; resultingArray = resultingArrayList.toArray(resultingArray); return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetObject[] GetCustomAttributes(NetType attributeType, boolean inherit) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classInstance.Invoke("GetCustomAttributes", attributeType == null ? null : attributeType.getJCOInstance(), inherit); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(new NetObject(resultingObject)); } NetObject[] resultingArray = new NetObject[resultingArrayList.size()]; resultingArray = resultingArrayList.toArray(resultingArray); return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public EnumBuilder DefineEnum(java.lang.String name, TypeAttributes visibility, NetType underlyingType) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.NotSupportedException, system.IndexOutOfRangeException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineEnum = (JCObject)classInstance.Invoke("DefineEnum", name, visibility == null ? null : visibility.getJCOInstance(), underlyingType == null ? null : underlyingType.getJCOInstance()); return new EnumBuilder(objDefineEnum); } catch (JCNativeException jcne) { throw translateException(jcne); } } public FieldBuilder DefineInitializedData(java.lang.String name, byte[] data, FieldAttributes attributes) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.InvalidOperationException, system.ArgumentNullException, system.IndexOutOfRangeException, system.globalization.CultureNotFoundException, system.collections.generic.KeyNotFoundException, system.ArgumentOutOfRangeException, system.NotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineInitializedData = (JCObject)classInstance.Invoke("DefineInitializedData", name, data, attributes == null ? null : attributes.getJCOInstance()); return new FieldBuilder(objDefineInitializedData); } catch (JCNativeException jcne) { throw translateException(jcne); } } public FieldBuilder DefineInitializedData(java.lang.String dupParam0, JCORefOut dupParam1, FieldAttributes dupParam2) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.InvalidOperationException, system.ArgumentNullException, system.IndexOutOfRangeException, system.globalization.CultureNotFoundException, system.collections.generic.KeyNotFoundException, system.ArgumentOutOfRangeException, system.NotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineInitializedData = (JCObject)classInstance.Invoke("DefineInitializedData", dupParam0, dupParam1.getJCRefOut(), dupParam2 == null ? null : dupParam2.getJCOInstance()); return new FieldBuilder(objDefineInitializedData); } catch (JCNativeException jcne) { throw translateException(jcne); } } public FieldBuilder DefineUninitializedData(java.lang.String name, int size, FieldAttributes attributes) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.InvalidOperationException, system.ArgumentNullException, system.IndexOutOfRangeException, system.globalization.CultureNotFoundException, system.collections.generic.KeyNotFoundException, system.ArgumentOutOfRangeException, system.NotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineUninitializedData = (JCObject)classInstance.Invoke("DefineUninitializedData", name, size, attributes == null ? null : attributes.getJCOInstance()); return new FieldBuilder(objDefineUninitializedData); } catch (JCNativeException jcne) { throw translateException(jcne); } } public FieldToken GetFieldToken(FieldInfo field) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.ArrayTypeMismatchException, system.NotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetFieldToken = (JCObject)classInstance.Invoke("GetFieldToken", field == null ? null : field.getJCOInstance()); return new FieldToken(objGetFieldToken); } catch (JCNativeException jcne) { throw translateException(jcne); } } public MethodBuilder DefineGlobalMethod(java.lang.String name, MethodAttributes attributes, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.InvalidOperationException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.FormatException, system.IndexOutOfRangeException, system.RankException, system.ArrayTypeMismatchException, system.NotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineGlobalMethod = (JCObject)classInstance.Invoke("DefineGlobalMethod", name, attributes == null ? null : attributes.getJCOInstance(), callingConvention == null ? null : callingConvention.getJCOInstance(), returnType == null ? null : returnType.getJCOInstance(), toObjectFromArray(parameterTypes)); return new MethodBuilder(objDefineGlobalMethod); } catch (JCNativeException jcne) { throw translateException(jcne); } } public MethodBuilder DefineGlobalMethod(java.lang.String name, MethodAttributes attributes, NetType returnType, NetType[] parameterTypes) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.InvalidOperationException, system.ArgumentNullException, system.FormatException, system.IndexOutOfRangeException, system.RankException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineGlobalMethod = (JCObject)classInstance.Invoke("DefineGlobalMethod", name, attributes == null ? null : attributes.getJCOInstance(), returnType == null ? null : returnType.getJCOInstance(), toObjectFromArray(parameterTypes)); return new MethodBuilder(objDefineGlobalMethod); } catch (JCNativeException jcne) { throw translateException(jcne); } } public MethodBuilder DefinePInvokeMethod(java.lang.String name, java.lang.String dllName, MethodAttributes attributes, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.InvalidOperationException, system.IndexOutOfRangeException, system.RankException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.NotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefinePInvokeMethod = (JCObject)classInstance.Invoke("DefinePInvokeMethod", name, dllName, attributes == null ? null : attributes.getJCOInstance(), callingConvention == null ? null : callingConvention.getJCOInstance(), returnType == null ? null : returnType.getJCOInstance(), toObjectFromArray(parameterTypes), nativeCallConv == null ? null : nativeCallConv.getJCOInstance(), nativeCharSet == null ? null : nativeCharSet.getJCOInstance()); return new MethodBuilder(objDefinePInvokeMethod); } catch (JCNativeException jcne) { throw translateException(jcne); } } public 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 Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.InvalidOperationException, system.IndexOutOfRangeException, system.RankException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.NotSupportedException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefinePInvokeMethod = (JCObject)classInstance.Invoke("DefinePInvokeMethod", name, dllName, entryName, attributes == null ? null : attributes.getJCOInstance(), callingConvention == null ? null : callingConvention.getJCOInstance(), returnType == null ? null : returnType.getJCOInstance(), toObjectFromArray(parameterTypes), nativeCallConv == null ? null : nativeCallConv.getJCOInstance(), nativeCharSet == null ? null : nativeCharSet.getJCOInstance()); return new MethodBuilder(objDefinePInvokeMethod); } catch (JCNativeException jcne) { throw translateException(jcne); } } public MethodToken GetArrayMethodToken(NetType arrayClass, java.lang.String methodName, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.InvalidOperationException, system.NotSupportedException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetArrayMethodToken = (JCObject)classInstance.Invoke("GetArrayMethodToken", arrayClass == null ? null : arrayClass.getJCOInstance(), methodName, callingConvention == null ? null : callingConvention.getJCOInstance(), returnType == null ? null : returnType.getJCOInstance(), toObjectFromArray(parameterTypes)); return new MethodToken(objGetArrayMethodToken); } catch (JCNativeException jcne) { throw translateException(jcne); } } public MethodToken GetConstructorToken(ConstructorInfo con) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetConstructorToken = (JCObject)classInstance.Invoke("GetConstructorToken", con == null ? null : con.getJCOInstance()); return new MethodToken(objGetConstructorToken); } catch (JCNativeException jcne) { throw translateException(jcne); } } public MethodToken GetMethodToken(MethodInfo method) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.NotSupportedException, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetMethodToken = (JCObject)classInstance.Invoke("GetMethodToken", method == null ? null : method.getJCOInstance()); return new MethodToken(objGetMethodToken); } catch (JCNativeException jcne) { throw translateException(jcne); } } public SignatureToken GetSignatureToken(byte[] sigBytes, int sigLength) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetSignatureToken = (JCObject)classInstance.Invoke("GetSignatureToken", sigBytes, sigLength); return new SignatureToken(objGetSignatureToken); } catch (JCNativeException jcne) { throw translateException(jcne); } } public SignatureToken GetSignatureToken(JCORefOut dupParam0, int dupParam1) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetSignatureToken = (JCObject)classInstance.Invoke("GetSignatureToken", dupParam0.getJCRefOut(), dupParam1); return new SignatureToken(objGetSignatureToken); } catch (JCNativeException jcne) { throw translateException(jcne); } } public SignatureToken GetSignatureToken(SignatureHelper sigHelper) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetSignatureToken = (JCObject)classInstance.Invoke("GetSignatureToken", sigHelper == null ? null : sigHelper.getJCOInstance()); return new SignatureToken(objGetSignatureToken); } catch (JCNativeException jcne) { throw translateException(jcne); } } public StringToken GetStringConstant(java.lang.String str) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetStringConstant = (JCObject)classInstance.Invoke("GetStringConstant", str); return new StringToken(objGetStringConstant); } catch (JCNativeException jcne) { throw translateException(jcne); } } public TypeBuilder DefineType(java.lang.String name, TypeAttributes attr, NetType parent, int typesize) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.IndexOutOfRangeException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineType = (JCObject)classInstance.Invoke("DefineType", name, attr == null ? null : attr.getJCOInstance(), parent == null ? null : parent.getJCOInstance(), typesize); return new TypeBuilder(objDefineType); } catch (JCNativeException jcne) { throw translateException(jcne); } } public TypeBuilder DefineType(java.lang.String name, TypeAttributes attr, NetType parent, PackingSize packingSize, int typesize) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.IndexOutOfRangeException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineType = (JCObject)classInstance.Invoke("DefineType", name, attr == null ? null : attr.getJCOInstance(), parent == null ? null : parent.getJCOInstance(), packingSize == null ? null : packingSize.getJCOInstance(), typesize); return new TypeBuilder(objDefineType); } catch (JCNativeException jcne) { throw translateException(jcne); } } public TypeBuilder DefineType(java.lang.String name, TypeAttributes attr, NetType parent, PackingSize packsize) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.IndexOutOfRangeException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineType = (JCObject)classInstance.Invoke("DefineType", name, attr == null ? null : attr.getJCOInstance(), parent == null ? null : parent.getJCOInstance(), packsize == null ? null : packsize.getJCOInstance()); return new TypeBuilder(objDefineType); } catch (JCNativeException jcne) { throw translateException(jcne); } } public TypeBuilder DefineType(java.lang.String name, TypeAttributes attr, NetType parent, NetType[] interfaces) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.IndexOutOfRangeException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineType = (JCObject)classInstance.Invoke("DefineType", name, attr == null ? null : attr.getJCOInstance(), parent == null ? null : parent.getJCOInstance(), toObjectFromArray(interfaces)); return new TypeBuilder(objDefineType); } catch (JCNativeException jcne) { throw translateException(jcne); } } public TypeBuilder DefineType(java.lang.String name, TypeAttributes attr, NetType parent) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.IndexOutOfRangeException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineType = (JCObject)classInstance.Invoke("DefineType", name, attr == null ? null : attr.getJCOInstance(), parent == null ? null : parent.getJCOInstance()); return new TypeBuilder(objDefineType); } catch (JCNativeException jcne) { throw translateException(jcne); } } public TypeBuilder DefineType(java.lang.String name, TypeAttributes attr) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.IndexOutOfRangeException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineType = (JCObject)classInstance.Invoke("DefineType", name, attr == null ? null : attr.getJCOInstance()); return new TypeBuilder(objDefineType); } catch (JCNativeException jcne) { throw translateException(jcne); } } public TypeBuilder DefineType(java.lang.String name) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.IndexOutOfRangeException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDefineType = (JCObject)classInstance.Invoke("DefineType", name); return new TypeBuilder(objDefineType); } catch (JCNativeException jcne) { throw translateException(jcne); } } public TypeToken GetTypeToken(java.lang.String name) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetTypeToken = (JCObject)classInstance.Invoke("GetTypeToken", name); return new TypeToken(objGetTypeToken); } catch (JCNativeException jcne) { throw translateException(jcne); } } public TypeToken GetTypeToken(NetType type) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.NotSupportedException, system.IndexOutOfRangeException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetTypeToken = (JCObject)classInstance.Invoke("GetTypeToken", type == null ? null : type.getJCOInstance()); return new TypeToken(objGetTypeToken); } catch (JCNativeException jcne) { throw translateException(jcne); } } public FieldInfo GetField(java.lang.String name, BindingFlags bindingAttr) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetField = (JCObject)classInstance.Invoke("GetField", name, bindingAttr == null ? null : bindingAttr.getJCOInstance()); return new FieldInfo(objGetField); } catch (JCNativeException jcne) { throw translateException(jcne); } } public FieldInfo ResolveField(int metadataToken, NetType[] genericTypeArguments, NetType[] genericMethodArguments) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objResolveField = (JCObject)classInstance.Invoke("ResolveField", metadataToken, toObjectFromArray(genericTypeArguments), toObjectFromArray(genericMethodArguments)); return new FieldInfo(objResolveField); } catch (JCNativeException jcne) { throw translateException(jcne); } } public FieldInfo[] GetFields(BindingFlags bindingFlags) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classInstance.Invoke("GetFields", bindingFlags == null ? null : bindingFlags.getJCOInstance()); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(new FieldInfo(resultingObject)); } FieldInfo[] resultingArray = new FieldInfo[resultingArrayList.size()]; resultingArray = resultingArrayList.toArray(resultingArray); return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public MemberInfo ResolveMember(int metadataToken, NetType[] genericTypeArguments, NetType[] genericMethodArguments) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objResolveMember = (JCObject)classInstance.Invoke("ResolveMember", metadataToken, toObjectFromArray(genericTypeArguments), toObjectFromArray(genericMethodArguments)); return new MemberInfo(objResolveMember); } catch (JCNativeException jcne) { throw translateException(jcne); } } public MethodBase ResolveMethod(int metadataToken, NetType[] genericTypeArguments, NetType[] genericMethodArguments) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objResolveMethod = (JCObject)classInstance.Invoke("ResolveMethod", metadataToken, toObjectFromArray(genericTypeArguments), toObjectFromArray(genericMethodArguments)); return new MethodBase(objResolveMethod); } catch (JCNativeException jcne) { throw translateException(jcne); } } public MethodInfo GetArrayMethod(NetType arrayClass, java.lang.String methodName, CallingConventions callingConvention, NetType returnType, NetType[] parameterTypes) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.NotSupportedException, system.InvalidOperationException, system.FormatException, system.IndexOutOfRangeException, system.RankException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetArrayMethod = (JCObject)classInstance.Invoke("GetArrayMethod", arrayClass == null ? null : arrayClass.getJCOInstance(), methodName, callingConvention == null ? null : callingConvention.getJCOInstance(), returnType == null ? null : returnType.getJCOInstance(), toObjectFromArray(parameterTypes)); return new MethodInfo(objGetArrayMethod); } catch (JCNativeException jcne) { throw translateException(jcne); } } public MethodInfo[] GetMethods(BindingFlags bindingFlags) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classInstance.Invoke("GetMethods", bindingFlags == null ? null : bindingFlags.getJCOInstance()); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(new MethodInfo(resultingObject)); } MethodInfo[] resultingArray = new MethodInfo[resultingArrayList.size()]; resultingArray = resultingArrayList.toArray(resultingArray); return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String ResolveString(int metadataToken) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Invoke("ResolveString", metadataToken); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetType GetType(java.lang.String className, boolean throwOnError, boolean ignoreCase) throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.NotSupportedException, system.IndexOutOfRangeException, system.ArgumentNullException, system.ArrayTypeMismatchException, system.OutOfMemoryException, system.globalization.CultureNotFoundException, system.runtime.interopservices.ExternalException, system.collections.generic.KeyNotFoundException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetType = (JCObject)classInstance.Invoke("GetType", className, throwOnError, ignoreCase); return new NetType(objGetType); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetType GetType(java.lang.String className, boolean ignoreCase) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetType = (JCObject)classInstance.Invoke("GetType", className, ignoreCase); return new NetType(objGetType); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetType GetType(java.lang.String className) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetType = (JCObject)classInstance.Invoke("GetType", className); return new NetType(objGetType); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetType ResolveType(int metadataToken, NetType[] genericTypeArguments, NetType[] genericMethodArguments) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objResolveType = (JCObject)classInstance.Invoke("ResolveType", metadataToken, toObjectFromArray(genericTypeArguments), toObjectFromArray(genericMethodArguments)); return new NetType(objResolveType); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetType[] GetTypes() throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentNullException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classInstance.Invoke("GetTypes"); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(new NetType(resultingObject)); } NetType[] resultingArray = new NetType[resultingArrayList.size()]; resultingArray = resultingArrayList.toArray(resultingArray); return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public void CreateGlobalFunctions() throws Throwable, system.PlatformNotSupportedException, system.ArgumentException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.NotSupportedException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("CreateGlobalFunctions"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void GetPEKind(JCORefOut peKind, JCORefOut machine) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("GetPEKind", peKind.getJCRefOut(), machine.getJCRefOut()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("SetCustomAttribute", con == null ? null : con.getJCOInstance(), binaryAttribute); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void SetCustomAttribute(ConstructorInfo dupParam0, JCORefOut dupParam1) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("SetCustomAttribute", dupParam0 == null ? null : dupParam0.getJCOInstance(), dupParam1.getJCRefOut()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void SetCustomAttribute(CustomAttributeBuilder customBuilder) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("SetCustomAttribute", customBuilder == null ? null : customBuilder.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Properties section // Instance Events section }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy