Package com.strobel.reflection

Examples of com.strobel.reflection.MethodInfo


import static org.junit.Assert.*;

public class MetadataParserTests {
    @Test
    public void testGenericMethodResolution() throws Throwable {
        final MethodInfo reflectedMethod = Type.of(Collections.class).getMethods(BindingFlags.AllDeclared).get(1);
        final String signature = reflectedMethod.getSignature();
        final MetadataParser parser = new MetadataParser(MetadataSystem.instance());
        final TypeReference collectionsType = parser.lookupType("java.util", "Collections");
        final MethodReference method1 = parser.parseMethod(collectionsType, reflectedMethod.getName(), signature);

        assertNotNull(method1);

        final IMethodSignature methodSignature = parser.parseMethodSignature(signature);

        assertNotNull(methodSignature);

        final MethodReference method2 = parser.lookupMethod(collectionsType, reflectedMethod.getName(), methodSignature);

        assertNotNull(method2);
    }
View Full Code Here

TOP

Related Classes of com.strobel.reflection.MethodInfo

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.