Examples of TypeReference


Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeReference

  }
 
  private static Annotation makeSingleStringMemberAnnotation(char[][] name, int pos, String annValue) {
    long[] positions = new long[name.length];
    for (int i = 0; i < positions.length; i++) positions[i] = pos;
    TypeReference annType = new QualifiedTypeReference(name,positions);
    NormalAnnotation ann = new NormalAnnotation(annType,pos);
    Expression valueExpr = new StringLiteral(annValue.toCharArray(),pos,pos,1);
    MemberValuePair[] mvps = new MemberValuePair[1];
    mvps[0] = new MemberValuePair(value,pos,pos,valueExpr);
    ann.memberValuePairs = mvps;
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeReference

    simpleName.internalSetIdentifier(new String(typeParameter.name));
    int start = typeParameter.sourceStart;
    int end = typeParameter.sourceEnd;
    simpleName.setSourceRange(start, end - start + 1);
    typeParameter2.setName(simpleName);
    final TypeReference superType = typeParameter.type;
    end = typeParameter.declarationSourceEnd;
    if (superType != null) {
      Type type = convertType(superType);
      typeParameter2.typeBounds().add(type);
      end = type.getStartPosition() + type.getLength() - 1;
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeReference

        }
    return qualifiedName;
  }
 
  protected void setTypeNameForAnnotation(org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation compilerAnnotation, Annotation annotation) {
    TypeReference typeReference = compilerAnnotation.type;
    if (typeReference instanceof QualifiedTypeReference) {
      QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) typeReference;
      char[][] tokens = qualifiedTypeReference.tokens;
      long[] positions = qualifiedTypeReference.sourcePositions;
      // QualifiedName
View Full Code Here

Examples of org.codehaus.jackson.type.TypeReference

    // TODO, assume the url is a file path for now.
    java.nio.file.Path preferenceFile = Paths.get(preferenceFileUrl);
    try {
      ObjectMapper om = new ObjectMapper();
      TypeReference readType = new TypeReference<HashMap<String, Object>>() {
      };
      Map<String, Object> prefs = om.readValue(preferenceFile.toFile(), readType);
      Boolean oldValue = (Boolean) prefs.get("allow-anonymous-usage-tracking");
      // If value changed, write it to the file too
      if ((this.isAllowAnonymousTracking == null && oldValue != null)
View Full Code Here

Examples of org.codehaus.jackson.type.TypeReference

    // TODO, assume the url is a file path for now.
    java.nio.file.Path preferenceFile = Paths.get(preferenceFileUrl);
    try {
      ObjectMapper om = new ObjectMapper();
      TypeReference readType = new TypeReference<HashMap<String, Object>>() {
      };
      Map<String, Object> prefs = om.readValue(preferenceFile.toFile(), readType);
      Boolean oldValue = (Boolean) prefs.get("advanced-mode");
      // If value changed, write it to the file too
      if ((this.isUseAdvancedMode == null && oldValue != null)
View Full Code Here

Examples of org.eclipse.dltk.ast.references.TypeReference

        } else {
          description = url;
        }
        link = String.format("<a href=\"%s\">%s</a>", url, description); //$NON-NLS-1$
      } else {
        link = handleLinks(Arrays.asList(new TypeReference(0, 0, url)))
            .toString();
      }
      replaceLinks.add(new ReplaceEdit(m.start(), m.end() - m.start(),
          link));
    }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.TypeReference

    }
  }

  boolean foundReturnTypeProblem = false;
  if (!method.isConstructor()) {
    TypeReference returnType = methodDecl instanceof MethodDeclaration
      ? ((MethodDeclaration) methodDecl).returnType
      : null;
    if (returnType == null) {
      methodDecl.scope.problemReporter().missingReturnType(methodDecl);
      method.returnType = null;
      foundReturnTypeProblem = true;
    } else {
      TypeBinding methodType = returnType.resolveType(methodDecl.scope, true /* check bounds*/);
      if (methodType == null) {
        foundReturnTypeProblem = true;
      } else if (methodType.isArrayType() && ((ArrayBinding) methodType).leafComponentType == TypeBinding.VOID) {
        methodDecl.scope.problemReporter().returnTypeCannotBeVoidArray((MethodDeclaration) methodDecl);
        foundReturnTypeProblem = true;
View Full Code Here

Examples of org.eclipse.persistence.internal.libraries.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.eclipse.xtend.lib.macro.declaration.TypeReference

    }
   
    public boolean hasValidType(final MemberDeclaration it) {
      boolean _xifexpression = false;
      boolean _or = false;
      TypeReference _type = this.getType(it);
      boolean _equals = Objects.equal(_type, null);
      if (_equals) {
        _or = true;
      } else {
        TypeReference _type_1 = this.getType(it);
        boolean _isInferred = _type_1.isInferred();
        _or = _isInferred;
      }
      if (_or) {
        boolean _xblockexpression = false;
        {
View Full Code Here

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

      if (!_matched) {
        if (Objects.equal(_list, Collections.<Object>unmodifiableList(CollectionLiterals.<Object>newArrayList()))) {
          _matched=true;
        }
        if (!_matched) {
          TypeReference _string = this.context.getString();
          if (Objects.equal(_list, Collections.<TypeReference>unmodifiableList(CollectionLiterals.<TypeReference>newArrayList(_string)))) {
            _matched=true;
          }
        }
        if (!_matched) {
          TypeReference _string_1 = this.context.getString();
          TypeReference _newWildcardTypeReference = this.context.newWildcardTypeReference();
          TypeReference _newTypeReference = this.context.newTypeReference(Class.class, _newWildcardTypeReference);
          TypeReference _newArrayTypeReference = this.context.newArrayTypeReference(_newTypeReference);
          TypeReference _object = this.context.getObject();
          TypeReference _newArrayTypeReference_1 = this.context.newArrayTypeReference(_object);
          if (Objects.equal(_list, Collections.<TypeReference>unmodifiableList(CollectionLiterals.<TypeReference>newArrayList(_string_1, _newArrayTypeReference, _newArrayTypeReference_1)))) {
            _matched=true;
          }
        }
        if (_matched) {
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.