Examples of TypeReference


Examples of org.eclipse.xtend.lib.macro.declaration.TypeReference

   
    public boolean areListedInterfacesValid(final MemberDeclaration delegate) {
      boolean _xblockexpression = false;
      {
        TypeDeclaration _declaringType = delegate.getDeclaringType();
        final TypeReference declaringType = this.context.newSelfTypeReference(_declaringType);
        final Set<? extends TypeReference> interfacesOfDeclaringType = this.getImplementedInterfaces(declaringType);
        TypeReference _type = this.getType(delegate);
        final Set<? extends TypeReference> availableInterfaces = this.getImplementedInterfaces(_type);
        final Set<TypeReference> listedInterfaces = this.listedInterfaces(delegate);
        boolean valid = true;
        for (final TypeReference iface : listedInterfaces) {
          {
            final Function1<TypeReference, Boolean> _function = new Function1<TypeReference, Boolean>() {
              public Boolean apply(final TypeReference it) {
                Type _type = it.getType();
                Type _type_1 = iface.getType();
                return Boolean.valueOf(Objects.equal(_type, _type_1));
              }
            };
            boolean _exists = IterableExtensions.exists(availableInterfaces, _function);
            boolean _not = (!_exists);
            if (_not) {
              StringConcatenation _builder = new StringConcatenation();
              TypeReference _type_1 = this.getType(delegate);
              String _simpleName = _type_1.getSimpleName();
              _builder.append(_simpleName, "");
              _builder.append(" does not implement ");
              String _simpleName_1 = iface.getSimpleName();
              _builder.append(_simpleName_1, "");
              this.context.addError(delegate, _builder.toString());
              valid = false;
            }
            final Function1<TypeReference, Boolean> _function_1 = new Function1<TypeReference, Boolean>() {
              public Boolean apply(final TypeReference it) {
                Type _type = it.getType();
                Type _type_1 = iface.getType();
                return Boolean.valueOf(Objects.equal(_type, _type_1));
              }
            };
            boolean _exists_1 = IterableExtensions.exists(interfacesOfDeclaringType, _function_1);
            boolean _not_1 = (!_exists_1);
            if (_not_1) {
              StringConcatenation _builder_1 = new StringConcatenation();
              String _simpleName_2 = declaringType.getSimpleName();
              _builder_1.append(_simpleName_2, "");
              _builder_1.append(" does not implement ");
              String _simpleName_3 = iface.getSimpleName();
              _builder_1.append(_simpleName_3, "");
              this.context.addError(delegate, _builder_1.toString());
              valid = false;
            }
          }
        }
        boolean _and = false;
        boolean _isEmpty = listedInterfaces.isEmpty();
        if (!_isEmpty) {
          _and = false;
        } else {
          Sets.SetView<? extends TypeReference> _intersection = Sets.intersection(interfacesOfDeclaringType, availableInterfaces);
          boolean _isEmpty_1 = _intersection.isEmpty();
          _and = _isEmpty_1;
        }
        if (_and) {
          StringConcatenation _builder = new StringConcatenation();
          TypeReference _type_1 = this.getType(delegate);
          String _simpleName = _type_1.getSimpleName();
          _builder.append(_simpleName, "");
          _builder.append(" and ");
          String _simpleName_1 = declaringType.getSimpleName();
          _builder.append(_simpleName_1, "");
          _builder.append(" have no interfaces in common");
View Full Code Here

Examples of org.glassfish.hk2.external.org.objectweb.asm.TypeReference

            buf.append(", ");
        }
    }

    private void appendTypeReference(final int typeRef) {
        TypeReference ref = new TypeReference(typeRef);
        switch (ref.getSort()) {
        case TypeReference.CLASS_TYPE_PARAMETER:
            buf.append("CLASS_TYPE_PARAMETER ").append(
                    ref.getTypeParameterIndex());
            break;
        case TypeReference.METHOD_TYPE_PARAMETER:
            buf.append("METHOD_TYPE_PARAMETER ").append(
                    ref.getTypeParameterIndex());
            break;
        case TypeReference.CLASS_EXTENDS:
            buf.append("CLASS_EXTENDS ").append(ref.getSuperTypeIndex());
            break;
        case TypeReference.CLASS_TYPE_PARAMETER_BOUND:
            buf.append("CLASS_TYPE_PARAMETER_BOUND ")
                    .append(ref.getTypeParameterIndex()).append(", ")
                    .append(ref.getTypeParameterBoundIndex());
            break;
        case TypeReference.METHOD_TYPE_PARAMETER_BOUND:
            buf.append("METHOD_TYPE_PARAMETER_BOUND ")
                    .append(ref.getTypeParameterIndex()).append(", ")
                    .append(ref.getTypeParameterBoundIndex());
            break;
        case TypeReference.FIELD:
            buf.append("FIELD");
            break;
        case TypeReference.METHOD_RETURN:
            buf.append("METHOD_RETURN");
            break;
        case TypeReference.METHOD_RECEIVER:
            buf.append("METHOD_RECEIVER");
            break;
        case TypeReference.METHOD_FORMAL_PARAMETER:
            buf.append("METHOD_FORMAL_PARAMETER ").append(
                    ref.getFormalParameterIndex());
            break;
        case TypeReference.THROWS:
            buf.append("THROWS ").append(ref.getExceptionIndex());
            break;
        case TypeReference.LOCAL_VARIABLE:
            buf.append("LOCAL_VARIABLE");
            break;
        case TypeReference.RESOURCE_VARIABLE:
            buf.append("RESOURCE_VARIABLE");
            break;
        case TypeReference.EXCEPTION_PARAMETER:
            buf.append("EXCEPTION_PARAMETER ").append(
                    ref.getTryCatchBlockIndex());
            break;
        case TypeReference.INSTANCEOF:
            buf.append("INSTANCEOF");
            break;
        case TypeReference.NEW:
            buf.append("NEW");
            break;
        case TypeReference.CONSTRUCTOR_REFERENCE:
            buf.append("CONSTRUCTOR_REFERENCE");
            break;
        case TypeReference.METHOD_REFERENCE:
            buf.append("METHOD_REFERENCE");
            break;
        case TypeReference.CAST:
            buf.append("CAST ").append(ref.getTypeArgumentIndex());
            break;
        case TypeReference.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT:
            buf.append("CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        case TypeReference.METHOD_INVOCATION_TYPE_ARGUMENT:
            buf.append("METHOD_INVOCATION_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        case TypeReference.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT:
            buf.append("CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        case TypeReference.METHOD_REFERENCE_TYPE_ARGUMENT:
            buf.append("METHOD_REFERENCE_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        }
    }
View Full Code Here

Examples of org.jf.dexlib2.iface.reference.TypeReference

        @Override @Nullable public StringReference getNameReference() {
            return debugItem.getNameReference();
        }

        @Override @Nullable public TypeReference getTypeReference() {
            TypeReference typeReference = debugItem.getTypeReference();
            if (typeReference == null) {
                return null;
            }

            return RewriterUtils.rewriteTypeReference(rewriters.getTypeRewriter(), typeReference);
View Full Code Here

Examples of org.mvel2.asm.TypeReference

            buf.append(", ");
        }
    }

    private void appendTypeReference(final int typeRef) {
        TypeReference ref = new TypeReference(typeRef);
        switch (ref.getSort()) {
        case TypeReference.CLASS_TYPE_PARAMETER:
            buf.append("CLASS_TYPE_PARAMETER ").append(
                    ref.getTypeParameterIndex());
            break;
        case TypeReference.METHOD_TYPE_PARAMETER:
            buf.append("METHOD_TYPE_PARAMETER ").append(
                    ref.getTypeParameterIndex());
            break;
        case TypeReference.CLASS_EXTENDS:
            buf.append("CLASS_EXTENDS ").append(ref.getSuperTypeIndex());
            break;
        case TypeReference.CLASS_TYPE_PARAMETER_BOUND:
            buf.append("CLASS_TYPE_PARAMETER_BOUND ")
                    .append(ref.getTypeParameterIndex()).append(", ")
                    .append(ref.getTypeParameterBoundIndex());
            break;
        case TypeReference.METHOD_TYPE_PARAMETER_BOUND:
            buf.append("METHOD_TYPE_PARAMETER_BOUND ")
                    .append(ref.getTypeParameterIndex()).append(", ")
                    .append(ref.getTypeParameterBoundIndex());
            break;
        case TypeReference.FIELD:
            buf.append("FIELD");
            break;
        case TypeReference.METHOD_RETURN:
            buf.append("METHOD_RETURN");
            break;
        case TypeReference.METHOD_RECEIVER:
            buf.append("METHOD_RECEIVER");
            break;
        case TypeReference.METHOD_FORMAL_PARAMETER:
            buf.append("METHOD_FORMAL_PARAMETER ").append(
                    ref.getFormalParameterIndex());
            break;
        case TypeReference.THROWS:
            buf.append("THROWS ").append(ref.getExceptionIndex());
            break;
        case TypeReference.LOCAL_VARIABLE:
            buf.append("LOCAL_VARIABLE");
            break;
        case TypeReference.RESOURCE_VARIABLE:
            buf.append("RESOURCE_VARIABLE");
            break;
        case TypeReference.EXCEPTION_PARAMETER:
            buf.append("EXCEPTION_PARAMETER ").append(
                    ref.getTryCatchBlockIndex());
            break;
        case TypeReference.INSTANCEOF:
            buf.append("INSTANCEOF");
            break;
        case TypeReference.NEW:
            buf.append("NEW");
            break;
        case TypeReference.CONSTRUCTOR_REFERENCE:
            buf.append("CONSTRUCTOR_REFERENCE");
            break;
        case TypeReference.METHOD_REFERENCE:
            buf.append("METHOD_REFERENCE");
            break;
        case TypeReference.CAST:
            buf.append("CAST ").append(ref.getTypeArgumentIndex());
            break;
        case TypeReference.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT:
            buf.append("CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        case TypeReference.METHOD_INVOCATION_TYPE_ARGUMENT:
            buf.append("METHOD_INVOCATION_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        case TypeReference.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT:
            buf.append("CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        case TypeReference.METHOD_REFERENCE_TYPE_ARGUMENT:
            buf.append("METHOD_REFERENCE_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        }
    }
View Full Code Here

Examples of org.objectweb.asm.TypeReference

            buf.append(", ");
        }
    }

    private void appendTypeReference(final int typeRef) {
        TypeReference ref = new TypeReference(typeRef);
        switch (ref.getSort()) {
        case TypeReference.CLASS_TYPE_PARAMETER:
            buf.append("CLASS_TYPE_PARAMETER ").append(
                    ref.getTypeParameterIndex());
            break;
        case TypeReference.METHOD_TYPE_PARAMETER:
            buf.append("METHOD_TYPE_PARAMETER ").append(
                    ref.getTypeParameterIndex());
            break;
        case TypeReference.CLASS_EXTENDS:
            buf.append("CLASS_EXTENDS ").append(ref.getSuperTypeIndex());
            break;
        case TypeReference.CLASS_TYPE_PARAMETER_BOUND:
            buf.append("CLASS_TYPE_PARAMETER_BOUND ")
                    .append(ref.getTypeParameterIndex()).append(", ")
                    .append(ref.getTypeParameterBoundIndex());
            break;
        case TypeReference.METHOD_TYPE_PARAMETER_BOUND:
            buf.append("METHOD_TYPE_PARAMETER_BOUND ")
                    .append(ref.getTypeParameterIndex()).append(", ")
                    .append(ref.getTypeParameterBoundIndex());
            break;
        case TypeReference.FIELD:
            buf.append("FIELD");
            break;
        case TypeReference.METHOD_RETURN:
            buf.append("METHOD_RETURN");
            break;
        case TypeReference.METHOD_RECEIVER:
            buf.append("METHOD_RECEIVER");
            break;
        case TypeReference.METHOD_FORMAL_PARAMETER:
            buf.append("METHOD_FORMAL_PARAMETER ").append(
                    ref.getFormalParameterIndex());
            break;
        case TypeReference.THROWS:
            buf.append("THROWS ").append(ref.getExceptionIndex());
            break;
        case TypeReference.LOCAL_VARIABLE:
            buf.append("LOCAL_VARIABLE");
            break;
        case TypeReference.RESOURCE_VARIABLE:
            buf.append("RESOURCE_VARIABLE");
            break;
        case TypeReference.EXCEPTION_PARAMETER:
            buf.append("EXCEPTION_PARAMETER ").append(
                    ref.getTryCatchBlockIndex());
            break;
        case TypeReference.INSTANCEOF:
            buf.append("INSTANCEOF");
            break;
        case TypeReference.NEW:
            buf.append("NEW");
            break;
        case TypeReference.CONSTRUCTOR_REFERENCE:
            buf.append("CONSTRUCTOR_REFERENCE");
            break;
        case TypeReference.METHOD_REFERENCE:
            buf.append("METHOD_REFERENCE");
            break;
        case TypeReference.CAST:
            buf.append("CAST ").append(ref.getTypeArgumentIndex());
            break;
        case TypeReference.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT:
            buf.append("CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        case TypeReference.METHOD_INVOCATION_TYPE_ARGUMENT:
            buf.append("METHOD_INVOCATION_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        case TypeReference.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT:
            buf.append("CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        case TypeReference.METHOD_REFERENCE_TYPE_ARGUMENT:
            buf.append("METHOD_REFERENCE_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        }
    }
View Full Code Here

Examples of org.springframework.expression.spel.ast.TypeReference

      nextToken();
      eatToken(TokenKind.LPAREN);
      SpelNodeImpl node = eatPossiblyQualifiedId();
      // dotted qualified id
      eatToken(TokenKind.RPAREN);
      constructedNodes.push(new TypeReference(toPos(typeName),node));
      return true;
    }
    return false;
  }
View Full Code Here

Examples of scala.tools.asm.TypeReference

            buf.append(", ");
        }
    }

    private void appendTypeReference(final int typeRef) {
        TypeReference ref = new TypeReference(typeRef);
        switch (ref.getSort()) {
        case TypeReference.CLASS_TYPE_PARAMETER:
            buf.append("CLASS_TYPE_PARAMETER ").append(
                    ref.getTypeParameterIndex());
            break;
        case TypeReference.METHOD_TYPE_PARAMETER:
            buf.append("METHOD_TYPE_PARAMETER ").append(
                    ref.getTypeParameterIndex());
            break;
        case TypeReference.CLASS_EXTENDS:
            buf.append("CLASS_EXTENDS ").append(ref.getSuperTypeIndex());
            break;
        case TypeReference.CLASS_TYPE_PARAMETER_BOUND:
            buf.append("CLASS_TYPE_PARAMETER_BOUND ")
                    .append(ref.getTypeParameterIndex()).append(", ")
                    .append(ref.getTypeParameterBoundIndex());
            break;
        case TypeReference.METHOD_TYPE_PARAMETER_BOUND:
            buf.append("METHOD_TYPE_PARAMETER_BOUND ")
                    .append(ref.getTypeParameterIndex()).append(", ")
                    .append(ref.getTypeParameterBoundIndex());
            break;
        case TypeReference.FIELD:
            buf.append("FIELD");
            break;
        case TypeReference.METHOD_RETURN:
            buf.append("METHOD_RETURN");
            break;
        case TypeReference.METHOD_RECEIVER:
            buf.append("METHOD_RECEIVER");
            break;
        case TypeReference.METHOD_FORMAL_PARAMETER:
            buf.append("METHOD_FORMAL_PARAMETER ").append(
                    ref.getFormalParameterIndex());
            break;
        case TypeReference.THROWS:
            buf.append("THROWS ").append(ref.getExceptionIndex());
            break;
        case TypeReference.LOCAL_VARIABLE:
            buf.append("LOCAL_VARIABLE");
            break;
        case TypeReference.RESOURCE_VARIABLE:
            buf.append("RESOURCE_VARIABLE");
            break;
        case TypeReference.EXCEPTION_PARAMETER:
            buf.append("EXCEPTION_PARAMETER ").append(
                    ref.getTryCatchBlockIndex());
            break;
        case TypeReference.INSTANCEOF:
            buf.append("INSTANCEOF");
            break;
        case TypeReference.NEW:
            buf.append("NEW");
            break;
        case TypeReference.CONSTRUCTOR_REFERENCE:
            buf.append("CONSTRUCTOR_REFERENCE");
            break;
        case TypeReference.METHOD_REFERENCE:
            buf.append("METHOD_REFERENCE");
            break;
        case TypeReference.CAST:
            buf.append("CAST ").append(ref.getTypeArgumentIndex());
            break;
        case TypeReference.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT:
            buf.append("CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        case TypeReference.METHOD_INVOCATION_TYPE_ARGUMENT:
            buf.append("METHOD_INVOCATION_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        case TypeReference.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT:
            buf.append("CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        case TypeReference.METHOD_REFERENCE_TYPE_ARGUMENT:
            buf.append("METHOD_REFERENCE_TYPE_ARGUMENT ").append(
                    ref.getTypeArgumentIndex());
            break;
        }
    }
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.