microsoft.jscript.IDebugConvertImplementation Maven / Gradle / Ivy
/*
* MIT License
*
* Copyright (c) 2024 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 v. 1.14.0.0
*
* 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 microsoft.jscript;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;
// Import section
import system.UInt16;
import system.UInt64;
import system.TypeCode;
import microsoft.jscript.vsa.IJSVsaEngine;
import microsoft.jscript.vsa.IJSVsaEngineImplementation;
import system.SByte;
import system.Single;
import system.UInt32;
/**
* The base .NET class managing Microsoft.JScript.IDebugConvert, Microsoft.JScript, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
*
*
* .NET documentation at https://docs.microsoft.com/en-us/dotnet/api/Microsoft.JScript.IDebugConvert
*
*
* Powered by JCOBridge: more info at https://www.jcobridge.com
*
* @author MASES s.r.l https://masesgroup.com
* @version 1.14.0.0
*/
public class IDebugConvertImplementation extends NetObject implements IDebugConvert {
/**
* Fully assembly qualified name: Microsoft.JScript, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
*/
public static final String assemblyFullName = "Microsoft.JScript, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
/**
* Assembly name: Microsoft.JScript
*/
public static final String assemblyShortName = "Microsoft.JScript";
/**
* Qualified class name: Microsoft.JScript.IDebugConvert
*/
public static final String className = "Microsoft.JScript.IDebugConvert";
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 IDebugConvertImplementation(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 JCType getJCOType() {
return classType;
}
/**
* Try to cast the {@link IJCOBridgeReflected} instance into {@link IDebugConvert}, a cast assert is made to check if types are compatible.
* @param from {@link IJCOBridgeReflected} instance to be casted
* @return {@link IDebugConvert} instance
* @throws java.lang.Throwable in case of error during cast operation
*/
public static IDebugConvert ToIDebugConvert(IJCOBridgeReflected from) throws Throwable {
NetType.AssertCast(classType, from);
return new IDebugConvertImplementation(from.getJCOInstance());
}
// Methods section
public NetObject GetManagedCharObject(UInt16 i) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetManagedCharObject = (JCObject)classInstance.Invoke("GetManagedCharObject", i == null ? null : i.getJCOInstance());
return new NetObject(objGetManagedCharObject);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public NetObject GetManagedInt64Object(long i) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetManagedInt64Object = (JCObject)classInstance.Invoke("GetManagedInt64Object", i);
return new NetObject(objGetManagedInt64Object);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public NetObject GetManagedObject(NetObject value) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetManagedObject = (JCObject)classInstance.Invoke("GetManagedObject", value == null ? null : value.getJCOInstance());
return new NetObject(objGetManagedObject);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public NetObject GetManagedUInt64Object(UInt64 i) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objGetManagedUInt64Object = (JCObject)classInstance.Invoke("GetManagedUInt64Object", i == null ? null : i.getJCOInstance());
return new NetObject(objGetManagedUInt64Object);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public NetObject ToPrimitive(NetObject value, TypeCode typeCode, boolean truncationPermitted) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objToPrimitive = (JCObject)classInstance.Invoke("ToPrimitive", value == null ? null : value.getJCOInstance(), typeCode == null ? null : typeCode.getJCOInstance(), truncationPermitted);
return new NetObject(objToPrimitive);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String BooleanToString(boolean value) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("BooleanToString", value);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String ByteToString(byte value, int radix) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("ByteToString", value, radix);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String DoubleToDateString(double value) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("DoubleToDateString", value);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String DoubleToString(double value) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("DoubleToString", value);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String GetErrorMessageForHR(int hr, IJSVsaEngine engine) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("GetErrorMessageForHR", hr, engine == null ? null : engine.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String Int16ToString(short value, int radix) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("Int16ToString", value, radix);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String Int32ToString(int value, int radix) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("Int32ToString", value, radix);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String Int64ToString(long value, int radix) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("Int64ToString", value, radix);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String RegexpToString(java.lang.String source, boolean ignoreCase, boolean global, boolean multiline) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("RegexpToString", source, ignoreCase, global, multiline);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String SByteToString(SByte value, int radix) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("SByteToString", value == null ? null : value.getJCOInstance(), radix);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String SingleToString(Single value) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("SingleToString", value == null ? null : value.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String StringToPrintable(java.lang.String source) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("StringToPrintable", source);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String UInt16ToString(UInt16 value, int radix) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("UInt16ToString", value == null ? null : value.getJCOInstance(), radix);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String UInt32ToString(UInt32 value, int radix) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("UInt32ToString", value == null ? null : value.getJCOInstance(), radix);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String UInt64ToString(UInt64 value, int radix) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("UInt64ToString", value == null ? null : value.getJCOInstance(), radix);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Properties section
// Instance Events section
}