com.alibaba.fastffi.clang.Qualifiers_cxx_0x5a63efba Maven / Gradle / Ivy
The newest version!
package com.alibaba.fastffi.clang;
import com.alibaba.fastffi.CXXValue;
import com.alibaba.fastffi.FFIForeignType;
import com.alibaba.fastffi.FFIPointerImpl;
import com.alibaba.fastffi.FFISynthetic;
import com.alibaba.fastffi.FFITypeFactory;
import com.alibaba.fastffi.stdcxx.StdString;
import java.lang.Object;
import java.lang.String;
import java.lang.UnsatisfiedLinkError;
@FFIForeignType("clang::Qualifiers")
@FFISynthetic("com.alibaba.fastffi.clang.Qualifiers")
public class Qualifiers_cxx_0x5a63efba extends FFIPointerImpl implements Qualifiers {
public static final int SIZE;
public static final int HASH_SHIFT;
static {
try {
System.loadLibrary("llvm4jni");
} catch (UnsatisfiedLinkError e) {
System.load(FFITypeFactory.findNativeLibrary(Qualifiers_cxx_0x5a63efba.class, "llvm4jni"));
}
}
static {
SIZE = _elementSize$$$();
assert SIZE > 0;
HASH_SHIFT = 31 - Integer.numberOfLeadingZeros(1 + SIZE);
assert HASH_SHIFT > 0;
}
public Qualifiers_cxx_0x5a63efba(final long address) {
super(address);
}
private static final native int _elementSize$$$();
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Qualifiers_cxx_0x5a63efba that = (Qualifiers_cxx_0x5a63efba) o;
return this.address == that.address;
}
public int hashCode() {
return (int) (address >> HASH_SHIFT);
}
public String toString() {
return getClass().getName() + "@" + Long.toHexString(address);
}
public void addConst() {
nativeAddConst(address);
}
public static native void nativeAddConst(long ptr);
public void addRestrict() {
nativeAddRestrict(address);
}
public static native void nativeAddRestrict(long ptr);
public void addVolatile() {
nativeAddVolatile(address);
}
public static native void nativeAddVolatile(long ptr);
@CXXValue
public StdString getAsString() {
long ret$ = nativeGetAsString(address, com.alibaba.fastffi.CXXValueScope.allocate(com.alibaba.fastffi.stdcxx.StdString_cxx_0xcec1e274.SIZE)); return (new com.alibaba.fastffi.stdcxx.StdString_cxx_0xcec1e274(ret$));
}
@CXXValue
public static native long nativeGetAsString(long ptr, long rv_base);
public boolean hasConst() {
return nativeHasConst(address);
}
public static native boolean nativeHasConst(long ptr);
public boolean hasOnlyConst() {
return nativeHasOnlyConst(address);
}
public static native boolean nativeHasOnlyConst(long ptr);
public boolean hasOnlyRestrict() {
return nativeHasOnlyRestrict(address);
}
public static native boolean nativeHasOnlyRestrict(long ptr);
public boolean hasOnlyVolatile() {
return nativeHasOnlyVolatile(address);
}
public static native boolean nativeHasOnlyVolatile(long ptr);
public boolean hasRestrict() {
return nativeHasRestrict(address);
}
public static native boolean nativeHasRestrict(long ptr);
public boolean hasVolatile() {
return nativeHasVolatile(address);
}
public static native boolean nativeHasVolatile(long ptr);
public void removeConst() {
nativeRemoveConst(address);
}
public static native void nativeRemoveConst(long ptr);
public void removeRestrict() {
nativeRemoveRestrict(address);
}
public static native void nativeRemoveRestrict(long ptr);
public void removeVolatile() {
nativeRemoveVolatile(address);
}
public static native void nativeRemoveVolatile(long ptr);
}