Package com.strobel.assembler.metadata

Examples of com.strobel.assembler.metadata.MethodReference.resolve()


                            return cleanUpVariableName(methodName.substring(3));
                        }
                    }

                    final MethodDefinition definition = method.resolve();

                    if (definition != null) {
                        final ParameterDefinition p = getOrDefault(
                            definition.getParameters(),
                            parent.getCode() != AstCode.InitObject && !definition.isStatic() ? i - 1 : i
View Full Code Here


            if (parameter.getPosition() == parameter.getMethod().getParameters().size() - 1 &&
                parameter.getParameterType().isArray() &&
                parameter.getMethod() instanceof MethodReference) {

                final MethodReference method = (MethodReference) parameter.getMethod();
                final MethodDefinition resolvedMethod = method.resolve();

                if (resolvedMethod != null && Flags.testAny(resolvedMethod.getFlags(), Flags.ACC_VARARGS | Flags.VARARGS)) {
                    isVarArgs = true;
                }
            }
View Full Code Here

    public Void visitMethodGroupExpression(final MethodGroupExpression node, final Void data) {
        final MemberReference reference = node.getUserData(Keys.MEMBER_REFERENCE);

        if (reference instanceof MethodReference) {
            final MethodReference method = (MethodReference) reference;
            final MethodDefinition resolvedMethod = method.resolve();
            final DynamicCallSite callSite = node.getUserData(Keys.DYNAMIC_CALL_SITE);

            if (resolvedMethod != null && resolvedMethod.isSynthetic() && callSite != null) {
                inlineLambda(node, resolvedMethod);
                return null;
View Full Code Here

        if (method == null) {
            return null;
        }

        final MethodDefinition resolved = method.resolve();

        if (resolved == null || !resolved.isVarArgs()) {
            return null;
        }
View Full Code Here

    private boolean isContextWithinTypeInstance(final TypeReference type) {
        final MethodReference method = context.getCurrentMethod();

        if (method != null) {
            final MethodDefinition resolvedMethod = method.resolve();

            if (resolvedMethod != null && resolvedMethod.isStatic()) {
                return false;
            }
        }
View Full Code Here

            if (resolved != null && resolved.isLocalClass()) {
                final MethodReference declaringMethod = resolved.getDeclaringMethod();

                if (declaringMethod != null) {
                    final MethodDefinition resolvedDeclaringMethod = declaringMethod.resolve();

                    if (resolvedDeclaringMethod != null && resolvedDeclaringMethod.isStatic()) {
                        break;
                    }
                }
View Full Code Here

            if (parameter.getPosition() == parameter.getMethod().getParameters().size() - 1 &&
                parameter.getParameterType().isArray() &&
                parameter.getMethod() instanceof MethodReference) {

                final MethodReference method = (MethodReference) parameter.getMethod();
                final MethodDefinition resolvedMethod = method.resolve();

                if (resolvedMethod != null && Flags.testAny(resolvedMethod.getFlags(), Flags.ACC_VARARGS | Flags.VARARGS)) {
                    isVarArgs = true;
                }
            }
View Full Code Here

    private boolean isContextWithinTypeInstance(final TypeReference type) {
        final MethodReference method = context.getCurrentMethod();

        if (method != null) {
            final MethodDefinition resolvedMethod = method.resolve();

            if (resolvedMethod != null && resolvedMethod.isStatic()) {
                return false;
            }
        }
View Full Code Here

            if (resolved != null && resolved.isLocalClass()) {
                final MethodReference declaringMethod = resolved.getDeclaringMethod();

                if (declaringMethod != null) {
                    final MethodDefinition resolvedDeclaringMethod = declaringMethod.resolve();

                    if (resolvedDeclaringMethod != null && resolvedDeclaringMethod.isStatic()) {
                        break;
                    }
                }
View Full Code Here

        if (method == null) {
            return null;
        }

        final MethodDefinition resolved = method.resolve();

        if (resolved == null || !resolved.isVarArgs()) {
            return null;
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.