system.runtime.interopservices.UCOMIMonikerImplementation 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 system.runtime.interopservices;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;
// Import section
import system.runtime.interopservices.UCOMIBindCtx;
import system.runtime.interopservices.UCOMIBindCtxImplementation;
import system.runtime.interopservices.UCOMIMoniker;
import system.runtime.interopservices.UCOMIMonikerImplementation;
import system.Guid;
import system.runtime.interopservices.UCOMIEnumMoniker;
import system.runtime.interopservices.UCOMIEnumMonikerImplementation;
import system.runtime.interopservices.FILETIME;
import system.runtime.interopservices.UCOMIStream;
import system.runtime.interopservices.UCOMIStreamImplementation;
/**
* The base .NET class managing System.Runtime.InteropServices.UCOMIMoniker, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
*
*
* .NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Runtime.InteropServices.UCOMIMoniker
*
*
* 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 UCOMIMonikerImplementation extends NetObject implements UCOMIMoniker {
/**
* Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
*/
public static final String assemblyFullName = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
/**
* Assembly name: mscorlib
*/
public static final String assemblyShortName = "mscorlib";
/**
* Qualified class name: System.Runtime.InteropServices.UCOMIMoniker
*/
public static final String className = "System.Runtime.InteropServices.UCOMIMoniker";
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 UCOMIMonikerImplementation(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 UCOMIMoniker}, a cast assert is made to check if types are compatible.
* @param from {@link IJCOBridgeReflected} instance to be casted
* @return {@link UCOMIMoniker} instance
* @throws java.lang.Throwable in case of error during cast operation
*/
public static UCOMIMoniker ToUCOMIMoniker(IJCOBridgeReflected from) throws Throwable {
NetType.AssertCast(classType, from);
return new UCOMIMonikerImplementation(from.getJCOInstance());
}
// Methods section
public int IsDirty() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Invoke("IsDirty");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void BindToObject(UCOMIBindCtx pbc, UCOMIMoniker pmkToLeft, JCORefOut riidResult, JCORefOut ppvResult) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("BindToObject", pbc == null ? null : pbc.getJCOInstance(), pmkToLeft == null ? null : pmkToLeft.getJCOInstance(), riidResult.getJCRefOut(), ppvResult.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void BindToStorage(UCOMIBindCtx pbc, UCOMIMoniker pmkToLeft, JCORefOut riid, JCORefOut ppvObj) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("BindToStorage", pbc == null ? null : pbc.getJCOInstance(), pmkToLeft == null ? null : pmkToLeft.getJCOInstance(), riid.getJCRefOut(), ppvObj.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void CommonPrefixWith(UCOMIMoniker pmkOther, JCORefOut ppmkPrefix) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("CommonPrefixWith", pmkOther == null ? null : pmkOther.getJCOInstance(), ppmkPrefix.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void ComposeWith(UCOMIMoniker pmkRight, boolean fOnlyIfNotGeneric, JCORefOut ppmkComposite) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("ComposeWith", pmkRight == null ? null : pmkRight.getJCOInstance(), fOnlyIfNotGeneric, ppmkComposite.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Enum(boolean fForward, JCORefOut ppenumMoniker) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Enum", fForward, ppenumMoniker.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void GetClassID(JCORefOut pClassID) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("GetClassID", pClassID.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void GetDisplayName(UCOMIBindCtx pbc, UCOMIMoniker pmkToLeft, JCORefOut ppszDisplayName) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("GetDisplayName", pbc == null ? null : pbc.getJCOInstance(), pmkToLeft == null ? null : pmkToLeft.getJCOInstance(), ppszDisplayName.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void GetSizeMax(JCORefOut pcbSize) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("GetSizeMax", pcbSize.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void GetTimeOfLastChange(UCOMIBindCtx pbc, UCOMIMoniker pmkToLeft, JCORefOut pFileTime) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("GetTimeOfLastChange", pbc == null ? null : pbc.getJCOInstance(), pmkToLeft == null ? null : pmkToLeft.getJCOInstance(), pFileTime.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Hash(JCORefOut pdwHash) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Hash", pdwHash.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Inverse(JCORefOut ppmk) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Inverse", ppmk.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void IsEqual(UCOMIMoniker pmkOtherMoniker) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("IsEqual", pmkOtherMoniker == null ? null : pmkOtherMoniker.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void IsRunning(UCOMIBindCtx pbc, UCOMIMoniker pmkToLeft, UCOMIMoniker pmkNewlyRunning) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("IsRunning", pbc == null ? null : pbc.getJCOInstance(), pmkToLeft == null ? null : pmkToLeft.getJCOInstance(), pmkNewlyRunning == null ? null : pmkNewlyRunning.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void IsSystemMoniker(JCORefOut pdwMksys) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("IsSystemMoniker", pdwMksys.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Load(UCOMIStream pStm) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Load", pStm == null ? null : pStm.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void ParseDisplayName(UCOMIBindCtx pbc, UCOMIMoniker pmkToLeft, java.lang.String pszDisplayName, JCORefOut pchEaten, JCORefOut ppmkOut) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("ParseDisplayName", pbc == null ? null : pbc.getJCOInstance(), pmkToLeft == null ? null : pmkToLeft.getJCOInstance(), pszDisplayName, pchEaten.getJCRefOut(), ppmkOut.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Reduce(UCOMIBindCtx pbc, int dwReduceHowFar, JCORefOut ppmkToLeft, JCORefOut ppmkReduced) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Reduce", pbc == null ? null : pbc.getJCOInstance(), dwReduceHowFar, ppmkToLeft.getJCRefOut(), ppmkReduced.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void RelativePathTo(UCOMIMoniker pmkOther, JCORefOut ppmkRelPath) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("RelativePathTo", pmkOther == null ? null : pmkOther.getJCOInstance(), ppmkRelPath.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Save(UCOMIStream pStm, boolean fClearDirty) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Save", pStm == null ? null : pStm.getJCOInstance(), fClearDirty);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Properties section
// Instance Events section
}