All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alibaba.fastffi.clang.DirectoryEntry_cxx_0xf7d00036 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.llvm.StringRef;
import java.lang.Object;
import java.lang.String;
import java.lang.UnsatisfiedLinkError;

@FFIForeignType("clang::DirectoryEntry")
@FFISynthetic("com.alibaba.fastffi.clang.DirectoryEntry")
public class DirectoryEntry_cxx_0xf7d00036 extends FFIPointerImpl implements DirectoryEntry {
  public static final int SIZE;

  public static final int HASH_SHIFT;

  static {
    try {
      System.loadLibrary("llvm4jni");
    } catch (UnsatisfiedLinkError e) {
      System.load(FFITypeFactory.findNativeLibrary(DirectoryEntry_cxx_0xf7d00036.class, "llvm4jni"));
    }
  }
  static {
    SIZE = _elementSize$$$();
    assert SIZE > 0;
    HASH_SHIFT = 31 - Integer.numberOfLeadingZeros(1 + SIZE);
    assert HASH_SHIFT > 0;
  }

  public DirectoryEntry_cxx_0xf7d00036(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;
    DirectoryEntry_cxx_0xf7d00036 that = (DirectoryEntry_cxx_0xf7d00036) o;
    return this.address == that.address;
  }

  public int hashCode() {
    return (int) (address >> HASH_SHIFT);
  }

  public String toString() {
    return getClass().getName() + "@" + Long.toHexString(address);
  }

  @CXXValue
  public StringRef getName() {
    long ret$ = nativeGetName(address, com.alibaba.fastffi.CXXValueScope.allocate(com.alibaba.fastffi.llvm.StringRef_cxx_0xe9c826cb.SIZE)); return (new com.alibaba.fastffi.llvm.StringRef_cxx_0xe9c826cb(ret$));
  }

  @CXXValue
  public static native long nativeGetName(long ptr, long rv_base);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy