Package sun.reflect.generics.reflectiveObjects

Examples of sun.reflect.generics.reflectiveObjects.WildcardTypeImpl


          if (aType instanceof Class) {
            aClass = (Class) aType;
          }
          else if (aType instanceof WildcardTypeImpl) {
            WildcardTypeImpl aWildcard = (WildcardTypeImpl) aType;
              // trying to suss out super v extends w/o resorting to string munging.
              if (aWildcard.getLowerBounds().length == 0 && aWildcard.getUpperBounds().length > 0) {
                // no lower bounds afaik indicates ? extends Foo
                aClass = ((Class)aWildcard.getUpperBounds()[0]);
              }
              else if (aWildcard.getLowerBounds().length > 0) {
                // lower & upper bounds I believe indicates something of the form Foo super Bar
                aClass = ((Class)aWildcard.getLowerBounds()[0]);
              }
              else {
                // shoot, we'll try the string hack that Adrian posted on the mailing list.
                try {
                  aClass = Class.forName(aType.toString().split(" ")[2].substring(0, aTypes[0].toString().split(" ")[2].length()-1));
View Full Code Here

TOP

Related Classes of sun.reflect.generics.reflectiveObjects.WildcardTypeImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.