Skip to content

Commit

Permalink
Refactoring so that all type signatures support getTypeAnnotationInfo()
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehutch committed Dec 21, 2022
1 parent 114277e commit 42753ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ void setScanResult(final ScanResult scanResult) {
}
}

/**
* Get a list of {@link AnnotationInfo} objects for any type annotations on this type, or null if none.
*
* @return a list of {@link AnnotationInfo} objects for any type annotations on this type, or null if none.
*/
public AnnotationInfoList getTypeAnnotationInfo() {
return typeAnnotationInfo;
}

/**
* Add a type annotation.
*
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/io/github/classgraph/TypeArgument.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,6 @@ public void findReferencedClassNames(final Set<String> refdClassNames) {
}
}

/**
* Get a list of {@link AnnotationInfo} objects for any type annotations before the type argument wildcard, or
* null if none.
*
* @return a list of {@link AnnotationInfo} objects for any type annotations before the type argument wildcard,
* or null if none.
*/
public AnnotationInfoList getTypeAnnotationInfo() {
return typeAnnotationInfo;
}

// -------------------------------------------------------------------------------------------------------------

/* (non-Javadoc)
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/io/github/classgraph/TypeParameter.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,6 @@ public List<ReferenceTypeSignature> getInterfaceBounds() {
return interfaceBounds;
}

/**
* Get a list of {@link AnnotationInfo} objects for any type annotations on this type parameter, or null if
* none.
*
* @return a list of {@link AnnotationInfo} objects for any type annotations on this type parameter, or null if
* none.
*/
public AnnotationInfoList getTypeAnnotationInfo() {
return typeAnnotationInfo;
}

@Override
protected void addTypeAnnotation(final List<TypePathNode> typePath, final AnnotationInfo annotationInfo) {
if (typePath.isEmpty()) {
Expand Down

0 comments on commit 42753ef

Please sign in to comment.