
system.reflection.metadata.MetadataReader Maven / Gradle / Ivy
/*
* MIT License
*
* Copyright (c) 2023 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.metadata;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;
// Import section
import system.reflection.metadata.BlobHandle;
import system.Guid;
import system.reflection.metadata.GuidHandle;
import system.reflection.metadata.AssemblyDefinition;
import system.reflection.metadata.AssemblyFile;
import system.reflection.metadata.AssemblyFileHandle;
import system.reflection.metadata.AssemblyReference;
import system.reflection.metadata.AssemblyReferenceHandle;
import system.reflection.metadata.BlobReader;
import system.reflection.metadata.StringHandle;
import system.reflection.metadata.Constant;
import system.reflection.metadata.ConstantHandle;
import system.reflection.metadata.CustomAttribute;
import system.reflection.metadata.CustomAttributeHandle;
import system.reflection.metadata.CustomAttributeHandleCollection;
import system.reflection.metadata.EntityHandle;
import system.reflection.metadata.CustomDebugInformation;
import system.reflection.metadata.CustomDebugInformationHandle;
import system.reflection.metadata.CustomDebugInformationHandleCollection;
import system.reflection.metadata.DeclarativeSecurityAttribute;
import system.reflection.metadata.DeclarativeSecurityAttributeHandle;
import system.reflection.metadata.Document;
import system.reflection.metadata.DocumentHandle;
import system.reflection.metadata.EventDefinition;
import system.reflection.metadata.EventDefinitionHandle;
import system.reflection.metadata.ExportedType;
import system.reflection.metadata.ExportedTypeHandle;
import system.reflection.metadata.FieldDefinition;
import system.reflection.metadata.FieldDefinitionHandle;
import system.reflection.metadata.GenericParameter;
import system.reflection.metadata.GenericParameterHandle;
import system.reflection.metadata.GenericParameterConstraint;
import system.reflection.metadata.GenericParameterConstraintHandle;
import system.reflection.metadata.ImportScope;
import system.reflection.metadata.ImportScopeHandle;
import system.reflection.metadata.InterfaceImplementation;
import system.reflection.metadata.InterfaceImplementationHandle;
import system.reflection.metadata.LocalConstant;
import system.reflection.metadata.LocalConstantHandle;
import system.reflection.metadata.LocalScope;
import system.reflection.metadata.LocalScopeHandle;
import system.reflection.metadata.LocalScopeHandleCollection;
import system.reflection.metadata.MethodDebugInformationHandle;
import system.reflection.metadata.MethodDefinitionHandle;
import system.reflection.metadata.LocalVariable;
import system.reflection.metadata.LocalVariableHandle;
import system.reflection.metadata.ManifestResource;
import system.reflection.metadata.ManifestResourceHandle;
import system.reflection.metadata.MemberReference;
import system.reflection.metadata.MemberReferenceHandle;
import system.reflection.metadata.MethodDebugInformation;
import system.reflection.metadata.MethodDefinition;
import system.reflection.metadata.MethodImplementation;
import system.reflection.metadata.MethodImplementationHandle;
import system.reflection.metadata.MethodSpecification;
import system.reflection.metadata.MethodSpecificationHandle;
import system.reflection.metadata.ModuleDefinition;
import system.reflection.metadata.ModuleReference;
import system.reflection.metadata.ModuleReferenceHandle;
import system.reflection.metadata.NamespaceDefinition;
import system.reflection.metadata.NamespaceDefinitionHandle;
import system.reflection.metadata.Parameter;
import system.reflection.metadata.ParameterHandle;
import system.reflection.metadata.PropertyDefinition;
import system.reflection.metadata.PropertyDefinitionHandle;
import system.reflection.metadata.StandaloneSignature;
import system.reflection.metadata.StandaloneSignatureHandle;
import system.reflection.metadata.TypeDefinition;
import system.reflection.metadata.TypeDefinitionHandle;
import system.reflection.metadata.TypeReference;
import system.reflection.metadata.TypeReferenceHandle;
import system.reflection.metadata.TypeSpecification;
import system.reflection.metadata.TypeSpecificationHandle;
import system.reflection.metadata.DocumentNameBlobHandle;
import system.reflection.metadata.UserStringHandle;
import system.reflection.metadata.AssemblyFileHandleCollection;
import system.reflection.metadata.AssemblyReferenceHandleCollection;
import system.reflection.metadata.DebugMetadataHeader;
import system.reflection.metadata.DeclarativeSecurityAttributeHandleCollection;
import system.reflection.metadata.DocumentHandleCollection;
import system.reflection.metadata.EventDefinitionHandleCollection;
import system.reflection.metadata.ExportedTypeHandleCollection;
import system.reflection.metadata.FieldDefinitionHandleCollection;
import system.reflection.metadata.ImportScopeCollection;
import system.reflection.metadata.LocalConstantHandleCollection;
import system.reflection.metadata.LocalVariableHandleCollection;
import system.reflection.metadata.ManifestResourceHandleCollection;
import system.reflection.metadata.MemberReferenceHandleCollection;
import system.reflection.metadata.MetadataKind;
import system.reflection.metadata.MetadataReaderOptions;
import system.reflection.metadata.MetadataStringComparer;
import system.reflection.metadata.MetadataStringDecoder;
import system.reflection.metadata.MethodDebugInformationHandleCollection;
import system.reflection.metadata.MethodDefinitionHandleCollection;
import system.reflection.metadata.PropertyDefinitionHandleCollection;
import system.reflection.metadata.TypeDefinitionHandleCollection;
import system.reflection.metadata.TypeReferenceHandleCollection;
/**
* The base .NET class managing System.Reflection.Metadata.MetadataReader, System.Reflection.Metadata, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
*
*
* .NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Reflection.Metadata.MetadataReader
*
*
* Powered by JCOBridge: more info at https://www.jcobridge.com
*/
public class MetadataReader extends NetObject {
/**
* Fully assembly qualified name: System.Reflection.Metadata, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
*/
public static final String assemblyFullName = "System.Reflection.Metadata, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
/**
* Assembly name: System.Reflection.Metadata
*/
public static final String assemblyShortName = "System.Reflection.Metadata";
/**
* Qualified class name: System.Reflection.Metadata.MetadataReader
*/
public static final String className = "System.Reflection.Metadata.MetadataReader";
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 MetadataReader(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 MetadataReader}, a cast assert is made to check if types are compatible.
* @param from {@link IJCOBridgeReflected} instance to be casted
* @return {@link MetadataReader} instance
* @throws java.lang.Throwable in case of error during cast operation
*/
public static MetadataReader cast(IJCOBridgeReflected from) throws Throwable {
NetType.AssertCast(classType, from);
return new MetadataReader(from.getJCOInstance());
}
// Constructors section
public MetadataReader() throws Throwable {
}
// Methods section
public byte[] GetBlobBytes(BlobHandle handle) throws Throwable, system.PlatformNotSupportedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.BadImageFormatException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
ArrayList resultingArrayList = new ArrayList();
JCObject resultingObjects = (JCObject)classInstance.Invoke("GetBlobBytes", handle == null ? null : handle.getJCOInstance());
for (java.lang.Object resultingObject : resultingObjects) {
resultingArrayList.add(resultingObject);
}
byte[] resultingArray = new byte[resultingArrayList.size()];
for(int indexGetBlobBytes = 0; indexGetBlobBytes < resultingArrayList.size(); indexGetBlobBytes++ ) {
resultingArray[indexGetBlobBytes] = (byte)resultingArrayList.get(indexGetBlobBytes);
}
return resultingArray;
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Guid GetGuid(GuidHandle handle) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.BadImageFormatException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetGuid = (JCObject)classInstance.Invoke("GetGuid", handle == null ? null : handle.getJCOInstance());
return new Guid(objGetGuid);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public AssemblyDefinition GetAssemblyDefinition() throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetAssemblyDefinition = (JCObject)classInstance.Invoke("GetAssemblyDefinition");
return new AssemblyDefinition(objGetAssemblyDefinition);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public AssemblyFile GetAssemblyFile(AssemblyFileHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetAssemblyFile = (JCObject)classInstance.Invoke("GetAssemblyFile", handle == null ? null : handle.getJCOInstance());
return new AssemblyFile(objGetAssemblyFile);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public AssemblyReference GetAssemblyReference(AssemblyReferenceHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetAssemblyReference = (JCObject)classInstance.Invoke("GetAssemblyReference", handle == null ? null : handle.getJCOInstance());
return new AssemblyReference(objGetAssemblyReference);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public BlobReader GetBlobReader(BlobHandle handle) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.PlatformNotSupportedException, system.ObjectDisposedException, system.ArgumentNullException, system.InvalidOperationException, system.BadImageFormatException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetBlobReader = (JCObject)classInstance.Invoke("GetBlobReader", handle == null ? null : handle.getJCOInstance());
return new BlobReader(objGetBlobReader);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public BlobReader GetBlobReader(StringHandle handle) throws Throwable, system.BadImageFormatException, system.ArgumentOutOfRangeException, system.ArgumentException, system.PlatformNotSupportedException, system.ObjectDisposedException, system.ArgumentNullException, system.InvalidOperationException, system.ArrayTypeMismatchException, system.FormatException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetBlobReader = (JCObject)classInstance.Invoke("GetBlobReader", handle == null ? null : handle.getJCOInstance());
return new BlobReader(objGetBlobReader);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Constant GetConstant(ConstantHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetConstant = (JCObject)classInstance.Invoke("GetConstant", handle == null ? null : handle.getJCOInstance());
return new Constant(objGetConstant);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public CustomAttribute GetCustomAttribute(CustomAttributeHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetCustomAttribute = (JCObject)classInstance.Invoke("GetCustomAttribute", handle == null ? null : handle.getJCOInstance());
return new CustomAttribute(objGetCustomAttribute);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public CustomAttributeHandleCollection GetCustomAttributes(EntityHandle handle) throws Throwable, system.BadImageFormatException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetCustomAttributes = (JCObject)classInstance.Invoke("GetCustomAttributes", handle == null ? null : handle.getJCOInstance());
return new CustomAttributeHandleCollection(objGetCustomAttributes);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public CustomDebugInformation GetCustomDebugInformation(CustomDebugInformationHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetCustomDebugInformation = (JCObject)classInstance.Invoke("GetCustomDebugInformation", handle == null ? null : handle.getJCOInstance());
return new CustomDebugInformation(objGetCustomDebugInformation);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public CustomDebugInformationHandleCollection GetCustomDebugInformation(EntityHandle handle) throws Throwable, system.BadImageFormatException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetCustomDebugInformation = (JCObject)classInstance.Invoke("GetCustomDebugInformation", handle == null ? null : handle.getJCOInstance());
return new CustomDebugInformationHandleCollection(objGetCustomDebugInformation);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DeclarativeSecurityAttribute GetDeclarativeSecurityAttribute(DeclarativeSecurityAttributeHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetDeclarativeSecurityAttribute = (JCObject)classInstance.Invoke("GetDeclarativeSecurityAttribute", handle == null ? null : handle.getJCOInstance());
return new DeclarativeSecurityAttribute(objGetDeclarativeSecurityAttribute);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Document GetDocument(DocumentHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetDocument = (JCObject)classInstance.Invoke("GetDocument", handle == null ? null : handle.getJCOInstance());
return new Document(objGetDocument);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public EventDefinition GetEventDefinition(EventDefinitionHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetEventDefinition = (JCObject)classInstance.Invoke("GetEventDefinition", handle == null ? null : handle.getJCOInstance());
return new EventDefinition(objGetEventDefinition);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public ExportedType GetExportedType(ExportedTypeHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetExportedType = (JCObject)classInstance.Invoke("GetExportedType", handle == null ? null : handle.getJCOInstance());
return new ExportedType(objGetExportedType);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public FieldDefinition GetFieldDefinition(FieldDefinitionHandle handle) throws Throwable, system.BadImageFormatException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.InvalidCastException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetFieldDefinition = (JCObject)classInstance.Invoke("GetFieldDefinition", handle == null ? null : handle.getJCOInstance());
return new FieldDefinition(objGetFieldDefinition);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public GenericParameter GetGenericParameter(GenericParameterHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetGenericParameter = (JCObject)classInstance.Invoke("GetGenericParameter", handle == null ? null : handle.getJCOInstance());
return new GenericParameter(objGetGenericParameter);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public GenericParameterConstraint GetGenericParameterConstraint(GenericParameterConstraintHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetGenericParameterConstraint = (JCObject)classInstance.Invoke("GetGenericParameterConstraint", handle == null ? null : handle.getJCOInstance());
return new GenericParameterConstraint(objGetGenericParameterConstraint);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public ImportScope GetImportScope(ImportScopeHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetImportScope = (JCObject)classInstance.Invoke("GetImportScope", handle == null ? null : handle.getJCOInstance());
return new ImportScope(objGetImportScope);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public InterfaceImplementation GetInterfaceImplementation(InterfaceImplementationHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetInterfaceImplementation = (JCObject)classInstance.Invoke("GetInterfaceImplementation", handle == null ? null : handle.getJCOInstance());
return new InterfaceImplementation(objGetInterfaceImplementation);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public LocalConstant GetLocalConstant(LocalConstantHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetLocalConstant = (JCObject)classInstance.Invoke("GetLocalConstant", handle == null ? null : handle.getJCOInstance());
return new LocalConstant(objGetLocalConstant);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public LocalScope GetLocalScope(LocalScopeHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetLocalScope = (JCObject)classInstance.Invoke("GetLocalScope", handle == null ? null : handle.getJCOInstance());
return new LocalScope(objGetLocalScope);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public LocalScopeHandleCollection GetLocalScopes(MethodDebugInformationHandle handle) throws Throwable, system.BadImageFormatException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetLocalScopes = (JCObject)classInstance.Invoke("GetLocalScopes", handle == null ? null : handle.getJCOInstance());
return new LocalScopeHandleCollection(objGetLocalScopes);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public LocalScopeHandleCollection GetLocalScopes(MethodDefinitionHandle handle) throws Throwable, system.BadImageFormatException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetLocalScopes = (JCObject)classInstance.Invoke("GetLocalScopes", handle == null ? null : handle.getJCOInstance());
return new LocalScopeHandleCollection(objGetLocalScopes);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public LocalVariable GetLocalVariable(LocalVariableHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetLocalVariable = (JCObject)classInstance.Invoke("GetLocalVariable", handle == null ? null : handle.getJCOInstance());
return new LocalVariable(objGetLocalVariable);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public ManifestResource GetManifestResource(ManifestResourceHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetManifestResource = (JCObject)classInstance.Invoke("GetManifestResource", handle == null ? null : handle.getJCOInstance());
return new ManifestResource(objGetManifestResource);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public MemberReference GetMemberReference(MemberReferenceHandle handle) throws Throwable, system.BadImageFormatException, system.InvalidCastException, system.PlatformNotSupportedException, system.ObjectDisposedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentException, system.IndexOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetMemberReference = (JCObject)classInstance.Invoke("GetMemberReference", handle == null ? null : handle.getJCOInstance());
return new MemberReference(objGetMemberReference);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public MethodDebugInformation GetMethodDebugInformation(MethodDebugInformationHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetMethodDebugInformation = (JCObject)classInstance.Invoke("GetMethodDebugInformation", handle == null ? null : handle.getJCOInstance());
return new MethodDebugInformation(objGetMethodDebugInformation);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public MethodDebugInformation GetMethodDebugInformation(MethodDefinitionHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetMethodDebugInformation = (JCObject)classInstance.Invoke("GetMethodDebugInformation", handle == null ? null : handle.getJCOInstance());
return new MethodDebugInformation(objGetMethodDebugInformation);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public MethodDefinition GetMethodDefinition(MethodDefinitionHandle handle) throws Throwable, system.BadImageFormatException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.InvalidCastException, system.ArgumentException, system.ObjectDisposedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetMethodDefinition = (JCObject)classInstance.Invoke("GetMethodDefinition", handle == null ? null : handle.getJCOInstance());
return new MethodDefinition(objGetMethodDefinition);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public MethodImplementation GetMethodImplementation(MethodImplementationHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetMethodImplementation = (JCObject)classInstance.Invoke("GetMethodImplementation", handle == null ? null : handle.getJCOInstance());
return new MethodImplementation(objGetMethodImplementation);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public MethodSpecification GetMethodSpecification(MethodSpecificationHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetMethodSpecification = (JCObject)classInstance.Invoke("GetMethodSpecification", handle == null ? null : handle.getJCOInstance());
return new MethodSpecification(objGetMethodSpecification);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public ModuleDefinition GetModuleDefinition() throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetModuleDefinition = (JCObject)classInstance.Invoke("GetModuleDefinition");
return new ModuleDefinition(objGetModuleDefinition);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public ModuleReference GetModuleReference(ModuleReferenceHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetModuleReference = (JCObject)classInstance.Invoke("GetModuleReference", handle == null ? null : handle.getJCOInstance());
return new ModuleReference(objGetModuleReference);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public NamespaceDefinition GetNamespaceDefinition(NamespaceDefinitionHandle handle) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.IndexOutOfRangeException, system.RankException, system.ArrayTypeMismatchException, system.InvalidCastException, system.PlatformNotSupportedException, system.BadImageFormatException, system.collections.generic.KeyNotFoundException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetNamespaceDefinition = (JCObject)classInstance.Invoke("GetNamespaceDefinition", handle == null ? null : handle.getJCOInstance());
return new NamespaceDefinition(objGetNamespaceDefinition);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public NamespaceDefinition GetNamespaceDefinitionRoot() throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.IndexOutOfRangeException, system.RankException, system.ArrayTypeMismatchException, system.InvalidCastException, system.PlatformNotSupportedException, system.BadImageFormatException, system.collections.generic.KeyNotFoundException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetNamespaceDefinitionRoot = (JCObject)classInstance.Invoke("GetNamespaceDefinitionRoot");
return new NamespaceDefinition(objGetNamespaceDefinitionRoot);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Parameter GetParameter(ParameterHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetParameter = (JCObject)classInstance.Invoke("GetParameter", handle == null ? null : handle.getJCOInstance());
return new Parameter(objGetParameter);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public PropertyDefinition GetPropertyDefinition(PropertyDefinitionHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetPropertyDefinition = (JCObject)classInstance.Invoke("GetPropertyDefinition", handle == null ? null : handle.getJCOInstance());
return new PropertyDefinition(objGetPropertyDefinition);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public StandaloneSignature GetStandaloneSignature(StandaloneSignatureHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetStandaloneSignature = (JCObject)classInstance.Invoke("GetStandaloneSignature", handle == null ? null : handle.getJCOInstance());
return new StandaloneSignature(objGetStandaloneSignature);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TypeDefinition GetTypeDefinition(TypeDefinitionHandle handle) throws Throwable, system.BadImageFormatException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ArgumentException, system.InvalidCastException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetTypeDefinition = (JCObject)classInstance.Invoke("GetTypeDefinition", handle == null ? null : handle.getJCOInstance());
return new TypeDefinition(objGetTypeDefinition);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TypeReference GetTypeReference(TypeReferenceHandle handle) throws Throwable, system.BadImageFormatException, system.IndexOutOfRangeException, system.PlatformNotSupportedException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetTypeReference = (JCObject)classInstance.Invoke("GetTypeReference", handle == null ? null : handle.getJCOInstance());
return new TypeReference(objGetTypeReference);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TypeSpecification GetTypeSpecification(TypeSpecificationHandle handle) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetTypeSpecification = (JCObject)classInstance.Invoke("GetTypeSpecification", handle == null ? null : handle.getJCOInstance());
return new TypeSpecification(objGetTypeSpecification);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String GetString(DocumentNameBlobHandle handle) throws Throwable, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.ArgumentException, system.ObjectDisposedException, system.ArgumentNullException, system.InvalidOperationException, system.BadImageFormatException, system.IndexOutOfRangeException, system.FormatException, system.OutOfMemoryException, system.NotSupportedException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("GetString", handle == null ? null : handle.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String GetString(NamespaceDefinitionHandle handle) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.BadImageFormatException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.RankException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.InvalidOperationException, system.FormatException, system.collections.generic.KeyNotFoundException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("GetString", handle == null ? null : handle.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String GetString(StringHandle handle) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.BadImageFormatException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.RankException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.InvalidOperationException, system.FormatException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("GetString", handle == null ? null : handle.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String GetUserString(UserStringHandle handle) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.BadImageFormatException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.RankException, system.ArrayTypeMismatchException, system.InvalidOperationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("GetUserString", handle == null ? null : handle.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Properties section
public boolean getIsAssembly() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (boolean)classInstance.Get("IsAssembly");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getMetadataLength() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("MetadataLength");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public AssemblyFileHandleCollection getAssemblyFiles() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("AssemblyFiles");
return new AssemblyFileHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public AssemblyReferenceHandleCollection getAssemblyReferences() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("AssemblyReferences");
return new AssemblyReferenceHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public CustomAttributeHandleCollection getCustomAttributes() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("CustomAttributes");
return new CustomAttributeHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public CustomDebugInformationHandleCollection getCustomDebugInformation() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("CustomDebugInformation");
return new CustomDebugInformationHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DebugMetadataHeader getDebugMetadataHeader() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("DebugMetadataHeader");
return new DebugMetadataHeader(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DeclarativeSecurityAttributeHandleCollection getDeclarativeSecurityAttributes() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("DeclarativeSecurityAttributes");
return new DeclarativeSecurityAttributeHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DocumentHandleCollection getDocuments() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("Documents");
return new DocumentHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public EventDefinitionHandleCollection getEventDefinitions() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("EventDefinitions");
return new EventDefinitionHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public ExportedTypeHandleCollection getExportedTypes() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("ExportedTypes");
return new ExportedTypeHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public FieldDefinitionHandleCollection getFieldDefinitions() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("FieldDefinitions");
return new FieldDefinitionHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public ImportScopeCollection getImportScopes() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("ImportScopes");
return new ImportScopeCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public LocalConstantHandleCollection getLocalConstants() throws Throwable, system.BadImageFormatException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("LocalConstants");
return new LocalConstantHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public LocalScopeHandleCollection getLocalScopes() throws Throwable, system.BadImageFormatException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("LocalScopes");
return new LocalScopeHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public LocalVariableHandleCollection getLocalVariables() throws Throwable, system.BadImageFormatException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("LocalVariables");
return new LocalVariableHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public ManifestResourceHandleCollection getManifestResources() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("ManifestResources");
return new ManifestResourceHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public MemberReferenceHandleCollection getMemberReferences() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("MemberReferences");
return new MemberReferenceHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public MetadataKind getMetadataKind() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("MetadataKind");
return new MetadataKind(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public MetadataReaderOptions getOptions() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("Options");
return new MetadataReaderOptions(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public MetadataStringComparer getStringComparer() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("StringComparer");
return new MetadataStringComparer(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public MetadataStringDecoder getUTF8Decoder() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("UTF8Decoder");
return new MetadataStringDecoder(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public MethodDebugInformationHandleCollection getMethodDebugInformation() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("MethodDebugInformation");
return new MethodDebugInformationHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public MethodDefinitionHandleCollection getMethodDefinitions() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("MethodDefinitions");
return new MethodDefinitionHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public PropertyDefinitionHandleCollection getPropertyDefinitions() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("PropertyDefinitions");
return new PropertyDefinitionHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TypeDefinitionHandleCollection getTypeDefinitions() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("TypeDefinitions");
return new TypeDefinitionHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TypeReferenceHandleCollection getTypeReferences() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("TypeReferences");
return new TypeReferenceHandleCollection(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String getMetadataVersion() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Get("MetadataVersion");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Instance Events section
}