/** * Searches a type from an entry-point according to a simple name. * * @param type * Entry-point to search. * @param simpleName * Expected type name. * @return type binding. */ static TypeBinding searchTypeBinding(ReferenceBinding type, String simpleName) { if (simpleName == null || type == null) { return null; } if (type.memberTypes() != null) { for (ReferenceBinding memberType : type.memberTypes()) { if (simpleName.equals(CharOperation.charToString(memberType.sourceName()))) { return memberType; } } } return searchTypeBinding(type.superclass(), simpleName); }
if (!"Target".equals(CharOperation.charToString(annotation.getAnnotationType().sourceName()))) { continue;
/** * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#sourceName() */ public char[] sourceName() { return this.type.sourceName(); }
/** * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#sourceName() */ @Override public char[] sourceName() { return this.type.sourceName(); }
public void nativeMethodsCannotBeStrictfp(ReferenceBinding type, AbstractMethodDeclaration methodDecl) { String[] arguments = new String[] {new String(type.sourceName()), new String(methodDecl.selector)}; this.handle( IProblem.NativeMethodsCannotBeStrictfp, arguments, arguments, methodDecl.sourceStart, methodDecl.sourceEnd); } public void needImplementation(ASTNode location) {
@Override public Name getSimpleName() { ReferenceBinding binding = (ReferenceBinding)_binding; return new NameImpl(binding.sourceName()); } }
@Override public Name getSimpleName() { ReferenceBinding binding = (ReferenceBinding)_binding; return new NameImpl(binding.sourceName()); }
public void unexpectedStaticModifierForMethod(ReferenceBinding type, AbstractMethodDeclaration methodDecl) { String[] arguments = new String[] {new String(type.sourceName()), new String(methodDecl.selector)}; this.handle( IProblem.UnexpectedStaticModifierForMethod, arguments, arguments, methodDecl.sourceStart, methodDecl.sourceEnd); } public void unhandledException(TypeBinding exceptionType, ASTNode location) {
public void illegalVisibilityModifierCombinationForMethod(ReferenceBinding type, AbstractMethodDeclaration methodDecl) { String[] arguments = new String[] {new String(type.sourceName()), new String(methodDecl.selector)}; this.handle( IProblem.IllegalVisibilityModifierCombinationForMethod, arguments, arguments, methodDecl.sourceStart, methodDecl.sourceEnd); } public void illegalVisibilityModifierForInterfaceMemberType(SourceTypeBinding type) {
public void illegalAbstractModifierCombinationForMethod(ReferenceBinding type, AbstractMethodDeclaration methodDecl) { String[] arguments = new String[] {new String(type.sourceName()), new String(methodDecl.selector)}; this.handle( IProblem.IllegalAbstractModifierCombinationForMethod, arguments, arguments, methodDecl.sourceStart, methodDecl.sourceEnd); } public void illegalAbstractModifierCombinationForMethod(AbstractMethodDeclaration methodDecl) {
public void illegalVisibilityModifierCombinationForMethod(ReferenceBinding type, AbstractMethodDeclaration methodDecl) { String[] arguments = new String[] {new String(type.sourceName()), new String(methodDecl.selector)}; this.handle( IProblem.IllegalVisibilityModifierCombinationForMethod, arguments, arguments, methodDecl.sourceStart, methodDecl.sourceEnd); } public void illegalVisibilityModifierForInterfaceMemberType(SourceTypeBinding type) {
public void duplicateModifierForMethod(ReferenceBinding type, AbstractMethodDeclaration methodDecl) { this.handle( IProblem.DuplicateModifierForMethod, new String[] {new String(type.sourceName()), new String(methodDecl.selector)}, new String[] {new String(type.shortReadableName()), new String(methodDecl.selector)}, methodDecl.sourceStart, methodDecl.sourceEnd); } public void duplicateModifierForType(SourceTypeBinding type) {
/** * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#debugName() */ @Override public String debugName() { if (this.hasTypeAnnotations()) return annotatedDebugName(); StringBuffer nameBuffer = new StringBuffer(10); nameBuffer.append(actualType().sourceName()).append("#RAW"); //$NON-NLS-1$ return nameBuffer.toString(); } @Override
/** * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#debugName() */ public String debugName() { if (this.hasTypeAnnotations()) return annotatedDebugName(); StringBuffer nameBuffer = new StringBuffer(10); nameBuffer.append(actualType().sourceName()).append("#RAW"); //$NON-NLS-1$ return nameBuffer.toString(); } public String annotatedDebugName() {
/** * Answer the source name for the type. * In the case of member types, as the qualified name from its top level type. * For example, for a member type N defined inside M & A: "A.M.N". */ @Override public char[] qualifiedSourceName() { if (isMemberType()) return CharOperation.concat(enclosingType().qualifiedSourceName(), sourceName(), '.'); return sourceName(); }
@Override public String getName() { ITypeBinding annotationType = getAnnotationType(); if (annotationType == null) { return new String(this.binding.getAnnotationType().sourceName()); } else { return annotationType.getName(); } }
public char[] sourceName() { if (isAnonymousType()) { return CharOperation.concat(TypeConstants.ANONYM_PREFIX, anonymousOriginalSuperType().sourceName(), TypeConstants.ANONYM_SUFFIX); } else return this.sourceName; }
public char[] signature() { if (!isPrototype()) return this.prototype.signature(); if (this.signature == null && this.constantPoolName == null) { if (isAnonymousType()) setConstantPoolName(superclass().sourceName()); else setConstantPoolName(sourceName()); } return super.signature(); }
@Override public char[] signature() { if (!isPrototype()) return this.prototype.signature(); if (this.signature == null && this.constantPoolName == null) { if (isAnonymousType()) setConstantPoolName(superclass().sourceName()); else setConstantPoolName(sourceName()); } return super.signature(); }
public char[] genericTypeSignature() { if (!isPrototype()) return this.prototype.genericTypeSignature(); if (this.genericReferenceTypeSignature == null && this.constantPoolName == null) { if (isAnonymousType()) setConstantPoolName(superclass().sourceName()); else setConstantPoolName(sourceName()); } return super.genericTypeSignature(); }