Klasse CreateTypeMemberOperation
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
org.aspectj.org.eclipse.jdt.internal.core.CreateElementInCUOperation
org.aspectj.org.eclipse.jdt.internal.core.CreateTypeMemberOperation
- Alle implementierten Schnittstellen:
org.eclipse.core.resources.IWorkspaceRunnable
,org.eclipse.core.runtime.ICoreRunnable
,org.eclipse.core.runtime.IProgressMonitor
- Bekannte direkte Unterklassen:
CreateFieldOperation
,CreateInitializerOperation
,CreateMethodOperation
,CreateTypeOperation
Implements functionality common to
operations that create type members.
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
JavaModelOperation.IPostAction
-
Feldübersicht
Modifizierer und TypFeldBeschreibungprotected String
The name of theASTNode
that may be used to create this new element.protected ASTNode
The AST node representing the element that this operation created.protected String
The source code for the new member.Von Klasse geerbte Felder org.aspectj.org.eclipse.jdt.internal.core.CreateElementInCUOperation
anchorElement, creationOccurred, cuAST, INSERT_AFTER, INSERT_BEFORE, INSERT_LAST, insertionPolicy
Von Klasse geerbte Felder org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
actions, actionsEnd, actionsStart, APPEND, attributes, elementsToProcess, force, HAS_MODIFIED_RESOURCE_ATTR, isNested, KEEP_EXISTING, NO_ELEMENTS, OPERATION_STACKS, parentElements, POST_ACTION_VERBOSE, progressMonitor, REMOVEALL_APPEND, resultElements, TRUE
Von Schnittstelle geerbte Felder org.eclipse.core.runtime.IProgressMonitor
UNKNOWN
-
Konstruktorübersicht
KonstruktorBeschreibungCreateTypeMemberOperation
(IJavaElement parentElement, String source, boolean force) When executed, this operation will create a type member in the given parent element with the specified source. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected ASTNode
generateElementAST
(ASTRewrite rewriter, ICompilationUnit cu) protected String
Generates anASTNode
based on the source of this operation when there is likely a syntax error in the source.protected StructuralPropertyDescriptor
getChildPropertyDescriptor
(ASTNode parent) protected IType
getType()
Returns the IType the member is to be created in.protected abstract SimpleName
rename
(ASTNode node, SimpleName newName) protected void
setAlteredName
(String newName) Sets the name of theASTNode
that will be used to create this new element.verify()
Possible failures: NO_ELEMENTS_TO_PROCESS - the parent element supplied to the operation isnull
.protected IJavaModelStatus
Verify for a name collision in the destination container.Von Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.core.CreateElementInCUOperation
checkCanceled, createAfter, createBefore, executeOperation, generateNewCompilationUnitAST, generateResultHandle, generateResultHandles, getCompilationUnit, getMainAmountOfWork, getMainTaskName, getSchedulingRule, initializeDefaultPosition, insertASTNode, parse, setRelativePosition
Von Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
addAction, addDelta, addReconcileDelta, applyTextEdit, beginTask, canModifyRoots, commonVerify, copyResources, createFile, createFolder, deleteEmptyPackageFragment, deleteResource, deleteResources, done, equalsOneOf, executeNestedOperation, firstActionWithID, getAttribute, getCompilationUnitFor, getCurrentOperationStack, getDocument, getElementToProcess, getJavaModel, getLatestASTLevel, getNestedFolders, getParentElement, getParentElements, getResultElements, getSubProgressMonitor, hasModifiedResource, internalWorked, isCanceled, isReadOnly, isTopLevelOperation, moveResources, newJavaElementDelta, popOperation, postAction, prefixesOneOf, pushOperation, removeAllPostAction, removeReconcileDelta, run, runOperation, runPostActions, setAttribute, setCanceled, setNested, setTaskName, subTask, worked
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Von Schnittstelle geerbte Methoden org.eclipse.core.runtime.IProgressMonitor
clearBlocked, setBlocked, slice
-
Felddetails
-
source
The source code for the new member. -
alteredName
The name of theASTNode
that may be used to create this new element. Used by theCopyElementsOperation
for renaming -
createdNode
The AST node representing the element that this operation created.
-
-
Konstruktordetails
-
CreateTypeMemberOperation
When executed, this operation will create a type member in the given parent element with the specified source.
-
-
Methodendetails
-
getChildPropertyDescriptor
- Angegeben von:
getChildPropertyDescriptor
in KlasseCreateElementInCUOperation
-
generateElementAST
protected ASTNode generateElementAST(ASTRewrite rewriter, ICompilationUnit cu) throws JavaModelException - Angegeben von:
generateElementAST
in KlasseCreateElementInCUOperation
- Löst aus:
JavaModelException
-
rename
-
generateSyntaxIncorrectAST
Generates anASTNode
based on the source of this operation when there is likely a syntax error in the source. Returns the source used to generate this node. -
getType
Returns the IType the member is to be created in. -
setAlteredName
Sets the name of theASTNode
that will be used to create this new element. Used by theCopyElementsOperation
for renaming- Setzt außer Kraft:
setAlteredName
in KlasseCreateElementInCUOperation
-
verify
Possible failures:- NO_ELEMENTS_TO_PROCESS - the parent element supplied to the operation is
null
. - INVALID_CONTENTS - The source is
null
or has serious syntax errors. - NAME_COLLISION - A name collision occurred in the destination
- Setzt außer Kraft:
verify
in KlasseCreateElementInCUOperation
- Siehe auch:
- NO_ELEMENTS_TO_PROCESS - the parent element supplied to the operation is
-
verifyNameCollision
Verify for a name collision in the destination container.
-