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

com.alibaba.fastffi.clang.FileScopeAsmDecl_cxx_0x4bceba5e 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.FFIExpr;
import com.alibaba.fastffi.FFIForeignType;
import com.alibaba.fastffi.FFISynthetic;
import com.alibaba.fastffi.FFITypeFactory;
import com.alibaba.fastffi.llvm.StringOStream;
import java.lang.Object;
import java.lang.String;
import java.lang.UnsatisfiedLinkError;

@FFIForeignType("clang::FileScopeAsmDecl")
@FFISynthetic("com.alibaba.fastffi.clang.FileScopeAsmDecl")
public class FileScopeAsmDecl_cxx_0x4bceba5e extends Decl_cxx_0x2308e01b implements FileScopeAsmDecl {
  public static final int SIZE;

  public static final int HASH_SHIFT;

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

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

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

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

  public void dump(@CXXReference StringOStream Out, boolean Deserialize,
      @CXXValue ASTDumpOutputFormat OutputFormat) {
    nativeDump0(address, ((com.alibaba.fastffi.FFIPointerImpl) Out).address, Deserialize, OutputFormat.getValue());
  }

  public static native void nativeDump0(long ptr, long Out0, boolean Deserialize1,
      int OutputFormat2);

  @CXXReference
  public ASTContext getASTContext() {
    long ret$ = nativeGetASTContext(address); return (new com.alibaba.fastffi.clang.ASTContext_cxx_0xb01a2b7e(ret$));
  }

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

  @CXXValue
  public AccessSpecifier getAccess() {
    return AccessSpecifier.get(nativeGetAccess(address));
  }

  @CXXValue
  public static native int nativeGetAccess(long ptr);

  @CXXReference
  public AttrVec getAttrs() {
    long ret$ = nativeGetAttrs(address); return (new com.alibaba.fastffi.clang.AttrVec_cxx_0x81b0fed2(ret$));
  }

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

  @CXXValue
  public SourceLocation getBeginLoc() {
    long ret$ = nativeGetBeginLoc(address, com.alibaba.fastffi.CXXValueScope.allocate(com.alibaba.fastffi.clang.SourceLocation_cxx_0xcb172b21.SIZE)); return (new com.alibaba.fastffi.clang.SourceLocation_cxx_0xcb172b21(ret$));
  }

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

  public DeclContext getDeclContext() {
    long ret$ = nativeGetDeclContext(address); return (ret$ == 0L ? null : new com.alibaba.fastffi.clang.DeclContext_cxx_0x7beaa914(ret$));
  }

  public static native long nativeGetDeclContext(long ptr);

  @CXXValue
  public SourceLocation getEndLoc() {
    long ret$ = nativeGetEndLoc(address, com.alibaba.fastffi.CXXValueScope.allocate(com.alibaba.fastffi.clang.SourceLocation_cxx_0xcb172b21.SIZE)); return (new com.alibaba.fastffi.clang.SourceLocation_cxx_0xcb172b21(ret$));
  }

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

  @CXXValue
  public Decl.Kind getKind() {
    return com.alibaba.fastffi.clang.Decl.Kind.get(nativeGetKind(address));
  }

  @CXXValue
  public static native int nativeGetKind(long ptr);

  @CXXValue
  public SourceLocation getLocation() {
    long ret$ = nativeGetLocation(address, com.alibaba.fastffi.CXXValueScope.allocate(com.alibaba.fastffi.clang.SourceLocation_cxx_0xcb172b21.SIZE)); return (new com.alibaba.fastffi.clang.SourceLocation_cxx_0xcb172b21(ret$));
  }

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

  public Decl getNextDeclInContext() {
    long ret$ = nativeGetNextDeclInContext(address); return com.alibaba.fastffi.clang.DeclTypeRefiner.refine(ret$ == 0L ? null : new com.alibaba.fastffi.clang.Decl_cxx_0x2308e01b(ret$));
  }

  public static native long nativeGetNextDeclInContext(long ptr);

  public TranslationUnitDecl getTranslationUnitDecl() {
    long ret$ = nativeGetTranslationUnitDecl(address); return (ret$ == 0L ? null : new com.alibaba.fastffi.clang.TranslationUnitDecl_cxx_0xf910aa8e(ret$));
  }

  public static native long nativeGetTranslationUnitDecl(long ptr);

  public boolean hasAttrs() {
    return nativeHasAttrs(address);
  }

  public static native boolean nativeHasAttrs(long ptr);

  @FFIExpr("!{0}->isImplicit() && {0}->getASTContext().getSourceManager().isInMainFile({0}->getLocation())")
  public boolean isExplicitlyDeclaredInMainFile() {
    return nativeIsExplicitlyDeclaredInMainFile(address);
  }

  @FFIExpr("!{0}->isImplicit() && {0}->getASTContext().getSourceManager().isInMainFile({0}->getLocation())")
  public static native boolean nativeIsExplicitlyDeclaredInMainFile(long ptr);

  public boolean isImplicit() {
    return nativeIsImplicit(address);
  }

  public static native boolean nativeIsImplicit(long ptr);

  public boolean isInAnonymousNamespace() {
    return nativeIsInAnonymousNamespace(address);
  }

  public static native boolean nativeIsInAnonymousNamespace(long ptr);

  public boolean isInStdNamespace() {
    return nativeIsInStdNamespace(address);
  }

  public static native boolean nativeIsInStdNamespace(long ptr);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy