((CtClass) type).setSuperclass(jdtTreeBuilder.references.buildTypeReference(typeDeclaration.superclass, typeDeclaration.scope)); if (typeDeclaration.binding.isAnonymousType() || (typeDeclaration.binding instanceof LocalTypeBinding && typeDeclaration.binding.enclosingMethod() != null)) { type.setSimpleName(computeAnonymousName(typeDeclaration.binding.constantPoolName())); } else {
public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) { ASTNode location = typeDecl.binding.isAnonymousType() ? typeDecl.allocation.type : typeDecl.superclass; this.handle( IProblem.GenericTypeCannotExtendThrowable, new String[]{ new String(typeDecl.binding.readableName()) }, new String[]{ new String(typeDecl.binding.shortReadableName()) }, location.sourceStart, location.sourceEnd); } // use this private API when the compilation unit result can be found through the
public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) { ASTNode location = typeDecl.binding.isAnonymousType() ? typeDecl.allocation.type : typeDecl.superclass; this.handle( IProblem.GenericTypeCannotExtendThrowable, new String[]{ new String(typeDecl.binding.readableName()) }, new String[]{ new String(typeDecl.binding.shortReadableName()) }, location.sourceStart, location.sourceEnd); } // use this private API when the compilation unit result can be found through the
public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) { ASTNode location = typeDecl.binding.isAnonymousType() ? typeDecl.allocation.type : typeDecl.superclass; this.handle( IProblem.GenericTypeCannotExtendThrowable, new String[]{ new String(typeDecl.binding.readableName()) }, new String[]{ new String(typeDecl.binding.shortReadableName()) }, location.sourceStart, location.sourceEnd); } // use this private API when the compilation unit result can be found through the
public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) { ASTNode location = typeDecl.binding.isAnonymousType() ? typeDecl.allocation.type : typeDecl.superclass; this.handle( IProblem.GenericTypeCannotExtendThrowable, new String[]{ new String(typeDecl.binding.readableName()) }, new String[]{ new String(typeDecl.binding.shortReadableName()) }, location.sourceStart, location.sourceEnd); } // use this private API when the compilation unit result can be found through the
@Override public void endVisitValid(TypeDeclaration x, BlockScope scope) { endVisit(x); if (!x.binding.isAnonymousType()) { // Class declaration as a statement; insert a dummy statement. push(null); } }
public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) { ASTNode location = typeDecl.binding.isAnonymousType() ? typeDecl.allocation.type : typeDecl.superclass; this.handle( IProblem.GenericTypeCannotExtendThrowable, new String[]{ new String(typeDecl.binding.readableName()) }, new String[]{ new String(typeDecl.binding.shortReadableName()) }, location.sourceStart, location.sourceEnd); } // use this private API when the compilation unit result can be found through the
public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) { ASTNode location = typeDecl.binding.isAnonymousType() ? typeDecl.allocation.type : typeDecl.superclass; this.handle( IProblem.GenericTypeCannotExtendThrowable, new String[]{ new String(typeDecl.binding.readableName()) }, new String[]{ new String(typeDecl.binding.shortReadableName()) }, location.sourceStart, location.sourceEnd); } // use this private API when the compilation unit result can be found through the
public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) { ASTNode location = typeDecl.binding.isAnonymousType() ? typeDecl.allocation.type : typeDecl.superclass; this.handle( IProblem.GenericTypeCannotExtendThrowable, new String[]{ new String(typeDecl.binding.readableName()) }, new String[]{ new String(typeDecl.binding.shortReadableName()) }, location.sourceStart, location.sourceEnd); } // use this private API when the compilation unit result can be found through the
public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) { ASTNode location = typeDecl.binding.isAnonymousType() ? typeDecl.allocation.type : typeDecl.superclass; this.handle( IProblem.GenericTypeCannotExtendThrowable, new String[]{ new String(typeDecl.binding.readableName()) }, new String[]{ new String(typeDecl.binding.shortReadableName()) }, location.sourceStart, location.sourceEnd); } // use this private API when the compilation unit result can be found through the
public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) { ASTNode location = typeDecl.binding.isAnonymousType() ? typeDecl.allocation.type : typeDecl.superclass; this.handle( IProblem.GenericTypeCannotExtendThrowable, new String[]{ new String(typeDecl.binding.readableName()) }, new String[]{ new String(typeDecl.binding.shortReadableName()) }, location.sourceStart, location.sourceEnd); } // use this private API when the compilation unit result can be found through the
public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) { ASTNode location = typeDecl.binding.isAnonymousType() ? typeDecl.allocation.type : typeDecl.superclass; this.handle( IProblem.GenericTypeCannotExtendThrowable, new String[]{ new String(typeDecl.binding.readableName()) }, new String[]{ new String(typeDecl.binding.shortReadableName()) }, location.sourceStart, location.sourceEnd); } // use this private API when the compilation unit result can be found through the
public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) { ASTNode location = typeDecl.binding.isAnonymousType() ? typeDecl.allocation.type : typeDecl.superclass; this.handle( IProblem.GenericTypeCannotExtendThrowable, new String[]{ new String(typeDecl.binding.readableName()) }, new String[]{ new String(typeDecl.binding.shortReadableName()) }, location.sourceStart, location.sourceEnd); } // use this private API when the compilation unit result can be found through the
private char[] computePrefix(SourceTypeBinding declarationType, SourceTypeBinding invocationType, boolean isStatic){ StringBuffer completion = new StringBuffer(10); if (isStatic) { completion.append(declarationType.sourceName()); } else if (declarationType == invocationType) { completion.append(THIS); } else { if (!declarationType.isNestedType()) { completion.append(declarationType.sourceName()); completion.append('.'); completion.append(THIS); } else if (!declarationType.isAnonymousType()) { completion.append(declarationType.sourceName()); completion.append('.'); completion.append(THIS); } } return completion.toString().toCharArray(); }
private char[] computePrefix(SourceTypeBinding declarationType, SourceTypeBinding invocationType, boolean isStatic){ StringBuffer completion = new StringBuffer(10); if (isStatic) { completion.append(declarationType.sourceName()); } else if (TypeBinding.equalsEquals(declarationType, invocationType)) { completion.append(THIS); } else { if (!declarationType.isNestedType()) { completion.append(declarationType.sourceName()); completion.append('.'); completion.append(THIS); } else if (!declarationType.isAnonymousType()) { completion.append(declarationType.sourceName()); completion.append('.'); completion.append(THIS); } } return completion.toString().toCharArray(); }
private char[] computePrefix(SourceTypeBinding declarationType, SourceTypeBinding invocationType, boolean isStatic){ StringBuffer completion = new StringBuffer(10); if (isStatic) { completion.append(declarationType.sourceName()); } else if (TypeBinding.equalsEquals(declarationType, invocationType)) { completion.append(THIS); } else { if (!declarationType.isNestedType()) { completion.append(declarationType.sourceName()); completion.append('.'); completion.append(THIS); } else if (!declarationType.isAnonymousType()) { completion.append(declarationType.sourceName()); completion.append('.'); completion.append(THIS); } } return completion.toString().toCharArray(); }
private char[] computePrefix(SourceTypeBinding declarationType, SourceTypeBinding invocationType, boolean isStatic){ StringBuffer completion = new StringBuffer(10); if (isStatic) { completion.append(declarationType.sourceName()); } else if (TypeBinding.equalsEquals(declarationType, invocationType)) { completion.append(THIS); } else { if (!declarationType.isNestedType()) { completion.append(declarationType.sourceName()); completion.append('.'); completion.append(THIS); } else if (!declarationType.isAnonymousType()) { completion.append(declarationType.sourceName()); completion.append('.'); completion.append(THIS); } } return completion.toString().toCharArray(); }
private char[] computePrefix(SourceTypeBinding declarationType, SourceTypeBinding invocationType, boolean isStatic){ StringBuffer completion = new StringBuffer(10); if (isStatic) { completion.append(declarationType.sourceName()); } else if (TypeBinding.equalsEquals(declarationType, invocationType)) { completion.append(THIS); } else { if (!declarationType.isNestedType()) { completion.append(declarationType.sourceName()); completion.append('.'); completion.append(THIS); } else if (!declarationType.isAnonymousType()) { completion.append(declarationType.sourceName()); completion.append('.'); completion.append(THIS); } } return completion.toString().toCharArray(); }
@Override public boolean visit(TypeDeclaration memberTypeDeclaration, ClassScope scope) { Annotation[] annotations = memberTypeDeclaration.annotations; if (hasRelevantAnnotations(annotations)) { SourceTypeBinding binding = memberTypeDeclaration.binding; if (!(binding instanceof MemberTypeBinding)) { return true; } if (binding.isAnnotationType() || binding.isAnonymousType()) { return false; } String fqn = new String(memberTypeDeclaration.binding.readableName()); Item item = ClassItem.create(fqn, ClassKind.forType(memberTypeDeclaration)); addItem(fqn, item); addAnnotations(annotations, item); } return true; }
@Override public boolean visit(TypeDeclaration memberTypeDeclaration, ClassScope scope) { Annotation[] annotations = memberTypeDeclaration.annotations; if (hasRelevantAnnotations(annotations)) { SourceTypeBinding binding = memberTypeDeclaration.binding; if (!(binding instanceof MemberTypeBinding)) { return true; } if (binding.isAnnotationType() && TypedefCollector.isHiddenTypeDef(memberTypeDeclaration) || binding.isAnonymousType()) { return true; } String fqn = new String(memberTypeDeclaration.binding.readableName()); Item item = ClassItem.create(fqn, ClassKind.forType(memberTypeDeclaration)); addItem(fqn, item); addAnnotations(annotations, item); } return true; }