Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e3f0d7
commit 6bc2c7c
Showing
10 changed files
with
191 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
...javaparser/symbolsolver/javaparsermodel/declarations/JavaParserAnnotationDeclaration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package com.github.javaparser.symbolsolver.javaparsermodel.declarations; | ||
|
||
import com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration; | ||
import com.github.javaparser.symbolsolver.model.declarations.*; | ||
import com.github.javaparser.symbolsolver.model.resolution.TypeSolver; | ||
import com.github.javaparser.symbolsolver.model.typesystem.ReferenceType; | ||
import com.github.javaparser.symbolsolver.model.typesystem.Type; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import static com.github.javaparser.symbolsolver.javaparser.Navigator.getParentNode; | ||
|
||
/** | ||
* @author Federico Tomassetti | ||
*/ | ||
public class JavaParserAnnotationDeclaration extends AbstractTypeDeclaration implements AnnotationDeclaration { | ||
|
||
private com.github.javaparser.ast.body.AnnotationDeclaration wrappedNode; | ||
private TypeSolver typeSolver; | ||
|
||
public JavaParserAnnotationDeclaration(com.github.javaparser.ast.body.AnnotationDeclaration wrappedNode, TypeSolver typeSolver) { | ||
this.wrappedNode = wrappedNode; | ||
this.typeSolver = typeSolver; | ||
} | ||
|
||
@Override | ||
public List<ReferenceType> getAncestors() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public List<FieldDeclaration> getAllFields() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public Set<MethodDeclaration> getDeclaredMethods() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public boolean isAssignableBy(Type type) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public boolean isAssignableBy(ReferenceTypeDeclaration other) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public boolean hasDirectlyAnnotation(String qualifiedName) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public String getQualifiedName() { | ||
String containerName = Helper.containerName("", getParentNode(wrappedNode)); | ||
if (containerName.isEmpty()) { | ||
return wrappedNode.getName(); | ||
} else { | ||
return containerName + "." + wrappedNode.getName(); | ||
} | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return wrappedNode.getName(); | ||
} | ||
|
||
@Override | ||
public List<TypeParameterDeclaration> getTypeParameters() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.