
system.TimeOnly 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.15.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;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;
// Import section
import system.ValueType;
import system.TimeOnly;
import system.IFormatProvider;
import system.IFormatProviderImplementation;
import system.globalization.DateTimeStyles;
import system.TimeSpan;
import system.DateTime;
/**
* The base .NET class managing System.TimeOnly, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e.
*
*
* .NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.TimeOnly
*
*
* Powered by JCOBridge: more info at https://www.jcobridge.com
*
* @author MASES s.r.l https://masesgroup.com
* @version 1.15.0.0
*/
public class TimeOnly extends ValueType {
/**
* Fully assembly qualified name: System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
*/
public static final String assemblyFullName = "System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e";
/**
* Assembly name: System.Private.CoreLib
*/
public static final String assemblyShortName = "System.Private.CoreLib";
/**
* Qualified class name: System.TimeOnly
*/
public static final String className = "System.TimeOnly";
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 TimeOnly(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 TimeOnly}, a cast assert is made to check if types are compatible.
* @param from {@link IJCOBridgeReflected} instance to be casted
* @return {@link TimeOnly} instance
* @throws java.lang.Throwable in case of error during cast operation
*/
public static TimeOnly cast(IJCOBridgeReflected from) throws Throwable {
NetType.AssertCast(classType, from);
return new TimeOnly(from.getJCOInstance());
}
// Constructors section
public TimeOnly() throws Throwable {
}
public TimeOnly(int hour, int minute, int second, int millisecond, int microsecond) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.FormatException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(hour, minute, second, millisecond, microsecond));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeOnly(int hour, int minute, int second, int millisecond) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.FormatException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(hour, minute, second, millisecond));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeOnly(int hour, int minute, int second) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.FormatException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(hour, minute, second));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeOnly(int hour, int minute) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.FormatException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(hour, minute));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeOnly(long ticks) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.IndexOutOfRangeException, system.RankException, system.globalization.CultureNotFoundException, system.ObjectDisposedException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(ticks));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Methods section
public boolean Equals(TimeOnly value) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (boolean)classInstance.Invoke("Equals", value == null ? null : value.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public boolean IsBetween(TimeOnly start, TimeOnly end) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (boolean)classInstance.Invoke("IsBetween", start == null ? null : start.getJCOInstance(), end == null ? null : end.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static boolean TryParse(java.lang.String s, IFormatProvider provider, DateTimeStyles style, JCORefOut result) throws Throwable, system.PlatformNotSupportedException, system.NullReferenceException, system.NotSupportedException, system.ArgumentException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.ArgumentNullException, system.InvalidOperationException, system.globalization.CultureNotFoundException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException, system.OverflowException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
return (boolean)classType.Invoke("TryParse", s, provider == null ? null : provider.getJCOInstance(), style == null ? null : style.getJCOInstance(), result.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static boolean TryParse(java.lang.String s, IFormatProvider provider, JCORefOut result) throws Throwable, system.PlatformNotSupportedException, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.globalization.CultureNotFoundException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
return (boolean)classType.Invoke("TryParse", s, provider == null ? null : provider.getJCOInstance(), result.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static boolean TryParse(java.lang.String s, JCORefOut result) throws Throwable, system.PlatformNotSupportedException, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.globalization.CultureNotFoundException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
return (boolean)classType.Invoke("TryParse", s, result.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static boolean TryParseExact(java.lang.String s, java.lang.String format, IFormatProvider provider, DateTimeStyles style, JCORefOut result) throws Throwable, system.NotSupportedException, system.ArgumentException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.RankException, system.ArrayTypeMismatchException, system.TypeInitializationException, system.NullReferenceException, system.OverflowException, system.InvalidOperationException, system.OutOfMemoryException, system.FormatException, system.globalization.CultureNotFoundException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
return (boolean)classType.Invoke("TryParseExact", s, format, provider == null ? null : provider.getJCOInstance(), style == null ? null : style.getJCOInstance(), result.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static boolean TryParseExact(java.lang.String s, java.lang.String format, JCORefOut result) throws Throwable, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.RankException, system.ArgumentException, system.ArrayTypeMismatchException, system.TypeInitializationException, system.NullReferenceException, system.NotSupportedException, system.OverflowException, system.InvalidOperationException, system.ArgumentNullException, system.FormatException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
return (boolean)classType.Invoke("TryParseExact", s, format, result.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static boolean TryParseExact(java.lang.String s, java.lang.String[] formats, IFormatProvider provider, DateTimeStyles style, JCORefOut result) throws Throwable, system.PlatformNotSupportedException, system.NullReferenceException, system.NotSupportedException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException, system.ArgumentException, system.OverflowException, system.InvalidOperationException, system.ArgumentNullException, system.OutOfMemoryException, system.FormatException, system.globalization.CultureNotFoundException, system.ArrayTypeMismatchException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
return (boolean)classType.Invoke("TryParseExact", s, formats, provider == null ? null : provider.getJCOInstance(), style == null ? null : style.getJCOInstance(), result.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static boolean TryParseExact(java.lang.String s, java.lang.String[] formats, JCORefOut result) throws Throwable, system.PlatformNotSupportedException, system.NotSupportedException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException, system.OverflowException, system.ArgumentException, system.InvalidOperationException, system.ArgumentNullException, system.FormatException, system.ArrayTypeMismatchException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
return (boolean)classType.Invoke("TryParseExact", s, formats, result.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int CompareTo(NetObject value) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.IndexOutOfRangeException, system.RankException, system.globalization.CultureNotFoundException, system.ObjectDisposedException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Invoke("CompareTo", value == null ? null : value.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int CompareTo(TimeOnly value) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Invoke("CompareTo", value == null ? null : value.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String ToLongTimeString() throws Throwable, system.NotSupportedException, system.ArgumentException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.OutOfMemoryException, system.FormatException, system.InvalidOperationException, system.globalization.CultureNotFoundException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("ToLongTimeString");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String ToShortTimeString() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("ToShortTimeString");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String ToString(IFormatProvider provider) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArgumentNullException, system.OutOfMemoryException, system.FormatException, system.globalization.CultureNotFoundException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("ToString", provider == null ? null : provider.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String ToString(java.lang.String format, IFormatProvider provider) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NullReferenceException, system.OutOfMemoryException, system.security.SecurityException, system.OverflowException, system.FormatException, system.globalization.CultureNotFoundException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("ToString", format, provider == null ? null : provider.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String ToString(java.lang.String format) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArgumentNullException, system.OutOfMemoryException, system.FormatException, system.globalization.CultureNotFoundException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("ToString", format);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeOnly Add(TimeSpan value, JCORefOut wrappedDays) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.IndexOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAdd = (JCObject)classInstance.Invoke("Add", value == null ? null : value.getJCOInstance(), wrappedDays.getJCRefOut());
return new TimeOnly(objAdd);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeOnly Add(TimeSpan value) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.IndexOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAdd = (JCObject)classInstance.Invoke("Add", value == null ? null : value.getJCOInstance());
return new TimeOnly(objAdd);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeOnly AddHours(double value, JCORefOut wrappedDays) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.IndexOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAddHours = (JCObject)classInstance.Invoke("AddHours", value, wrappedDays.getJCRefOut());
return new TimeOnly(objAddHours);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeOnly AddHours(double value) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.IndexOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAddHours = (JCObject)classInstance.Invoke("AddHours", value);
return new TimeOnly(objAddHours);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeOnly AddMinutes(double value, JCORefOut wrappedDays) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.IndexOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAddMinutes = (JCObject)classInstance.Invoke("AddMinutes", value, wrappedDays.getJCRefOut());
return new TimeOnly(objAddMinutes);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeOnly AddMinutes(double value) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.IndexOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAddMinutes = (JCObject)classInstance.Invoke("AddMinutes", value);
return new TimeOnly(objAddMinutes);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static TimeOnly FromDateTime(DateTime dateTime) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objFromDateTime = (JCObject)classType.Invoke("FromDateTime", dateTime == null ? null : dateTime.getJCOInstance());
return new TimeOnly(objFromDateTime);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static TimeOnly FromTimeSpan(TimeSpan timeSpan) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objFromTimeSpan = (JCObject)classType.Invoke("FromTimeSpan", timeSpan == null ? null : timeSpan.getJCOInstance());
return new TimeOnly(objFromTimeSpan);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static TimeOnly Parse(java.lang.String s, IFormatProvider provider, DateTimeStyles style) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.RankException, system.IndexOutOfRangeException, system.NullReferenceException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.OverflowException, system.FormatException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParse = (JCObject)classType.Invoke("Parse", s, provider == null ? null : provider.getJCOInstance(), style == null ? null : style.getJCOInstance());
return new TimeOnly(objParse);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static TimeOnly Parse(java.lang.String s, IFormatProvider provider) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.ArgumentNullException, system.globalization.CultureNotFoundException, system.IndexOutOfRangeException, system.FormatException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParse = (JCObject)classType.Invoke("Parse", s, provider == null ? null : provider.getJCOInstance());
return new TimeOnly(objParse);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static TimeOnly Parse(java.lang.String s) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.ArgumentNullException, system.globalization.CultureNotFoundException, system.IndexOutOfRangeException, system.FormatException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParse = (JCObject)classType.Invoke("Parse", s);
return new TimeOnly(objParse);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static TimeOnly ParseExact(java.lang.String s, java.lang.String format, IFormatProvider provider, DateTimeStyles style) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.RankException, system.IndexOutOfRangeException, system.TypeInitializationException, system.NullReferenceException, system.OverflowException, system.OutOfMemoryException, system.FormatException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParseExact = (JCObject)classType.Invoke("ParseExact", s, format, provider == null ? null : provider.getJCOInstance(), style == null ? null : style.getJCOInstance());
return new TimeOnly(objParseExact);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static TimeOnly ParseExact(java.lang.String s, java.lang.String format) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.ArgumentNullException, system.IndexOutOfRangeException, system.TypeInitializationException, system.NullReferenceException, system.OverflowException, system.FormatException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParseExact = (JCObject)classType.Invoke("ParseExact", s, format);
return new TimeOnly(objParseExact);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static TimeOnly ParseExact(java.lang.String s, java.lang.String[] formats, IFormatProvider provider, DateTimeStyles style) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.RankException, system.IndexOutOfRangeException, system.NullReferenceException, system.OverflowException, system.OutOfMemoryException, system.FormatException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParseExact = (JCObject)classType.Invoke("ParseExact", s, formats, provider == null ? null : provider.getJCOInstance(), style == null ? null : style.getJCOInstance());
return new TimeOnly(objParseExact);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static TimeOnly ParseExact(java.lang.String dupParam0, JCORefOut dupParam1, IFormatProvider dupParam2, DateTimeStyles dupParam3) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.RankException, system.IndexOutOfRangeException, system.NullReferenceException, system.OverflowException, system.OutOfMemoryException, system.FormatException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParseExact = (JCObject)classType.Invoke("ParseExact", dupParam0, dupParam1.getJCRefOut(), dupParam2 == null ? null : dupParam2.getJCOInstance(), dupParam3 == null ? null : dupParam3.getJCOInstance());
return new TimeOnly(objParseExact);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static TimeOnly ParseExact(java.lang.String s, java.lang.String[] formats) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.ArgumentNullException, system.IndexOutOfRangeException, system.OverflowException, system.FormatException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParseExact = (JCObject)classType.Invoke("ParseExact", s, formats);
return new TimeOnly(objParseExact);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static TimeOnly ParseExact(java.lang.String dupParam0, JCORefOut dupParam1) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.ArgumentNullException, system.IndexOutOfRangeException, system.OverflowException, system.FormatException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParseExact = (JCObject)classType.Invoke("ParseExact", dupParam0, dupParam1.getJCRefOut());
return new TimeOnly(objParseExact);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeSpan ToTimeSpan() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objToTimeSpan = (JCObject)classInstance.Invoke("ToTimeSpan");
return new TimeSpan(objToTimeSpan);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Deconstruct(JCORefOut hour, JCORefOut minute, JCORefOut second, JCORefOut millisecond, JCORefOut microsecond) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Deconstruct", hour.getJCRefOut(), minute.getJCRefOut(), second.getJCRefOut(), millisecond.getJCRefOut(), microsecond.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Deconstruct(JCORefOut hour, JCORefOut minute, JCORefOut second, JCORefOut millisecond) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Deconstruct", hour.getJCRefOut(), minute.getJCRefOut(), second.getJCRefOut(), millisecond.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Deconstruct(JCORefOut hour, JCORefOut minute, JCORefOut second) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Deconstruct", hour.getJCRefOut(), minute.getJCRefOut(), second.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Deconstruct(JCORefOut hour, JCORefOut minute) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Deconstruct", hour.getJCRefOut(), minute.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Properties section
public int getHour() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("Hour");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getMicrosecond() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("Microsecond");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getMillisecond() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("Millisecond");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getMinute() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("Minute");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getNanosecond() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("Nanosecond");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getSecond() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("Second");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public long getTicks() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (long)classInstance.Get("Ticks");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static TimeOnly getMaxValue() throws Throwable {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject val = (JCObject)classType.Get("MaxValue");
return new TimeOnly(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static TimeOnly getMinValue() throws Throwable {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject val = (JCObject)classType.Get("MinValue");
return new TimeOnly(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Instance Events section
}