Package org.eclipse.jdt.internal.compiler.ast

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


        if (this.contentsOffset + 3 >= this.contents.length) {
          resizeContents(3);
        }
        this.contents[this.contentsOffset++] = (byte) 'c';
        if (defaultValue instanceof ClassLiteralAccess) {
          ClassLiteralAccess classLiteralAccess = (ClassLiteralAccess) defaultValue;
          final int classInfoIndex = this.constantPool.literalIndex(classLiteralAccess.targetType.signature());
          this.contents[this.contentsOffset++] = (byte) (classInfoIndex >> 8);
          this.contents[this.contentsOffset++] = (byte) classInfoIndex;
        } else {
          this.contentsOffset = attributeOffset;
View Full Code Here


    org.eclipse.jdt.internal.compiler.ast.Annotation annotation = (org.eclipse.jdt.internal.compiler.ast.Annotation) expression;
    Object handle = acceptAnnotation(annotation, null, (JavaElement) this.handleStack.peek());
    memberValuePair.valueKind = IMemberValuePair.K_ANNOTATION;
    return handle;
  } else if (expression instanceof ClassLiteralAccess) {
    ClassLiteralAccess classLiteral = (ClassLiteralAccess) expression;
    char[] name = CharOperation.concatWith(classLiteral.type.getTypeName(), '.');
    memberValuePair.valueKind = IMemberValuePair.K_CLASS;
    return new String(name);
  } else if (expression instanceof QualifiedNameReference) {
    char[] qualifiedName = CharOperation.concatWith(((QualifiedNameReference) expression).tokens, '.');
View Full Code Here

    if (!(arg instanceof ClassLiteralAccess)) {
      reportRebindProblem(site, "Only class literals may be used as arguments to GWT.create()");
      return;
    }

    ClassLiteralAccess cla = (ClassLiteralAccess) arg;
    String typeName = String.valueOf(cla.targetType.readableName());
    if (!results.containsKey(typeName)) {
      results.put(typeName, site);
    }
  }
View Full Code Here

        if (this.contentsOffset + 3 >= this.contents.length) {
          resizeContents(3);
        }
        this.contents[this.contentsOffset++] = (byte) 'c';
        if (defaultValue instanceof ClassLiteralAccess) {
          ClassLiteralAccess classLiteralAccess = (ClassLiteralAccess) defaultValue;
          final int classInfoIndex = this.constantPool.literalIndex(classLiteralAccess.targetType.signature());
          this.contents[this.contentsOffset++] = (byte) (classInfoIndex >> 8);
          this.contents[this.contentsOffset++] = (byte) classInfoIndex;
        } else {
          this.contentsOffset = attributeOffset;
View Full Code Here

    org.eclipse.jdt.internal.compiler.ast.Annotation annotation = (org.eclipse.jdt.internal.compiler.ast.Annotation) expression;
    Object handle = acceptAnnotation(annotation, null, (JavaElement) this.handleStack.peek());
    memberValuePair.valueKind = IMemberValuePair.K_ANNOTATION;
    return handle;
  } else if (expression instanceof ClassLiteralAccess) {
    ClassLiteralAccess classLiteral = (ClassLiteralAccess) expression;
    char[] name = CharOperation.concatWith(classLiteral.type.getTypeName(), '.');
    memberValuePair.valueKind = IMemberValuePair.K_CLASS;
    return new String(name);
  } else if (expression instanceof QualifiedNameReference) {
    char[] qualifiedName = CharOperation.concatWith(((QualifiedNameReference) expression).tokens, '.');
View Full Code Here

        if (this.contentsOffset + 3 >= this.contents.length) {
          resizeContents(3);
        }
        this.contents[this.contentsOffset++] = (byte) 'c';
        if (defaultValue instanceof ClassLiteralAccess) {
          ClassLiteralAccess classLiteralAccess = (ClassLiteralAccess) defaultValue;
          final int classInfoIndex = this.constantPool.literalIndex(classLiteralAccess.targetType.signature());
          this.contents[this.contentsOffset++] = (byte) (classInfoIndex >> 8);
          this.contents[this.contentsOffset++] = (byte) classInfoIndex;
        } else {
          this.contentsOffset = attributeOffset;
View Full Code Here

        if (this.contentsOffset + 3 >= this.contents.length) {
          resizeContents(3);
        }
        this.contents[this.contentsOffset++] = (byte) 'c';
        if (defaultValue instanceof ClassLiteralAccess) {
          ClassLiteralAccess classLiteralAccess = (ClassLiteralAccess) defaultValue;
          final int classInfoIndex = this.constantPool.literalIndex(classLiteralAccess.targetType.signature());
          this.contents[this.contentsOffset++] = (byte) (classInfoIndex >> 8);
          this.contents[this.contentsOffset++] = (byte) classInfoIndex;
        } else {
          this.contentsOffset = attributeOffset;
View Full Code Here

      return Util.getAnnotationMemberValue(memberValuePair, expression.constant);
    } else if (expression instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) {
      memberValuePair.valueKind = IMemberValuePair.K_ANNOTATION;
      return getAnnotation((org.eclipse.jdt.internal.compiler.ast.Annotation) expression, parentElement);
    } else if (expression instanceof ClassLiteralAccess) {
      ClassLiteralAccess classLiteral = (ClassLiteralAccess) expression;
      char[] typeName = CharOperation.concatWith(classLiteral.type.getTypeName(), '.');
      memberValuePair.valueKind = IMemberValuePair.K_CLASS;
      return new String(typeName);
    } else if (expression instanceof QualifiedNameReference) {
      char[] qualifiedName = CharOperation.concatWith(((QualifiedNameReference) expression).tokens, '.');
View Full Code Here

  // PrimaryNoNewArray ::= Name Dims '.' 'class'
  this.intPtr--; // remove the class start position

  pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
  pushOnGenericsLengthStack(0);
  ClassLiteralAccess cla;
  pushOnExpressionStack(
    cla = new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(this.intStack[this.intPtr--])));
  rejectIllegalTypeAnnotations(cla.type); // javac correctly rejects annotations on dimensions here.
}
View Full Code Here

  TypeReference typeReference = getTypeReference(0);
 
  rejectIllegalTypeAnnotations(typeReference);

  pushOnExpressionStack(
    new ClassLiteralAccess(this.intStack[this.intPtr--], typeReference));
}
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.ast.ClassLiteralAccess

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.