com.alibaba.fastffi.clang.tooling.ClangTool_cxx_0xfbd78ab0 Maven / Gradle / Ivy
The newest version!
package com.alibaba.fastffi.clang.tooling;
import com.alibaba.fastffi.CXXOperator;
import com.alibaba.fastffi.CXXReference;
import com.alibaba.fastffi.FFIForeignType;
import com.alibaba.fastffi.FFIPointerImpl;
import com.alibaba.fastffi.FFISynthetic;
import com.alibaba.fastffi.FFITypeFactory;
import com.alibaba.fastffi.clang.ASTUnit;
import com.alibaba.fastffi.stdcxx.StdVectorLite;
import com.alibaba.fastffi.stdcxx.UniquePtr;
import java.lang.Object;
import java.lang.String;
import java.lang.UnsatisfiedLinkError;
@FFIForeignType("clang::tooling::ClangTool")
@FFISynthetic("com.alibaba.fastffi.clang.tooling.ClangTool")
public class ClangTool_cxx_0xfbd78ab0 extends FFIPointerImpl implements ClangTool {
public static final int SIZE;
public static final int HASH_SHIFT;
static {
try {
System.loadLibrary("llvm4jni");
} catch (UnsatisfiedLinkError e) {
System.load(FFITypeFactory.findNativeLibrary(ClangTool_cxx_0xfbd78ab0.class, "llvm4jni"));
}
}
static {
SIZE = _elementSize$$$();
assert SIZE > 0;
HASH_SHIFT = 31 - Integer.numberOfLeadingZeros(1 + SIZE);
assert HASH_SHIFT > 0;
}
public ClangTool_cxx_0xfbd78ab0(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;
ClangTool_cxx_0xfbd78ab0 that = (ClangTool_cxx_0xfbd78ab0) o;
return this.address == that.address;
}
public int hashCode() {
return (int) (address >> HASH_SHIFT);
}
public String toString() {
return getClass().getName() + "@" + Long.toHexString(address);
}
public int buildASTs(@CXXReference StdVectorLite> ASTs) {
return nativeBuildASTs(address, ((com.alibaba.fastffi.FFIPointerImpl) ASTs).address);
}
public static native int nativeBuildASTs(long ptr, long ASTs0);
@CXXOperator("delete")
public void delete() {
nativeDelete(address);
}
@CXXOperator("delete")
public static native void nativeDelete(long ptr);
}