@Override public NestingKind getNestingKind() { ReferenceBinding refBinding = (ReferenceBinding)_binding; if (refBinding.isAnonymousType()) { return NestingKind.ANONYMOUS; } else if (refBinding.isLocalType()) { return NestingKind.LOCAL; } else if (refBinding.isMemberType()) { return NestingKind.MEMBER; } return NestingKind.TOP_LEVEL; }
@Override public NestingKind getNestingKind() { ReferenceBinding refBinding = (ReferenceBinding)_binding; if (refBinding.isAnonymousType()) { return NestingKind.ANONYMOUS; } else if (refBinding.isLocalType()) { return NestingKind.LOCAL; } else if (refBinding.isMemberType()) { return NestingKind.MEMBER; } return NestingKind.TOP_LEVEL; }
@Override public NestingKind getNestingKind() { ReferenceBinding refBinding = (ReferenceBinding)_binding; if (refBinding.isAnonymousType()) { return NestingKind.ANONYMOUS; } else if (refBinding.isLocalType()) { return NestingKind.LOCAL; } else if (refBinding.isMemberType()) { return NestingKind.MEMBER; } return NestingKind.TOP_LEVEL; }
@Override public boolean isMember() { if (isClass() || isInterface() || isEnum()) { ReferenceBinding referenceBinding = (ReferenceBinding) this.binding; return referenceBinding.isMemberType(); } return false; }
protected static void rejectAnnotationsOnStaticMemberQualififer(Scope scope, ReferenceBinding currentType, Annotation[] qualifierAnnot) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=385137 if (currentType.isMemberType() && currentType.isStatic() && qualifierAnnot != null && qualifierAnnot.length > 0) { scope.problemReporter().illegalTypeAnnotationsInStaticMemberAccess(qualifierAnnot[0], qualifierAnnot[qualifierAnnot.length - 1]); } }
protected static void rejectAnnotationsOnStaticMemberQualififer(Scope scope, ReferenceBinding currentType, Annotation[] qualifierAnnot) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=385137 if (currentType.isMemberType() && currentType.isStatic() && qualifierAnnot != null && qualifierAnnot.length > 0) { scope.problemReporter().illegalTypeAnnotationsInStaticMemberAccess(qualifierAnnot[0], qualifierAnnot[qualifierAnnot.length - 1]); } }
public boolean isMember() { if (isClass() || isInterface() || isEnum()) { ReferenceBinding referenceBinding = (ReferenceBinding) this.binding; return referenceBinding.isMemberType(); } return false; }
protected static void rejectAnnotationsOnStaticMemberQualififer(Scope scope, ReferenceBinding currentType, Annotation[] qualifierAnnot) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=385137 if (currentType.isMemberType() && currentType.isStatic() && qualifierAnnot != null && qualifierAnnot.length > 0) { scope.problemReporter().illegalTypeAnnotationsInStaticMemberAccess(qualifierAnnot[0], qualifierAnnot[qualifierAnnot.length - 1]); } }
public boolean isMember() { if (isClass() || isInterface() || isEnum()) { ReferenceBinding referenceBinding = (ReferenceBinding) this.binding; return referenceBinding.isMemberType(); } return false; }
protected static void rejectAnnotationsOnStaticMemberQualififer(Scope scope, ReferenceBinding currentType, Annotation[] qualifierAnnot) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=385137 if (currentType.isMemberType() && currentType.isStatic() && qualifierAnnot != null && qualifierAnnot.length > 0) { scope.problemReporter().illegalTypeAnnotationsInStaticMemberAccess(qualifierAnnot[0], qualifierAnnot[qualifierAnnot.length - 1]); } }
public boolean isLocal() { if (isClass() || isInterface() || isEnum()) { ReferenceBinding referenceBinding = (ReferenceBinding) this.binding; return referenceBinding.isLocalType() && !referenceBinding.isMemberType(); } return false; }
@Override public boolean isLocal() { if (isClass() || isInterface() || isEnum()) { ReferenceBinding referenceBinding = (ReferenceBinding) this.binding; return referenceBinding.isLocalType() && !referenceBinding.isMemberType(); } return false; }
@Override public Name getQualifiedName() { ReferenceBinding binding = (ReferenceBinding)_binding; char[] qName; if (binding.isMemberType()) { qName = CharOperation.concatWith(binding.enclosingType().compoundName, binding.sourceName, '.'); CharOperation.replace(qName, '$', '.'); } else { qName = CharOperation.concatWith(binding.compoundName, '.'); } return new NameImpl(qName); }
/** * 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 Name getQualifiedName() { ReferenceBinding binding = (ReferenceBinding)_binding; char[] qName; if (binding.isMemberType()) { qName = CharOperation.concatWith(binding.enclosingType().compoundName, binding.sourceName, '.'); CharOperation.replace(qName, '$', '.'); } else { qName = CharOperation.concatWith(binding.compoundName, '.'); } return new NameImpl(qName); }
@Override public Name getQualifiedName() { ReferenceBinding binding = (ReferenceBinding)_binding; char[] qName; if (binding.isMemberType()) { qName = CharOperation.concatWith(binding.enclosingType().compoundName, binding.sourceName, '.'); CharOperation.replace(qName, '$', '.'); } else { qName = CharOperation.concatWith(binding.compoundName, '.'); } return new NameImpl(qName); }
/** * 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". */ public char[] qualifiedSourceName() { if (isMemberType()) return CharOperation.concat(enclosingType().qualifiedSourceName(), sourceName(), '.'); return sourceName(); }
@Override public Name getQualifiedName() { ReferenceBinding binding = (ReferenceBinding)_binding; char[] qName; if (binding.isMemberType()) { qName = CharOperation.concatWith(binding.enclosingType().compoundName, binding.sourceName, '.'); CharOperation.replace(qName, '$', '.'); } else { qName = CharOperation.concatWith(binding.compoundName, '.'); } return new NameImpl(qName); }
/** * 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". */ public char[] qualifiedSourceName() { if (isMemberType()) return CharOperation.concat(enclosingType().qualifiedSourceName(), sourceName(), '.'); return sourceName(); }
public static char[] qualifiedSourceName(TypeBinding binding) { if (binding instanceof ReferenceBinding) { ReferenceBinding type = (ReferenceBinding) binding; if (type.isLocalType()) return type.isMemberType() ? CharOperation.concat(qualifiedSourceName(type.enclosingType()), type.sourceName(), '.') : CharOperation.concat(qualifiedSourceName(type.enclosingType()), new char[] {'.', '1', '.'}, type.sourceName()); } return binding != null ? binding.qualifiedSourceName() : null; }