ClassDecl Methods |
The ClassDecl type exposes the following members.
Name | Description | |
---|---|---|
Accept |
Accept the specified visitor object for the current code object and it's children.
(Inherited from BaseListTypeDecl.) | |
AcceptAnnotations(IVisitor) |
Accept the specified visitor object for all regular (non-EOL, non-Infix, non-Postfix) annotations (comments, attributes, compiler directives).
(Inherited from CodeObject.) | |
AcceptAnnotations(IVisitor, AnnotationFlags) |
Accept the specified visitor object for all specified Infix or Postfix annotations (comments, compiler directives).
(Inherited from CodeObject.) | |
AcceptEOLComments |
Accept the specified visitor object for all EOL comments.
(Inherited from CodeObject.) | |
AcceptInfixComments |
Accept the specified visitor object for all Infix comments.
(Inherited from CodeObject.) | |
AcceptInfixEOLComments |
Accept the specified visitor object for all Infix EOL comments.
(Inherited from CodeObject.) | |
Add(CodeObject) |
Add a CodeObject to the ClassDecl body.
(Overrides TypeDeclAdd(CodeObject).) | |
Add(CodeObject) |
Add multiple CodeObjects to the ClassDecl body.
(Overrides BlockStatementAdd(CodeObject).) | |
AddBaseTypes |
Add one or more base type Expressions.
(Inherited from BaseListTypeDecl.) | |
AddConstraintClauses |
Add one or more ConstraintClauses.
(Inherited from TypeDecl.) | |
AddProperty |
Add an automatic property to the ClassDecl.
| |
AddRange |
Add a collection of CodeObjects to the ClassDecl body.
(Overrides BlockStatementAddRange(IEnumerableCodeObject).) | |
AddToDictionary |
Add the CodeObject to the specified dictionary.
(Inherited from TypeDecl.) | |
AddTypeParameters |
Add one or more TypeParameters.
(Inherited from TypeDecl.) | |
AdjustBaseTypePostComments |
Move any trailing post annotations on the last base type to the first constraint (if any) as prefix annotations.
(Inherited from BaseListTypeDecl.) | |
AssociateCommentWhenParsing |
Determine if the specified comment should be associated with the current code object during parsing.
(Inherited from TypeDecl.) | |
AsString |
Render the entire code object as a string, using LFs for newlines.
(Inherited from CodeObject.) | |
AsText |
Convert the code object to text with a trailing newline, and using CR/LF pairs for newlines (file format).
(Inherited from CodeObject.) | |
AsText(CodeWriter, CodeObjectRenderFlags) | (Inherited from Statement.) | |
AsText(CodeObjectRenderFlags, Boolean, StackCodeWriterAlignmentState) |
Convert the code object to text using the specified flags and format (file or string).
(Inherited from CodeObject.) | |
AsTextAfter | (Inherited from BaseListTypeDecl.) | |
AsTextAnnotations(CodeWriter, CodeObjectRenderFlags) |
Render all regular (non-EOL, non-Infix, non-Postfix, non-Message) annotations (comments, attributes, compiler directives).
(Inherited from CodeObject.) | |
AsTextAnnotations(CodeWriter, AnnotationFlags, CodeObjectRenderFlags) |
Render all specified Infix or Postfix annotations (comments, compiler directives).
(Inherited from CodeObject.) | |
AsTextArgument | (Inherited from TypeDecl.) | |
AsTextArgumentPrefix | (Inherited from Statement.) | |
AsTextBefore | (Inherited from CodeObject.) | |
AsTextEOLComments |
Render all EOL comments.
(Inherited from CodeObject.) | |
AsTextEvaluatedType | (Inherited from CodeObject.) | |
AsTextInfixComments |
Render all Infix comments with the specified mask.
(Inherited from CodeObject.) | |
AsTextInfixEOLComments |
Render all Infix EOL comments.
(Inherited from CodeObject.) | |
AsTextLeftMostAnnotations |
Render all regular annotations on the current object, or the left most binary operator.
(Inherited from CodeObject.) | |
AsTextLength |
Determine the length of the code object if converted to a string using the specified flags.
(Inherited from CodeObject.) | |
AsTextName | (Inherited from TypeDecl.) | |
AsTextPrefix | (Inherited from TypeDecl.) | |
AsTextStatement | (Inherited from Statement.) | |
AsTextSuffix | (Inherited from BaseListTypeDecl.) | |
AsTextTerminator | (Inherited from Statement.) | |
AttachAnnotation(Annotation, Boolean) |
Attach an Annotation (Comment, DocComment, Attribute,
CompilerDirective, or Message) to the CodeObject.
(Inherited from CodeObject.) | |
AttachAnnotation(Annotation, AnnotationFlags, Boolean) |
Attach an Annotation to the CodeObject at the specified position.
(Inherited from CodeObject.) | |
AttachComment |
Create a comment object and attach it to the code object.
(Inherited from CodeObject.) | |
AttachEOLComment |
Create an EOL comment object and attach it to the code object.
(Inherited from CodeObject.) | |
AttachMessage |
Create a message and attach it to the code object.
(Inherited from CodeObject.) | |
CalculateMetrics |
Calculate metrics for this code object and its children.
(Inherited from CodeObject.) | |
CheckForAlignment |
Check for alignment of any EOL comments.
(Inherited from CodeObject.) | |
CheckGeneratedDefaultConstructor |
Check if we need to create or remove a compiler-generated default constructor.
| |
CheckRemoveGeneratedDefaultConstructor |
Check if we need to remove a compiler-generated default constructor when adding a constructor.
| |
ClearCachedOtherParts |
Clear any cached list of other parts of this type (if it's a partial type), in both this type and in all other parts.
(Inherited from TypeDecl.) | |
Clone |
Deep-clone the code object.
(Inherited from BaseListTypeDecl.) | |
CloneField(Object, Object) |
Clone a field of a code object, including setting the parent.
(Inherited from CodeObject.) | |
CloneFieldT(T, T) |
Clone a field of a code object, including setting the parent.
(Inherited from CodeObject.) | |
Contains |
Check if the BlockStatement contains the specified CodeObject.
(Inherited from BlockStatement.) | |
CopyFormatting |
Copy formatting from another code object.
(Inherited from CodeObject.) | |
CreateAnnotations |
Create the list of child Annotations, or return the existing one.
(Inherited from CodeObject.) | |
CreateArrayRef(Int32) |
Create an array reference to this TypeDecl.
(Inherited from TypeDecl.) | |
CreateArrayRef(Boolean, Int32) |
Create an array reference to this TypeDecl.
(Inherited from TypeDecl.) | |
CreateBaseTypes |
Create the list of base type Expressions, or return the existing one.
(Inherited from BaseListTypeDecl.) | |
CreateBody |
Create a body if one doesn't exist yet.
(Inherited from BlockStatement.) | |
CreateConstraintClauses |
Create the list of ConstraintClauses, or return the existing one.
(Inherited from TypeDecl.) | |
CreateNullableRef |
Create a nullable reference to this TypeDecl.
(Inherited from TypeDecl.) | |
CreateRef(Boolean) |
Create a reference to the TypeDecl.
(Inherited from TypeDecl.) | |
CreateRef(Expression) |
Create a reference to the TypeDecl.
(Inherited from TypeDecl.) | |
CreateRef(Boolean, Expression) |
Create a reference to the TypeDecl.
(Inherited from TypeDecl.) | |
CreateRef(ChildListExpression, ListInt32, Int32) |
Create a reference to the TypeDecl.
(Inherited from TypeDecl.) | |
CreateRef(Boolean, ChildListExpression, ListInt32, Int32) |
Create a reference to the TypeDecl.
(Inherited from TypeDecl.) | |
CreateTypeParameters |
Create the list of TypeParameters, or return the existing one.
(Inherited from TypeDecl.) | |
DefaultFormat |
Default format the code object.
(Inherited from BlockStatement.) | |
DefaultFormatField | (Inherited from Statement.) | |
DefaultNewLines |
Determine a default of 1 or 2 newlines when adding items to a Block.
(Overrides CodeObjectDefaultNewLines(CodeObject).) | |
Dispose |
Dispose the CodeObject.
(Inherited from CodeObject.) | |
DoTypeArgumentCountsMatch |
Determine if the type argument counts match those in the specified UnresolvedRef.
(Inherited from TypeDecl.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
EvaluateTypeOrNamespace |
Evaluate the type or namespace associated with the code object.
(Inherited from CodeObject.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
Find(String) |
Enumerate all children with the specified name.
(Inherited from BlockStatement.) | |
FindT |
Enumerate all children of type T.
(Inherited from BlockStatement.) | |
FindFirstT |
Find the first child object of type T.
(Inherited from BlockStatement.) | |
FindFirstT(String) |
Find the first child object with the specified name and type.
(Inherited from BlockStatement.) | |
FindInAllPartsT(ICollectionT) |
Find all members of the specified type T, including in other parts of partial types.
(Inherited from TypeDecl.) | |
FindInAllPartsT(String, NamedObjectGroup) |
Find all members of the type with the specified name and of type T, including in other parts of partial types.
(Inherited from TypeDecl.) | |
FindIndexOf |
Find the index of the specified CodeObject in the BlockStatement.
(Inherited from BlockStatement.) | |
FindParentT |
Find the parent object of the specified type.
(Inherited from CodeObject.) | |
FindParentMethod |
Find the parent method (or anonymous method or lambda) of the current code object.
(Inherited from CodeObject.) | |
FindParentMethodOrType |
Find the parent method (or anonymous method or lambda) or type of the current code object.
(Inherited from CodeObject.) | |
FindTypeArgumentInBase |
Find a type argument in a base class for the specified type parameter.
(Inherited from BaseListTypeDecl.) | |
FindTypeParameterIndex(TypeParameter) |
Find the index of the specified TypeParameter in the declaration of the TypeDecl or
an enclosing TypeDecl if this one is nested. Also handles partial types.
(Inherited from TypeDecl.) | |
FindTypeParameterIndex(TypeParameter, Int32) |
Find the index of the specified TypeParameter in the declaration of the TypeDecl or
an enclosing TypeDecl if this one is nested. Also handles partial types.
(Inherited from TypeDecl.) | |
GetAccessRights |
Get the IsPrivate access right for the specified usage, and if not private then also get the IsProtected and IsInternal rights.
(Inherited from TypeDecl.) | |
GetAllBaseTypes |
Get all base type expressions, including those of other parts if this is a partial type.
(Inherited from BaseListTypeDecl.) | |
GetAllChildrenT |
Get an enumerator for all children objects of type T in
the CodeObject and in any child CodeObjects (recursively).
(Inherited from CodeObject.) | |
GetAttribute |
Returns the first attribute expression (Call or ConstructorRef) with the specified name on the CodeObject.
(Inherited from CodeObject.) | |
GetBaseType |
Get the base type.
(Overrides TypeDeclGetBaseType.) | |
GetComment |
Get the comment that satisfies the specified predicate.
(Inherited from CodeObject.) | |
GetConstructor |
Get the non-static constructor with the specified parameters.
Searches base types.
(Inherited from TypeDecl.) | |
GetConstructors |
Get all non-static constructors for this type.
(Inherited from TypeDecl.) | |
GetDelegateParameters |
Get the delegate parameters of the type (if any).
(Inherited from TypeDecl.) | |
GetDelegateReturnType |
Get the delegate return type of the type (if any).
(Inherited from TypeDecl.) | |
GetDescription |
Get a short text description of the CodeObject.
This is generally the shortest text representation that uniquely identifies objects, even if
they have the same name, for example: type or return type, name, type parameters, parameters.
(Inherited from CodeObject.) | |
GetDocSummary |
Returns the DocSummary documentation comment, or null if none exists.
(Inherited from CodeObject.) | |
GetEvent |
Get the event with the specified name.
Searches base types.
(Inherited from TypeDecl.) | |
GetField |
Get the field with the specified name.
Searches base types.
(Inherited from TypeDecl.) | |
GetFullName |
Get the full name of the INamedCodeObject, including any namespace name.
(Inherited from TypeDecl.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetIndentLevel |
Get the indent level of this object.
(Inherited from CodeObject.) | |
GetIndentSpaceCount |
Get the current indent in spaces.
(Inherited from CodeObject.) | |
GetIndexer |
Get the indexer with the specified parameter types.
Searches base types.
(Inherited from TypeDecl.) | |
GetInferredType |
Determine the type of an inferred ('var') type.
(Inherited from CodeObject.) | |
GetMemberDecls |
Get all member declarations of the TypeDecl (methods, properties, indexers, events, fields, and nested types).
(Inherited from TypeDecl.) | |
GetMethod |
Get the method with the specified name and parameter types.
(Inherited from BaseListTypeDecl.) | |
GetMethods(String, Boolean) |
Get all methods with the specified name.
Searches base types.
(Inherited from TypeDecl.) | |
GetMethods(String, Boolean, NamedObjectGroup) |
Get all methods with the specified name.
(Inherited from BaseListTypeDecl.) | |
GetNamespace |
Get the Namespace for this CodeObject.
(Inherited from CodeObject.) | |
GetNestedType |
Get the nested type with the specified name.
Searches base types.
(Inherited from TypeDecl.) | |
GetNestedTypeDecls |
Get all nested type declarations of the TypeDecl.
(Inherited from TypeDecl.) | |
GetOtherParts |
Get any other parts of this TypeDecl.
(Inherited from TypeDecl.) | |
GetProperty |
Get the property with the specified name.
(Inherited from BaseListTypeDecl.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetTypeParameterConstraints |
Get any constraints for the specified TypeParameter on this type.
(Inherited from TypeDecl.) | |
GetTypeRef |
Get a TypeRef for the type with the specified full name, with caching (generally used for System types).
(Inherited from CodeObject.) | |
GetWorstMessageType |
Get the type of the worst attached message.
(Inherited from CodeObject.) | |
HasAnnotationT | (Inherited from CodeObject.) | |
HasAttribute |
Returns true if the attribute with the specified name exists on the object, otherwise false.
(Inherited from CodeObject.) | |
HasUnresolvedRef |
Returns true if the code object is an UnresolvedRef or has any UnresolvedRef children.
(Inherited from BaseListTypeDecl.) | |
Insert |
Insert a CodeObject at the specified index in the ClassDecl body.
(Overrides BlockStatementInsert(Int32, CodeObject).) | |
IsAssignableFrom |
Determine if the type is assignable from the specified type.
(Inherited from BaseListTypeDecl.) | |
IsChildIndented |
Returns true if the specified child object is indented from the parent.
(Inherited from CodeObject.) | |
IsChildPrefix |
Returns true if the specified child object is prefixed to the current object.
(Inherited from CodeObject.) | |
IsImplementationOf |
Determine if the type implements the specified interface type.
(Inherited from BaseListTypeDecl.) | |
IsSameAs |
Check if the specified TypeDecl is identical to OR has the same name/namespace as the current one (could be different parts).
(Inherited from TypeDecl.) | |
IsSubclassOf |
Determine if the class is a subclass of the specified class.
(Overrides TypeDeclIsSubclassOf(TypeRef).) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MoveAllComments |
Move all (regular or EOL) comments from the specified token to the current code object, converting any
EOL comments to regular comments (which will be rendered inline if necessary).
(Inherited from CodeObject.) | |
MoveAnnotations |
Move any annotations from the specified location to the specified destination location.
(Inherited from CodeObject.) | |
MoveComments(Token) |
Move any non-EOL comments from the specified token to the current code object.
(Inherited from CodeObject.) | |
MoveComments(Token, Boolean) |
Move any non-EOL comments from the specified token to the current code object.
(Inherited from CodeObject.) | |
MoveCommentsAsPost |
Move any non-EOL comments from the specified token to the current code object as Post comments.
(Inherited from CodeObject.) | |
MoveEOLAndPostAnnotations |
Move any EOL or Postfix annotations from the specified code object to the current code object.
(Inherited from CodeObject.) | |
MoveEOLComment(CodeObject) |
Move any EOL comment from the specified code object to the current code object.
(Inherited from CodeObject.) | |
MoveEOLComment(Token) |
Move any EOL comment from the specified token to the current code object.
(Inherited from CodeObject.) | |
MoveEOLComment(Token, Boolean, Boolean) |
Move any EOL comment from the specified token to the current code object.
(Inherited from CodeObject.) | |
MoveEOLCommentAsInfix |
Move any EOL comment from the specified token to the current code object as an Infix EOL comment.
(Inherited from CodeObject.) | |
MoveFormatting(CodeObject) |
Move formatting from the specified code object to the current object.
(Inherited from CodeObject.) | |
MoveFormatting(Token) |
Move formatting from the specified token to the current object.
(Inherited from CodeObject.) | |
MovePrefixAnnotationsAs |
Move any prefix annotations on the specified code object to the current code object as the specified type of annotation.
(Inherited from CodeObject.) | |
NotifyListedAnnotationAdded |
Propagate the listed annotation to the parent CodeUnit and above.
(Inherited from CodeObject.) | |
NotifyListedAnnotationRemoved |
Remove the listed annotation from the parent CodeUnit and above.
(Inherited from CodeObject.) | |
Parse |
Parse a ClassDecl.
| |
ParseAnnotations(Parser, CodeObject) |
Parse annotations - specifically, compiler directives around things such as TypeParameters or ParameterDecls.
(Inherited from CodeObject.) | |
ParseAnnotations(Parser, CodeObject, Boolean, Boolean) |
Parse any comments, attributes, compiler directives.
(Inherited from CodeObject.) | |
ParseBaseTypeList | (Inherited from BaseListTypeDecl.) | |
ParseConstraintClauses | (Inherited from TypeDecl.) | |
ParseExpectedToken |
Parse the specified expected token, attaching a parse error to the current object if it doesn't exist.
(Inherited from CodeObject.) | |
ParseKeywordAndArgument | (Inherited from Statement.) | |
ParseKeywordArgumentBody | (Inherited from BlockStatement.) | |
ParseModifiersAndAnnotations | (Inherited from TypeDecl.) | |
ParseNameTypeParameters | (Inherited from TypeDecl.) | |
ParseTerminator |
Parse the terminator at the end of a Statement.
(Inherited from Statement.) | |
ParseTerminatorOrBody | (Inherited from BlockStatement.) | |
ParseUnusedAnnotations |
Parse annotations from the Unused list.
(Inherited from CodeObject.) | |
ParseUnusedType |
This method is used when we must parse backwards through the Unused list to get a type.
(Inherited from Statement.) | |
ReformatBlock |
Reformat the Block body.
(Inherited from BlockStatement.) | |
Remove |
Remove the specified CodeObject from the ClassDecl body.
(Overrides TypeDeclRemove(CodeObject).) | |
RemoveAll |
Remove all CodeObjects from the ClassDecl body.
(Overrides BlockStatementRemoveAll.) | |
RemoveAllAnnotationsT |
Remove all annotations of the specified type from this object.
(Inherited from CodeObject.) | |
RemoveAllAnnotationsWhereT |
Remove all annotations from this object where the specified predicate is true.
(Inherited from CodeObject.) | |
RemoveAllMessages |
Remove all messages from this object, or optionally only from the specified source.
(Inherited from CodeObject.) | |
RemoveAt |
Remove the CodeObject at the specified index from the BlockStatement.
(Inherited from BlockStatement.) | |
RemoveAttribute |
Remove the attribute expression with the specified name.
(Inherited from CodeObject.) | |
RemoveFromDictionary |
Remove the CodeObject from the specified dictionary.
(Inherited from TypeDecl.) | |
Replace |
Replace the specified CodeObject with a new one.
(Inherited from BlockStatement.) | |
Resolve(ResolveFlags) |
Resolve all child symbolic references.
(Inherited from CodeObject.) | |
Resolve(ResolveCategory, ResolveFlags) |
Resolve all child symbolic references, using the specified ResolveCategory and ResolveFlags.
(Inherited from BaseListTypeDecl.) | |
ResolveAttributes |
Resolve any attached attributes.
(Inherited from CodeObject.) | |
ResolveDocComments |
Resolve any references in attached documentation comments.
(Inherited from CodeObject.) | |
ResolveExtensionMethod |
Resolve an extension method with the specified name.
| |
ResolveGotoTargetUp |
Resolve child code objects that match the specified name are valid goto targets, moving up the tree until a complete match is found.
(Inherited from BlockStatement.) | |
ResolveIndexerRef |
Resolve indexers.
(Inherited from TypeDecl.) | |
ResolveIndexerRefInBase |
Resolve indexers in the base class.
(Inherited from TypeDecl.) | |
ResolveRef |
Resolve child code objects that match the specified name.
(Inherited from TypeDecl.) | |
ResolveRefInBase |
Resolve child code objects in the base class that match the specified name.
(Inherited from TypeDecl.) | |
ResolveRefUp |
Resolve child code objects that match the specified name, moving up the tree until a complete match is found.
(Inherited from TypeDecl.) | |
ResolveRefUpSkipMethodBody |
Similar to ResolveRefUp(String, Resolver), but skips trying to resolve the symbol in the body or parameters of a
method (used for resolving parameter types).
(Inherited from CodeObject.) | |
SetField(Object, Object, Boolean) |
Set a field of a code object, including setting the parent, and optional formatting.
(Inherited from CodeObject.) | |
SetFieldT(ChildListT, ChildListT) |
Set a ChildList collection field of a code object, including setting the parent.
(Inherited from CodeObject.) | |
SetFieldT(T, T, Boolean) |
Set a field of a code object, including setting the parent, and optional formatting.
(Inherited from CodeObject.) | |
SetFormatFlag | (Inherited from CodeObject.) | |
SetLineCol(CodeObject) |
Set the line and column numbers to those in the specified CodeObject.
(Inherited from CodeObject.) | |
SetLineCol(Token) |
Set the line and column numbers to those in the specified token.
(Inherited from CodeObject.) | |
SetNewLines |
Special method to set the newline count without setting the NewLinesSet flag.
(Inherited from CodeObject.) | |
SetStartLineCol |
Set the starting line and column numbers to those in the specified token (used for
prefixes such as modifiers).
(Inherited from TypeDecl.) | |
ShouldHaveBraces |
Determines if the body of the BlockStatement should be formatted with braces.
(Inherited from BlockStatement.) | |
ToString |
Render the type of the code object and its description as a string.
(Inherited from CodeObject.) | |
UpdateAllDeclExpressions |
Recursively update the dictionary of names in the specified Block by either adding or removing
(as specified by the 2nd parameter) all appropriate nested INamedCodeObjects expressions in the
current CodeObject tree (specifically implemented for LocalDeclExpr expression objects).
(Inherited from CodeObject.) | |
UpdateLineCol |
Update the line and column numbers according to the current positions in the CodeWriter,
if the UpdateLineCol flag is set.
(Inherited from CodeObject.) |