Package net.neoforged.jst.api
Class ImportHelper
java.lang.Object
net.neoforged.jst.api.ImportHelper
- All Implemented Interfaces:
PostProcessReplacer
Helper class used to import classes while processing a source file.
- See Also:
-
Field Summary
Fields inherited from interface net.neoforged.jst.api.PostProcessReplacer
REPLACERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic @Nullable ImportHelperget(com.intellij.psi.PsiFile file) static ImportHelperget(com.intellij.psi.PsiJavaFile file) importClass(String cls) Attempts to import the given fully qualified class name, returning a reference to it which is either its short name (if an import is successful) or the qualified name if not.voidprocess(Replacements replacements) Process replacements in the file aftertransformershave processed it.
-
Constructor Details
-
ImportHelper
public ImportHelper(com.intellij.psi.PsiJavaFile psiFile)
-
-
Method Details
-
canImport
-
importClass
Attempts to import the given fully qualified class name, returning a reference to it which is either its short name (if an import is successful) or the qualified name if not. -
process
Description copied from interface:PostProcessReplacerProcess replacements in the file aftertransformershave processed it.- Specified by:
processin interfacePostProcessReplacer
-
get
-
get
-