Examples of GoTypeName


Examples of ro.redeul.google.go.lang.psi.typing.GoTypeName

        Queue<GoTypeName> typeNamesToExplore = new LinkedList<GoTypeName>();
        typeNamesToExplore.offer(type);

        while ( ! typeNamesToExplore.isEmpty() ) {
            GoTypeName currentTypeName = typeNamesToExplore.poll();

            receiverTypes.add(currentTypeName);

            GoType underlyingType = currentTypeName.underlyingType();
            if ( !(underlyingType instanceof GoTypeStruct) )
                continue;

            GoTypeStruct typeStruct = (GoTypeStruct) underlyingType;
            for (GoTypeStructAnonymousField field : typeStruct.getPsiType().getAnonymousFields()) {
                GoPsiType psiType = field.getType();
                if ( psiType == null)
                    continue;
                if ( psiType instanceof GoPsiTypePointer) {
                    psiType = ((GoPsiTypePointer) psiType).getTargetType();
                }

                GoType embeddedType = GoTypes.fromPsi(psiType);
                if (!(embeddedType instanceof GoTypeName))
                    continue;

                GoTypeName embeddedTypeName = (GoTypeName) embeddedType;
                if (! receiverTypes.contains(embeddedTypeName) )
                    typeNamesToExplore.offer(embeddedTypeName);

                receiverTypes.add(embeddedTypeName);
            }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.typing.GoTypeName

                    receiverType = ((GoTypePointer) receiverType).getTargetType();

                if (!(receiverType instanceof GoTypeName))
                    return false;

                GoTypeName methodTypeName = (GoTypeName) receiverType;

                Set<GoTypeName> receiverTypes = reference.resolveBaseReceiverTypes();

                GoLiteralIdentifier identifier = reference.getElement();
                if (identifier == null)
                    return false;

                for (GoTypeName type : receiverTypes) {
                    if ( type.getName().equals(methodTypeName.getName())) {
                        String methodName = declaration.getFunctionName();

                        return matchNames(reference.name(), methodName);
                    }
                }
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.