Package com.strobel.reflection

Examples of com.strobel.reflection.MemberList


        final String methodName,
        final TypeList typeArguments,
        final ExpressionList<? extends Expression> arguments,
        final Set<BindingFlags> flags) {

        final MemberList members = type.findMembers(
            MemberType.methodsOnly(),
            flags,
            Type.FilterNameIgnoreCase,
            methodName
        );

        if (members == null || members.size() == 0) {
            throw Error.methodDoesNotExistOnType(methodName, type);
        }

        final ArrayList<MethodInfo> candidates = new ArrayList<>(members.size());

        for (int i = 0, n = members.size(); i < n; i++) {
            final MethodInfo appliedMethod = applyTypeArgs(
                (MethodInfo) members.get(i),
                typeArguments
            );

            if (appliedMethod != null)
                candidates.add(appliedMethod);
View Full Code Here


    private static FieldInfo findField(
        final Type declaringType,
        final String fieldName,
        final Set<BindingFlags> flags) {

        final MemberList members = declaringType.findMembers(
            MemberType.fieldsOnly(),
            flags,
            Type.FilterNameIgnoreCase,
            fieldName
        );

        if (members == null || members.size() == 0) {
            throw Error.fieldDoesNotExistOnType(fieldName, declaringType);
        }

        return (FieldInfo) members.get(0);
    }
View Full Code Here

    private static FieldInfo findField(
        final Type declaringType,
        final String fieldName,
        final Set<BindingFlags> flags) {

        final MemberList members = declaringType.findMembers(
            MemberType.fieldsOnly(),
            flags,
            Type.FilterNameIgnoreCase,
            fieldName
        );

        if (members == null || members.size() == 0) {
            throw Error.fieldDoesNotExistOnType(fieldName, declaringType);
        }

        return (FieldInfo) members.get(0);
    }
View Full Code Here

        final String methodName,
        final TypeList typeArguments,
        final ExpressionList<? extends Expression> arguments,
        final Set<BindingFlags> flags) {

        final MemberList members = type.findMembers(
            MemberType.methodsOnly(),
            flags,
            Type.FilterNameIgnoreCase,
            methodName
        );

        if (members == null || members.size() == 0) {
            throw Error.methodDoesNotExistOnType(methodName, type);
        }

        final ArrayList<MethodInfo> candidates = new ArrayList<>(members.size());

        for (int i = 0, n = members.size(); i < n; i++) {
            final MethodInfo appliedMethod = applyTypeArgs(
                (MethodInfo) members.get(i),
                typeArguments
            );

            if (appliedMethod != null)
                candidates.add(appliedMethod);
View Full Code Here

TOP

Related Classes of com.strobel.reflection.MemberList

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.