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

com.alibaba.fastffi.clang.SourceLocation_cxx_0xcb172b21 Maven / Gradle / Ivy

The newest version!
package com.alibaba.fastffi.clang;

import com.alibaba.fastffi.CXXReference;
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::SourceLocation")
@FFISynthetic("com.alibaba.fastffi.clang.SourceLocation")
public class SourceLocation_cxx_0xcb172b21 extends FFIPointerImpl implements SourceLocation {
  public static final int SIZE;

  public static final int HASH_SHIFT;

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

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

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

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

  public boolean isFileID() {
    return nativeIsFileID(address);
  }

  public static native boolean nativeIsFileID(long ptr);

  public boolean isInvalid() {
    return nativeIsInvalid(address);
  }

  public static native boolean nativeIsInvalid(long ptr);

  public boolean isMacroID() {
    return nativeIsMacroID(address);
  }

  public static native boolean nativeIsMacroID(long ptr);

  public boolean isValid() {
    return nativeIsValid(address);
  }

  public static native boolean nativeIsValid(long ptr);

  @CXXValue
  public StdString printToString(@CXXReference SourceManager SM) {
    long ret$ = nativePrintToString(address, com.alibaba.fastffi.CXXValueScope.allocate(com.alibaba.fastffi.stdcxx.StdString_cxx_0xcec1e274.SIZE), ((com.alibaba.fastffi.FFIPointerImpl) SM).address); return (new com.alibaba.fastffi.stdcxx.StdString_cxx_0xcec1e274(ret$));
  }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy