public class CtNewClassImpl<T> extends CtConstructorCallImpl<T> implements CtNewClass<T>
ERROR_MESSAGE_TO_STRING, factory, LOGGER, parent
Constructor and Description |
---|
CtNewClassImpl() |
Modifier and Type | Method and Description |
---|---|
void |
accept(CtVisitor visitor)
Accepts a visitor
|
CtNewClass<T> |
clone()
Clone the element which calls this method in a new object.
|
CtClass<?> |
getAnonymousClass()
Gets the created class.
|
<N extends CtNewClass> |
setAnonymousClass(CtClass<?> anonymousClass)
Sets the created class.
|
addActualTypeArgument, addArgument, getActualTypeArguments, getArguments, getExecutable, getLabel, getType, insertAfter, insertAfter, insertBefore, insertBefore, removeActualTypeArgument, removeArgument, setActualTypeArguments, setArguments, setExecutable, setLabel, setType
getTarget, setTarget
addTypeCast, getTypeCasts, S, setTypeCasts
partiallyEvaluate
addAnnotation, addComment, asIterable, comment, delete, descendantIterator, emptyList, emptySet, equals, filterChildren, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getFactory, getMetadata, getMetadataKeys, getOriginalSourceFragment, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hashCode, hasParent, isImplicit, isParentInitialized, map, map, prettyprint, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setFactory, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, unmodifiableList, updateAllParentsBelow
finalize, getClass, notify, notifyAll, wait, wait, wait
addActualTypeArgument, getActualTypeArguments, setActualTypeArguments
getType
getTarget, setTarget
addTypeCast, getTypeCasts, setTypeCasts
partiallyEvaluate
setType
addAnnotation, addComment, asIterable, delete, descendantIterator, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getMetadata, getMetadataKeys, getOriginalSourceFragment, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hasParent, isImplicit, isParentInitialized, prettyprint, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, updateAllParentsBelow
getFactory, setFactory
filterChildren, map, map
S
addArgument, getArguments, getExecutable, removeArgument, setArguments, setExecutable
comment, getLabel, insertAfter, insertAfter, insertBefore, insertBefore, setLabel
removeActualTypeArgument
public void accept(CtVisitor visitor)
CtVisitable
accept
in interface CtVisitable
accept
in class CtConstructorCallImpl<T>
public CtClass<?> getAnonymousClass()
CtNewClass
getAnonymousClass
in interface CtNewClass<T>
public <N extends CtNewClass> N setAnonymousClass(CtClass<?> anonymousClass)
CtNewClass
setAnonymousClass
in interface CtNewClass<T>
public CtNewClass<T> clone()
CtElement
Refactoring.copyType(CtType)
and Refactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.clone
in interface CtCodeElement
clone
in interface CtConstructorCall<T>
clone
in interface CtExpression<T>
clone
in interface CtNewClass<T>
clone
in interface CtStatement
clone
in interface CtTargetedExpression<T,CtExpression<?>>
clone
in interface CtElement
clone
in class CtConstructorCallImpl<T>
Copyright © 2007–2021 Inria. All rights reserved.