io.qt.core.QJsonParseError Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.core;
import io.qt.*;
/**
* Used to report errors during JSON parsing
* Java wrapper for Qt class QJsonParseError
*/
public class QJsonParseError extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QJsonParseError::ParseError
*/
public enum ParseError implements QtEnumerator {
/**
* Representing QJsonParseError:: NoError
*/
NoError(0),
/**
* Representing QJsonParseError:: UnterminatedObject
*/
UnterminatedObject(1),
/**
* Representing QJsonParseError:: MissingNameSeparator
*/
MissingNameSeparator(2),
/**
* Representing QJsonParseError:: UnterminatedArray
*/
UnterminatedArray(3),
/**
* Representing QJsonParseError:: MissingValueSeparator
*/
MissingValueSeparator(4),
/**
* Representing QJsonParseError:: IllegalValue
*/
IllegalValue(5),
/**
* Representing QJsonParseError:: TerminationByNumber
*/
TerminationByNumber(6),
/**
* Representing QJsonParseError:: IllegalNumber
*/
IllegalNumber(7),
/**
* Representing QJsonParseError:: IllegalEscapeSequence
*/
IllegalEscapeSequence(8),
/**
* Representing QJsonParseError:: IllegalUTF8String
*/
IllegalUTF8String(9),
/**
* Representing QJsonParseError:: UnterminatedString
*/
UnterminatedString(10),
/**
* Representing QJsonParseError:: MissingObject
*/
MissingObject(11),
/**
* Representing QJsonParseError:: DeepNesting
*/
DeepNesting(12),
/**
* Representing QJsonParseError:: DocumentTooLarge
*/
DocumentTooLarge(13),
/**
* Representing QJsonParseError:: GarbageAtEnd
*/
GarbageAtEnd(14);
static {
QtJambi_LibraryUtilities.initialize();
}
private ParseError(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull ParseError resolve(int value) {
switch (value) {
case 0: return NoError;
case 1: return UnterminatedObject;
case 2: return MissingNameSeparator;
case 3: return UnterminatedArray;
case 4: return MissingValueSeparator;
case 5: return IllegalValue;
case 6: return TerminationByNumber;
case 7: return IllegalNumber;
case 8: return IllegalEscapeSequence;
case 9: return IllegalUTF8String;
case 10: return UnterminatedString;
case 11: return MissingObject;
case 12: return DeepNesting;
case 13: return DocumentTooLarge;
case 14: return GarbageAtEnd;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QJsonParseError:: QJsonParseError()
*/
public QJsonParseError(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QJsonParseError instance);
/**
* See QJsonParseError:: QJsonParseError(QJsonParseError)
*/
public QJsonParseError(io.qt.core.@NonNull QJsonParseError other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QJsonParseError instance, io.qt.core.QJsonParseError other);
/**
* See QJsonParseError:: QJsonParseError{int, QJsonParseError::ParseError}
*/
public QJsonParseError(int offset, io.qt.core.QJsonParseError.@NonNull ParseError error){
super((QPrivateConstructor)null);
initialize_native(this, offset, error);
}
private native static void initialize_native(QJsonParseError instance, int offset, io.qt.core.QJsonParseError.ParseError error);
/**
* See QJsonParseError:: errorString()const
*/
@QtUninvokable
public final java.lang.@NonNull String errorString(){
return errorString_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String errorString_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final void setError(io.qt.core.QJsonParseError.@NonNull ParseError error){
setError_native_cref_QJsonParseError_ParseError(QtJambi_LibraryUtilities.internal.nativeId(this), error.value());
}
@QtUninvokable
private native void setError_native_cref_QJsonParseError_ParseError(long __this__nativeId, int error);
/**
*
*/
@QtUninvokable
public final io.qt.core.QJsonParseError.@NonNull ParseError error(){
return io.qt.core.QJsonParseError.ParseError.resolve(error_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int error_native(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final void setOffset(int offset){
setOffset_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), offset);
}
@QtUninvokable
private native void setOffset_native_int(long __this__nativeId, int offset);
/**
*
*/
@QtUninvokable
public final int offset(){
return offset_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int offset_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QJsonParseError(QPrivateConstructor p) { super(p); }
/**
* Creates and returns a copy of this object.
See QJsonParseError:: QJsonParseError(QJsonParseError)
*/
@QtUninvokable
@Override
public QJsonParseError clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QJsonParseError clone_native(long __this_nativeId);
/**
* @hidden
* Kotlin property getter. In Java use {@link #error()} instead.
*/
@QtUninvokable
public final io.qt.core.QJsonParseError.@NonNull ParseError getError() {
return error();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #offset()} instead.
*/
@QtUninvokable
public final int getOffset() {
return offset();
}
}