public interface JavaCodeFragment extends PsiImportHolder, PsiCodeFragment
Modifier and Type | Interface and Description |
---|---|
static interface |
JavaCodeFragment.ExceptionHandler
Interface used to determine which exceptions are considered handled
in the context where the fragment is used.
|
static interface |
JavaCodeFragment.VisibilityChecker
Interface used to determine the visibility of declarations from the code fragment.
|
EMPTY_ARRAY
EMPTY_NAVIGATABLE_ELEMENT_ARRAY
EMPTY_NAVIGATION_ITEM_ARRAY
Modifier and Type | Method and Description |
---|---|
void |
addImportsFromString(java.lang.String imports)
Adds the specified classes to the list of classes considered to be imported by the
code fragment.
|
JavaCodeFragment.ExceptionHandler |
getExceptionHandler()
Gets the exception handler which is used to determine which exceptions are considered handled
in the context where the fragment is used.
|
PsiType |
getSuperType()
Returns the type corresponding to the
super keyword in the code fragment. |
PsiType |
getThisType()
Returns the type corresponding to the
this keyword in the code fragment. |
JavaCodeFragment.VisibilityChecker |
getVisibilityChecker()
Gets the visibility checker which is used to determine the visibility of declarations
from the code fragment.
|
java.lang.String |
importsToString()
Returns the list of classes considered to be imported by the code fragment.
|
void |
setExceptionHandler(JavaCodeFragment.ExceptionHandler checker)
Sets the exception handler which is used to determine which exceptions are considered handled
in the context where the fragment is used.
|
void |
setSuperType(PsiType superType)
Sets the type corresponding to the
super keyword in the code fragment. |
void |
setThisType(PsiType psiType)
Sets the type corresponding to the
this keyword in the code fragment. |
void |
setVisibilityChecker(JavaCodeFragment.VisibilityChecker checker)
Sets the visibility checker which is used to determine the visibility of declarations
from the code fragment.
|
importClass
forceResolveScope, getForcedResolveScope
clearCaches, getContainingDirectory, getFileElementType, getFileType, getModificationStamp, getNode, getOriginalFile, getParent, getPsiRoots, getViewProvider, getVirtualFile, subtreeChanged
getName, isDirectory, processChildren
checkSetName
setName
getPresentation
canNavigate, canNavigateToSource, navigate
PsiType getThisType()
this
keyword in the code fragment.this
in the fragment.void setThisType(PsiType psiType)
this
keyword in the code fragment.psiType
- the type of this
in the fragment.PsiType getSuperType()
super
keyword in the code fragment.super
in the fragment.void setSuperType(PsiType superType)
super
keyword in the code fragment.superType
- the type of super
in the fragment.java.lang.String importsToString()
void addImportsFromString(java.lang.String imports)
imports
- the comma-separated list of full-qualified names of classes to import.void setVisibilityChecker(JavaCodeFragment.VisibilityChecker checker)
checker
- the checker instance.JavaCodeFragment.VisibilityChecker getVisibilityChecker()
void setExceptionHandler(JavaCodeFragment.ExceptionHandler checker)
checker
- the exception handler instance.JavaCodeFragment.ExceptionHandler getExceptionHandler()