Skip to content

Commit

Permalink
HCANN-103 Expose a new method to convert a Package to a XPackage
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne committed Oct 23, 2020
1 parent 85e05d7 commit 856b9ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Expand Up @@ -74,6 +74,8 @@ public interface ReflectionManager {

public XPackage packageForName(String packageName) throws ClassNotFoundException;

public XPackage toXPackage(Package pkg);

public <T> boolean equals(XClass class1, Class<T> class2);

public AnnotationReader buildAnnotationReader(AnnotatedElement annotatedElement);
Expand Down
Expand Up @@ -153,7 +153,13 @@ public XClass caseParameterizedType(ParameterizedType parameterizedType) {
}.doSwitch( context.bind( t ) );
}

@Deprecated
XPackage getXAnnotatedElement(Package pkg) {
return toXPackage( pkg );
}

@Override
public XPackage toXPackage(Package pkg) {
JavaXPackage xPackage = packagesToXPackages.get( pkg );
if ( xPackage == null ) {
xPackage = new JavaXPackage( pkg, this );
Expand Down

0 comments on commit 856b9ff

Please sign in to comment.