Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Modifiers | Name | Description |
---|---|---|
static class |
AnnotationCollectorTransform.ClassChanger |
Class used by CompilationUnit to transform the alias class into what is needed by the compiler. |
Type | Name and description |
---|---|
protected void |
addError(String message, ASTNode node, SourceUnit source) Adds a new syntax error to the source unit and then continues. |
protected List<AnnotationNode> |
getTargetAnnotationList(AnnotationNode collector, AnnotationNode aliasAnnotationUsage, SourceUnit source) Returns a list of AnnotationNodes for the value attribute of the given AnnotationNode. |
List<AnnotationNode> |
visit(AnnotationNode collector, AnnotationNode aliasAnnotationUsage, AnnotatedNode aliasAnnotated, SourceUnit source) Implementation method of the alias annotation processor. |
Adds a new syntax error to the source unit and then continues.
message
- the messagenode
- the node for the error reportsource
- the source unit for the error reportReturns a list of AnnotationNodes for the value attribute of the given AnnotationNode.
collector
- the node containing the value member with the listsource
- the source unit for error reportingImplementation method of the alias annotation processor. This method will get the list of annotations we aliased from the collector and adds it to aliasAnnotationUsage. The method will also map all members from aliasAnnotationUsage to the aliased nodes. Should a member stay unmapped, we will ad an error. Further processing of those members is done by the annotations.
collector
- reference to the annotation with AnnotationCollectoraliasAnnotationUsage
- reference to the place of usage of the aliasaliasAnnotated
- reference to the node that has been annotated by the aliassource
- source unit for error reporting