com.alibaba.fastffi.clang.AttrVec_cxx_0x81b0fed2 Maven / Gradle / Ivy
The newest version!
package com.alibaba.fastffi.clang;
import com.alibaba.fastffi.CXXOperator;
import com.alibaba.fastffi.FFIForeignType;
import com.alibaba.fastffi.FFISynthetic;
import com.alibaba.fastffi.FFITypeFactory;
import java.lang.Object;
import java.lang.String;
import java.lang.UnsatisfiedLinkError;
@FFIForeignType("clang::AttrVec")
@FFISynthetic("com.alibaba.fastffi.clang.AttrVec")
public class AttrVec_cxx_0x81b0fed2 extends AttributeCommonInfo_cxx_0xe4a5b564 implements AttrVec {
public static final int SIZE;
public static final int HASH_SHIFT;
static {
try {
System.loadLibrary("llvm4jni");
} catch (UnsatisfiedLinkError e) {
System.load(FFITypeFactory.findNativeLibrary(AttrVec_cxx_0x81b0fed2.class, "llvm4jni"));
}
}
static {
SIZE = _elementSize$$$();
assert SIZE > 0;
HASH_SHIFT = 31 - Integer.numberOfLeadingZeros(1 + SIZE);
assert HASH_SHIFT > 0;
}
public AttrVec_cxx_0x81b0fed2(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;
AttrVec_cxx_0x81b0fed2 that = (AttrVec_cxx_0x81b0fed2) o;
return this.address == that.address;
}
public int hashCode() {
return (int) (address >> HASH_SHIFT);
}
public String toString() {
return getClass().getName() + "@" + Long.toHexString(address);
}
@CXXOperator("[]")
public Attr get(long index) {
long ret$ = nativeGet(address, index); return (ret$ == 0L ? null : new com.alibaba.fastffi.clang.Attr_cxx_0x2307bd62(ret$));
}
@CXXOperator("[]")
public static native long nativeGet(long ptr, long index0);
public long size() {
return nativeSize(address);
}
public static native long nativeSize(long ptr);
}