oracle.jdeveloper.jot
Interface JotAnonymousClass
- All Superinterfaces:
- java.lang.Comparable, JotAllocation, JotClass, JotClassAllocation, JotElement, JotExpression, JotFileElement, JotHasModifiers, JotNameable, JotStatementExpression
- public interface JotAnonymousClass
- extends JotClass, JotClassAllocation
The JotAnonymousClass
interface represents an anonymous
class declaration. An anonymous class declaration consists of a class
allocation expression with a class body that can contain one or more
class members. An anonymous class declaration has the form
new Runnable() { public void run() { ... } }
Anonymous classes do not have names. The name returned by
getName
is arbitrary and meaningless.
- Since:
- 5.0
- See Also:
- "Section 15.9.5 of the Java Language Specification Second Edition"
Fields inherited from interface oracle.jdeveloper.jot.JotExpression |
ANONYMOUS_CLASS_ALLOCATION_EXPRESSION, ARRAY_ALLOCATION_EXPRESSION, ARRAY_DEREFERENCE_EXPRESSION, ARRAY_INITIALIZER_EXPRESSION, ASSIGNMENT_EXPRESSION, CLASS_ALLOCATION_EXPRESSION, INFIX_EXPRESSION, METHOD_CALL_EXPRESSION, NESTED_EXPRESSION, POST_INC_OR_DEC_EXPRESSION, PRE_INC_OR_DEC_EXPRESSION, PRIMARY_EXPRESSION, QUESTION_EXPRESSION, TYPECAST_EXPRESSION, UNARY_EXPRESSION, UNCATEGORIZED_EXPRESSION |
Method Summary |
java.lang.String |
getName()
Retrieves an internal name for this class. |
void |
setName(java.lang.String name)
Sets the internal name for this class. |
Methods inherited from interface oracle.jdeveloper.jot.JotClass |
addBlankLine, addComment, addConstructor, addField, addInitializer, addInnerClass, addInterface, addMethod, convertMemberToComment, createComment, getComment, getComments, getComponentType, getConstructor, getConstructors, getDeclaredConstructor, getDeclaredConstructors, getDeclaredField, getDeclaredFields, getDeclaredInitializers, getDeclaredInnerClasses, getDeclaredMethod, getDeclaredMethods, getDeclaredMethods, getDeclaringClass, getDocComment, getField, getFields, getFile, getInnerClasses, getInterfaces, getMethod, getMethods, getMethods, getPackage, getSuperclass, getType, isArray, isAssignableFrom, isDeprecated, isInterface, isPrimitive, isSource, removeComment, removeConstructor, removeField, removeInitializer, removeInnerClass, removeInterface, removeMethod, setDocComment, setIsInterface, setSuperclass |
Methods inherited from interface java.lang.Comparable |
compareTo |
Methods inherited from interface oracle.jdeveloper.jot.JotElement |
getElementName, getElementType, getEndOffset, getID, getJotWorkArea, getParent, getStartOffset, isExistent, isReadOnly, isStructureKnown, setParent |
Methods inherited from interface oracle.jdeveloper.jot.JotExpression |
getAsAnonymousClass, getAsArrayAllocation, getAsArrayDereference, getAsArrayInitializer, getAsAssignment, getAsClassAllocation, getAsInfixExpression, getAsMethodCall, getAsNestedExpression, getAsPostIncrementOrDecrement, getAsPreIncrementOrDecrement, getAsPrimaryExpression, getAsQuestionExpression, getAsTypecast, getAsUnaryExpression, getExpressionString, getExpressionType, getMinimumReferenceName, isParenthesized, renameObjectReference, resolveTypeReference, setParenthesized |
getName
public java.lang.String getName()
- Retrieves an internal name for this class. The names of anonymous classes
are meaningless and not guaranteed to be unique.
- Specified by:
getName
in interface JotNameable
- Returns:
- a string representing a Java name.
setName
public void setName(java.lang.String name)
throws JotException
- Sets the internal name for this class. Anonymous classes do not have
meaningful names.
- Specified by:
setName
in interface JotNameable
- Parameters:
name
- the new name of this member.
- Throws:
JotException
Copyright ©1997, 2003, Oracle. All rights reserved.