Top Description Inners Fields Constructors Methods
org.lwjgl.llvm

public Class ClangRewrite

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*

Requires Clang 12 or higher.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
ClangRewrite.Functions

Contains the function pointers loaded from the CLANG SharedLibrary.

Field Summary

Modifier and TypeField and Description
private static final SharedLibrary

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static long
clang_CXRewriter_create(long TU)

Create CXRewriter.

public static void
clang_CXRewriter_dispose(long Rew)

Free the given CXRewriter.

public static void
clang_CXRewriter_insertTextBefore(long Rew, CXSourceLocation Loc, ByteBuffer Insert)

Insert the specified string at the specified location in the original buffer.

public static void
clang_CXRewriter_insertTextBefore(long Rew, CXSourceLocation Loc, CharSequence Insert)

Insert the specified string at the specified location in the original buffer.

public static boolean

Returns:

1 if any files were not saved successfully, returns 0 otherwise
clang_CXRewriter_overwriteChangedFiles
(long Rew)

Save all changed files to disk.

public static void
clang_CXRewriter_removeText(long Rew, CXSourceRange ToBeRemoved)

Remove the specified range.

public static void
clang_CXRewriter_replaceText(long Rew, CXSourceRange ToBeReplaced, ByteBuffer Replacement)

Replace the specified range of characters in the input with the specified replacement.

public static void
clang_CXRewriter_replaceText(long Rew, CXSourceRange ToBeReplaced, CharSequence Replacement)

Replace the specified range of characters in the input with the specified replacement.

public static void
clang_CXRewriter_writeMainFileToStdOut(long Rew)

Write out rewritten version of the main file to stdout.

public static SharedLibrary
getLibrary()

Returns the CLANG SharedLibrary.

public static native void
nclang_CXRewriter_insertTextBefore(long Rew, long Loc, long Insert, long __functionAddress)

Unsafe version of: insertTextBefore

public static void
nclang_CXRewriter_insertTextBefore(long Rew, long Loc, long Insert)

Unsafe version of: insertTextBefore

public static native void
nclang_CXRewriter_removeText(long Rew, long ToBeRemoved, long __functionAddress)

Unsafe version of: removeText

public static void
nclang_CXRewriter_removeText(long Rew, long ToBeRemoved)

Unsafe version of: removeText

public static native void
nclang_CXRewriter_replaceText(long Rew, long ToBeReplaced, long Replacement, long __functionAddress)

Unsafe version of: replaceText

public static void
nclang_CXRewriter_replaceText(long Rew, long ToBeReplaced, long Replacement)

Unsafe version of: replaceText

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CLANGback to summary
private static final SharedLibrary CLANG

Constructor Detail

ClangRewriteback to summary
protected ClangRewrite()

Method Detail

clang_CXRewriter_createback to summary
public static long clang_CXRewriter_create(long TU)

Create CXRewriter.

Annotations
@NativeType:CXRewriter
clang_CXRewriter_disposeback to summary
public static void clang_CXRewriter_dispose(long Rew)

Free the given CXRewriter.

clang_CXRewriter_insertTextBeforeback to summary
public static void clang_CXRewriter_insertTextBefore(long Rew, CXSourceLocation Loc, ByteBuffer Insert)

Insert the specified string at the specified location in the original buffer.

clang_CXRewriter_insertTextBeforeback to summary
public static void clang_CXRewriter_insertTextBefore(long Rew, CXSourceLocation Loc, CharSequence Insert)

Insert the specified string at the specified location in the original buffer.

clang_CXRewriter_overwriteChangedFilesback to summary
public static boolean clang_CXRewriter_overwriteChangedFiles(long Rew)

Save all changed files to disk.

Returns:boolean

1 if any files were not saved successfully, returns 0 otherwise

Annotations
@NativeType:int
clang_CXRewriter_removeTextback to summary
public static void clang_CXRewriter_removeText(long Rew, CXSourceRange ToBeRemoved)

Remove the specified range.

clang_CXRewriter_replaceTextback to summary
public static void clang_CXRewriter_replaceText(long Rew, CXSourceRange ToBeReplaced, ByteBuffer Replacement)

Replace the specified range of characters in the input with the specified replacement.

clang_CXRewriter_replaceTextback to summary
public static void clang_CXRewriter_replaceText(long Rew, CXSourceRange ToBeReplaced, CharSequence Replacement)

Replace the specified range of characters in the input with the specified replacement.

clang_CXRewriter_writeMainFileToStdOutback to summary
public static void clang_CXRewriter_writeMainFileToStdOut(long Rew)

Write out rewritten version of the main file to stdout.

getLibraryback to summary
public static SharedLibrary getLibrary()

Returns the CLANG SharedLibrary.

nclang_CXRewriter_insertTextBeforeback to summary
public static native void nclang_CXRewriter_insertTextBefore(long Rew, long Loc, long Insert, long __functionAddress)

Unsafe version of: insertTextBefore

nclang_CXRewriter_insertTextBeforeback to summary
public static void nclang_CXRewriter_insertTextBefore(long Rew, long Loc, long Insert)

Unsafe version of: insertTextBefore

nclang_CXRewriter_removeTextback to summary
public static native void nclang_CXRewriter_removeText(long Rew, long ToBeRemoved, long __functionAddress)

Unsafe version of: removeText

nclang_CXRewriter_removeTextback to summary
public static void nclang_CXRewriter_removeText(long Rew, long ToBeRemoved)

Unsafe version of: removeText

nclang_CXRewriter_replaceTextback to summary
public static native void nclang_CXRewriter_replaceText(long Rew, long ToBeReplaced, long Replacement, long __functionAddress)

Unsafe version of: replaceText

nclang_CXRewriter_replaceTextback to summary
public static void nclang_CXRewriter_replaceText(long Rew, long ToBeReplaced, long Replacement)

Unsafe version of: replaceText

org.lwjgl.llvm back to summary

public final Class ClangRewrite.Functions

extends Object
Class Inheritance

Contains the function pointers loaded from the CLANG SharedLibrary.

Field Summary

Modifier and TypeField and Description
public static final long
create

Function address.

public static final long
dispose

Function address.

public static final long
insertTextBefore

Function address.

public static final long
overwriteChangedFiles

Function address.

public static final long
removeText

Function address.

public static final long
replaceText

Function address.

public static final long
writeMainFileToStdOut

Function address.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

createback to summary
public static final long create

Function address.

disposeback to summary
public static final long dispose

Function address.

insertTextBeforeback to summary
public static final long insertTextBefore

Function address.

overwriteChangedFilesback to summary
public static final long overwriteChangedFiles

Function address.

removeTextback to summary
public static final long removeText

Function address.

replaceTextback to summary
public static final long replaceText

Function address.

writeMainFileToStdOutback to summary
public static final long writeMainFileToStdOut

Function address.

Constructor Detail

Functionsback to summary
private Functions()