system.DateTimeOffset 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;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;
// Import section
import system.ValueType;
import system.globalization.Calendar;
import system.TimeSpan;
import system.DateTime;
import system.DateTimeOffset;
import system.IFormatProvider;
import system.IFormatProviderImplementation;
import system.globalization.DateTimeStyles;
import system.runtime.serialization.SerializationInfo;
import system.runtime.serialization.StreamingContext;
import system.DayOfWeek;
import system.IComparable;
import system.IComparableImplementation;
import system.runtime.serialization.ISerializable;
import system.runtime.serialization.ISerializableImplementation;
import system.runtime.serialization.IDeserializationCallback;
import system.runtime.serialization.IDeserializationCallbackImplementation;
/**
* The base .NET class managing System.DateTimeOffset, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
*
*
* .NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.DateTimeOffset
*
*
* 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 DateTimeOffset extends ValueType implements system.IComparable, system.runtime.serialization.ISerializable, system.runtime.serialization.IDeserializationCallback {
/**
* 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.DateTimeOffset
*/
public static final String className = "System.DateTimeOffset";
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 DateTimeOffset(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 DateTimeOffset}, a cast assert is made to check if types are compatible.
* @param from {@link IJCOBridgeReflected} instance to be casted
* @return {@link DateTimeOffset} instance
* @throws java.lang.Throwable in case of error during cast operation
*/
public static DateTimeOffset cast(IJCOBridgeReflected from) throws Throwable {
NetType.AssertCast(classType, from);
return new DateTimeOffset(from.getJCOInstance());
}
// Constructors section
public DateTimeOffset() throws Throwable {
}
public DateTimeOffset(int year, int month, int day, int hour, int minute, int second, int millisecond, Calendar calendar, TimeSpan offset) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.FormatException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(year, month, day, hour, minute, second, millisecond, calendar == null ? null : calendar.getJCOInstance(), offset == null ? null : offset.getJCOInstance()));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset(int year, int month, int day, int hour, int minute, int second, int millisecond, TimeSpan offset) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.FormatException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(year, month, day, hour, minute, second, millisecond, offset == null ? null : offset.getJCOInstance()));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset(int year, int month, int day, int hour, int minute, int second, TimeSpan offset) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(year, month, day, hour, minute, second, offset == null ? null : offset.getJCOInstance()));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset(long ticks, TimeSpan offset) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(ticks, offset == null ? null : offset.getJCOInstance()));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset(DateTime dateTime) throws Throwable, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidTimeZoneException, system.OverflowException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.InvalidOperationException, system.globalization.CultureNotFoundException, system.NotSupportedException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(dateTime == null ? null : dateTime.getJCOInstance()));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset(DateTime dateTime, TimeSpan offset) throws Throwable, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidTimeZoneException, system.OverflowException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.InvalidOperationException, system.globalization.CultureNotFoundException, system.NotSupportedException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(dateTime == null ? null : dateTime.getJCOInstance(), offset == null ? null : offset.getJCOInstance()));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Methods section
public boolean Equals(DateTimeOffset other) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (boolean)classInstance.Invoke("Equals", other == null ? null : other.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static boolean Equals(DateTimeOffset first, DateTimeOffset second) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
return (boolean)classType.Invoke("Equals", first == null ? null : first.getJCOInstance(), second == null ? null : second.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public boolean EqualsExact(DateTimeOffset other) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (boolean)classInstance.Invoke("EqualsExact", other == null ? null : other.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static boolean TryParse(java.lang.String input, JCORefOut result) throws Throwable, system.ArgumentNullException, system.TypeLoadException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ArgumentOutOfRangeException, system.TypeInitializationException, system.FormatException, system.NullReferenceException, system.OverflowException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
return (boolean)classType.Invoke("TryParse", input, result.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static boolean TryParse(java.lang.String input, IFormatProvider formatProvider, DateTimeStyles styles, JCORefOut result) throws Throwable, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.TypeInitializationException, system.InvalidOperationException, system.IndexOutOfRangeException, system.ObjectDisposedException, system.NotSupportedException, system.NullReferenceException, system.OverflowException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
return (boolean)classType.Invoke("TryParse", input, formatProvider == null ? null : formatProvider.getJCOInstance(), styles == null ? null : styles.getJCOInstance(), result.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static boolean TryParseExact(java.lang.String input, java.lang.String format, IFormatProvider formatProvider, DateTimeStyles styles, JCORefOut result) throws Throwable, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.TypeInitializationException, system.InvalidOperationException, system.IndexOutOfRangeException, system.FormatException, system.NullReferenceException, system.OverflowException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
return (boolean)classType.Invoke("TryParseExact", input, format, formatProvider == null ? null : formatProvider.getJCOInstance(), styles == null ? null : styles.getJCOInstance(), result.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static boolean TryParseExact(java.lang.String input, java.lang.String[] formats, IFormatProvider formatProvider, DateTimeStyles styles, JCORefOut result) throws Throwable, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.TypeInitializationException, system.InvalidOperationException, system.IndexOutOfRangeException, system.FormatException, system.OverflowException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
return (boolean)classType.Invoke("TryParseExact", input, formats, formatProvider == null ? null : formatProvider.getJCOInstance(), styles == null ? null : styles.getJCOInstance(), result.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static int Compare(DateTimeOffset first, DateTimeOffset second) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
return (int)classType.Invoke("Compare", first == null ? null : first.getJCOInstance(), second == null ? null : second.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int CompareTo(DateTimeOffset other) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Invoke("CompareTo", other == null ? null : other.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public long ToFileTime() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.NotSupportedException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (long)classInstance.Invoke("ToFileTime");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public long ToUnixTimeMilliseconds() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (long)classInstance.Invoke("ToUnixTimeMilliseconds");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public long ToUnixTimeSeconds() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (long)classInstance.Invoke("ToUnixTimeSeconds");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset Add(TimeSpan timeSpan) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.security.SecurityException, system.io.IOException, system.InvalidOperationException, system.NotSupportedException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAdd = (JCObject)classInstance.Invoke("Add", timeSpan == null ? null : timeSpan.getJCOInstance());
return new DateTimeOffset(objAdd);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset AddDays(double days) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.security.SecurityException, system.io.IOException, system.InvalidOperationException, system.NotSupportedException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAddDays = (JCObject)classInstance.Invoke("AddDays", days);
return new DateTimeOffset(objAddDays);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset AddHours(double hours) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.security.SecurityException, system.io.IOException, system.InvalidOperationException, system.NotSupportedException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAddHours = (JCObject)classInstance.Invoke("AddHours", hours);
return new DateTimeOffset(objAddHours);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset AddMilliseconds(double milliseconds) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.security.SecurityException, system.io.IOException, system.InvalidOperationException, system.NotSupportedException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAddMilliseconds = (JCObject)classInstance.Invoke("AddMilliseconds", milliseconds);
return new DateTimeOffset(objAddMilliseconds);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset AddMinutes(double minutes) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.security.SecurityException, system.io.IOException, system.InvalidOperationException, system.NotSupportedException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAddMinutes = (JCObject)classInstance.Invoke("AddMinutes", minutes);
return new DateTimeOffset(objAddMinutes);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset AddMonths(int months) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.security.SecurityException, system.io.IOException, system.InvalidOperationException, system.NotSupportedException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAddMonths = (JCObject)classInstance.Invoke("AddMonths", months);
return new DateTimeOffset(objAddMonths);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset AddSeconds(double seconds) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.security.SecurityException, system.io.IOException, system.InvalidOperationException, system.NotSupportedException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAddSeconds = (JCObject)classInstance.Invoke("AddSeconds", seconds);
return new DateTimeOffset(objAddSeconds);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset AddTicks(long ticks) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.security.SecurityException, system.io.IOException, system.InvalidOperationException, system.NotSupportedException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAddTicks = (JCObject)classInstance.Invoke("AddTicks", ticks);
return new DateTimeOffset(objAddTicks);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset AddYears(int years) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.security.SecurityException, system.io.IOException, system.InvalidOperationException, system.NotSupportedException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAddYears = (JCObject)classInstance.Invoke("AddYears", years);
return new DateTimeOffset(objAddYears);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static DateTimeOffset FromFileTime(long fileTime) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.OverflowException, system.ArgumentNullException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objFromFileTime = (JCObject)classType.Invoke("FromFileTime", fileTime);
return new DateTimeOffset(objFromFileTime);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static DateTimeOffset FromUnixTimeMilliseconds(long milliseconds) throws Throwable, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.OutOfMemoryException, system.FormatException, system.ArgumentException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objFromUnixTimeMilliseconds = (JCObject)classType.Invoke("FromUnixTimeMilliseconds", milliseconds);
return new DateTimeOffset(objFromUnixTimeMilliseconds);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static DateTimeOffset FromUnixTimeSeconds(long seconds) throws Throwable, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.OutOfMemoryException, system.FormatException, system.ArgumentException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objFromUnixTimeSeconds = (JCObject)classType.Invoke("FromUnixTimeSeconds", seconds);
return new DateTimeOffset(objFromUnixTimeSeconds);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static DateTimeOffset Parse(java.lang.String input) throws Throwable, system.ArgumentNullException, system.TypeLoadException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ArgumentOutOfRangeException, system.TypeInitializationException, system.FormatException, system.NullReferenceException, system.OverflowException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParse = (JCObject)classType.Invoke("Parse", input);
return new DateTimeOffset(objParse);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static DateTimeOffset Parse(java.lang.String input, IFormatProvider formatProvider) throws Throwable, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.TypeInitializationException, system.InvalidOperationException, system.FormatException, system.MissingMethodException, system.reflection.TargetInvocationException, system.globalization.CultureNotFoundException, system.NotSupportedException, system.NullReferenceException, system.IndexOutOfRangeException, system.OverflowException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParse = (JCObject)classType.Invoke("Parse", input, formatProvider == null ? null : formatProvider.getJCOInstance());
return new DateTimeOffset(objParse);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static DateTimeOffset Parse(java.lang.String input, IFormatProvider formatProvider, DateTimeStyles styles) throws Throwable, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.TypeInitializationException, system.InvalidOperationException, system.IndexOutOfRangeException, system.ObjectDisposedException, system.NotSupportedException, system.NullReferenceException, system.OverflowException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParse = (JCObject)classType.Invoke("Parse", input, formatProvider == null ? null : formatProvider.getJCOInstance(), styles == null ? null : styles.getJCOInstance());
return new DateTimeOffset(objParse);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static DateTimeOffset ParseExact(java.lang.String input, java.lang.String format, IFormatProvider formatProvider) throws Throwable, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.TypeInitializationException, system.InvalidOperationException, system.FormatException, system.MissingMethodException, system.reflection.TargetInvocationException, system.globalization.CultureNotFoundException, system.IndexOutOfRangeException, system.OverflowException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParseExact = (JCObject)classType.Invoke("ParseExact", input, format, formatProvider == null ? null : formatProvider.getJCOInstance());
return new DateTimeOffset(objParseExact);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static DateTimeOffset ParseExact(java.lang.String input, java.lang.String format, IFormatProvider formatProvider, DateTimeStyles styles) throws Throwable, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.TypeInitializationException, system.InvalidOperationException, system.IndexOutOfRangeException, system.FormatException, system.NullReferenceException, system.OverflowException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParseExact = (JCObject)classType.Invoke("ParseExact", input, format, formatProvider == null ? null : formatProvider.getJCOInstance(), styles == null ? null : styles.getJCOInstance());
return new DateTimeOffset(objParseExact);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static DateTimeOffset ParseExact(java.lang.String input, java.lang.String[] formats, IFormatProvider formatProvider, DateTimeStyles styles) throws Throwable, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.TypeInitializationException, system.InvalidOperationException, system.IndexOutOfRangeException, system.FormatException, system.OverflowException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject objParseExact = (JCObject)classType.Invoke("ParseExact", input, formats, formatProvider == null ? null : formatProvider.getJCOInstance(), styles == null ? null : styles.getJCOInstance());
return new DateTimeOffset(objParseExact);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static DateTimeOffset ParseExact(java.lang.String dupParam0, JCORefOut dupParam1, IFormatProvider dupParam2, DateTimeStyles dupParam3) throws Throwable, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.TypeInitializationException, system.InvalidOperationException, system.IndexOutOfRangeException, system.FormatException, system.OverflowException {
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 DateTimeOffset(objParseExact);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset Subtract(TimeSpan value) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.security.SecurityException, system.io.IOException, system.InvalidOperationException, system.NotSupportedException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objSubtract = (JCObject)classInstance.Invoke("Subtract", value == null ? null : value.getJCOInstance());
return new DateTimeOffset(objSubtract);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset ToLocalTime() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.NotSupportedException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objToLocalTime = (JCObject)classInstance.Invoke("ToLocalTime");
return new DateTimeOffset(objToLocalTime);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset ToOffset(TimeSpan offset) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objToOffset = (JCObject)classInstance.Invoke("ToOffset", offset == null ? null : offset.getJCOInstance());
return new DateTimeOffset(objToOffset);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTimeOffset ToUniversalTime() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.security.SecurityException, system.io.IOException, system.InvalidOperationException, system.NotSupportedException, system.OverflowException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objToUniversalTime = (JCObject)classInstance.Invoke("ToUniversalTime");
return new DateTimeOffset(objToUniversalTime);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String ToString(IFormatProvider formatProvider) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.globalization.CultureNotFoundException, system.TypeInitializationException, system.InvalidOperationException, system.IndexOutOfRangeException, system.OverflowException, system.FormatException, system.NullReferenceException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("ToString", formatProvider == null ? null : formatProvider.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String ToString(java.lang.String format) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.TypeLoadException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.TypeInitializationException, system.FormatException, system.OverflowException, system.OutOfMemoryException, system.IndexOutOfRangeException, system.NullReferenceException {
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 java.lang.String ToString(java.lang.String format, IFormatProvider formatProvider) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.globalization.CultureNotFoundException, system.TypeInitializationException, system.InvalidOperationException, system.IndexOutOfRangeException, system.OverflowException, system.FormatException, system.NullReferenceException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Invoke("ToString", format, formatProvider == null ? null : formatProvider.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeSpan Subtract(DateTimeOffset value) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objSubtract = (JCObject)classInstance.Invoke("Subtract", value == null ? null : value.getJCOInstance());
return new TimeSpan(objSubtract);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
/**
* @deprecated Not for public use because the method is implemented in .NET with an explicit interface.
* Use the static ToIComparable method available in IComparable to obtain an object with an invocable method
*/
@Deprecated
public int CompareTo(NetObject obj) throws Throwable {
throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIComparable to obtain the full interface.");
}
/**
* @deprecated Not for public use because the method is implemented in .NET with an explicit interface.
* Use the static ToISerializable method available in ISerializable to obtain an object with an invocable method
*/
@Deprecated
public void GetObjectData(SerializationInfo info, StreamingContext context) throws Throwable {
throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToISerializable to obtain the full interface.");
}
/**
* @deprecated Not for public use because the method is implemented in .NET with an explicit interface.
* Use the static ToIDeserializationCallback method available in IDeserializationCallback to obtain an object with an invocable method
*/
@Deprecated
public void OnDeserialization(NetObject sender) throws Throwable {
throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIDeserializationCallback to obtain the full interface.");
}
// Properties section
public int getDay() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("Day");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getDayOfYear() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("DayOfYear");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getHour() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("Hour");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getMillisecond() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
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, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("Minute");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getMonth() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("Month");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getSecond() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("Second");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getYear() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("Year");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public long getTicks() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (long)classInstance.Get("Ticks");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public long getUtcTicks() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (long)classInstance.Get("UtcTicks");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTime getDate() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("Date");
return new DateTime(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTime getDateTime() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("DateTime");
return new DateTime(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTime getLocalDateTime() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.NotSupportedException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("LocalDateTime");
return new DateTime(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DateTime getUtcDateTime() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("UtcDateTime");
return new DateTime(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static DateTimeOffset getNow() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.ArgumentException, system.InvalidTimeZoneException, system.OverflowException, system.NotSupportedException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject val = (JCObject)classType.Get("Now");
return new DateTimeOffset(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public static DateTimeOffset getUtcNow() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.InvalidTimeZoneException, system.security.SecurityException, system.io.IOException, system.InvalidOperationException, system.NotSupportedException, system.OverflowException {
if (classType == null)
throw new UnsupportedOperationException("classType is null.");
try {
JCObject val = (JCObject)classType.Get("UtcNow");
return new DateTimeOffset(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public DayOfWeek getDayOfWeek() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("DayOfWeek");
return new DayOfWeek(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeSpan getOffset() throws Throwable, system.ArgumentOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("Offset");
return new TimeSpan(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TimeSpan getTimeOfDay() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("TimeOfDay");
return new TimeSpan(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Instance Events section
}