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

com.alibaba.fastffi.clang.tooling.CommonOptionsParser_cxx_0x42a9ec19 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.FFIExpr;
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 com.alibaba.fastffi.stdcxx.StdVector;
import java.lang.Object;
import java.lang.String;
import java.lang.UnsatisfiedLinkError;

@FFIForeignType(
    value = "clang::tooling::CommonOptionsParser",
    factory = CommonOptionsParser_cxx_0x42a9ec19Factory.class
)
@FFISynthetic("com.alibaba.fastffi.clang.tooling.CommonOptionsParser")
public class CommonOptionsParser_cxx_0x42a9ec19 extends FFIPointerImpl implements CommonOptionsParser {
  public static final int SIZE;

  public static final int HASH_SHIFT;

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

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

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

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

  @FFIExpr("new clang::tooling::ClangTool({0}->getCompilations(), {1})")
  public ClangTool createClangTool(@CXXReference StdVector sourcePath) {
    long ret$ = nativeCreateClangTool0(address, ((com.alibaba.fastffi.FFIPointerImpl) sourcePath).address); return (ret$ == 0L ? null : new com.alibaba.fastffi.clang.tooling.ClangTool_cxx_0xfbd78ab0(ret$));
  }

  @FFIExpr("new clang::tooling::ClangTool({0}->getCompilations(), {1})")
  public static native long nativeCreateClangTool0(long ptr, long sourcePath0);

  @FFIExpr("new clang::tooling::ClangTool({0}->getCompilations(), {0}->getSourcePathList())")
  public ClangTool createClangTool() {
    long ret$ = nativeCreateClangTool1(address); return (ret$ == 0L ? null : new com.alibaba.fastffi.clang.tooling.ClangTool_cxx_0xfbd78ab0(ret$));
  }

  @FFIExpr("new clang::tooling::ClangTool({0}->getCompilations(), {0}->getSourcePathList())")
  public static native long nativeCreateClangTool1(long ptr);

  @CXXOperator("delete")
  public void delete() {
    nativeDelete(address);
  }

  @CXXOperator("delete")
  public static native void nativeDelete(long ptr);

  @CXXReference
  public CompilationDatabase getCompilations() {
    long ret$ = nativeGetCompilations(address); return (new com.alibaba.fastffi.clang.tooling.CompilationDatabase_cxx_0x26627045(ret$));
  }

  @CXXReference
  public static native long nativeGetCompilations(long ptr);

  @CXXReference
  public StdVector getSourcePathList() {
    long ret$ = nativeGetSourcePathList(address); return (new com.alibaba.fastffi.stdcxx.StdVector_cxx_0xf1b32ca0(ret$));
  }

  @CXXReference
  public static native long nativeGetSourcePathList(long ptr);

  public static native long nativeCreateFactory0(int argc0, long argv1, long category2);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy