本文整理了Java中org.eclipse.jdt.internal.compiler.lookup.BlockScope.tagAsAccessingEnclosingInstanceStateOf()
方法的一些代码示例,展示了BlockScope.tagAsAccessingEnclosingInstanceStateOf()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BlockScope.tagAsAccessingEnclosingInstanceStateOf()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.lookup.BlockScope
类名称:BlockScope
方法名:tagAsAccessingEnclosingInstanceStateOf
暂无
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public boolean checkAccess(BlockScope scope, ReferenceBinding thisType) {
// this/super cannot be used in constructor call
MethodScope methodScope = scope.methodScope();
if (this.evaluationContext.isConstructorCall) {
methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
return false;
}
// static may not refer to this/super
if (this.evaluationContext.declaringTypeName == null || this.evaluationContext.isStatic) {
methodScope.problemReporter().errorThisSuperInStatic(this);
return false;
}
scope.tagAsAccessingEnclosingInstanceStateOf(thisType, false /* type variable access */);
return true;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public boolean checkAccess(BlockScope scope, ReferenceBinding thisType) {
// this/super cannot be used in constructor call
MethodScope methodScope = scope.methodScope();
if (this.evaluationContext.isConstructorCall) {
methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
return false;
}
// static may not refer to this/super
if (this.evaluationContext.declaringTypeName == null || this.evaluationContext.isStatic) {
methodScope.problemReporter().errorThisSuperInStatic(this);
return false;
}
scope.tagAsAccessingEnclosingInstanceStateOf(thisType, false /* type variable access */);
return true;
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public boolean checkAccess(BlockScope scope, ReferenceBinding thisType) {
// this/super cannot be used in constructor call
MethodScope methodScope = scope.methodScope();
if (this.evaluationContext.isConstructorCall) {
methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
return false;
}
// static may not refer to this/super
if (this.evaluationContext.declaringTypeName == null || this.evaluationContext.isStatic) {
methodScope.problemReporter().errorThisSuperInStatic(this);
return false;
}
scope.tagAsAccessingEnclosingInstanceStateOf(thisType, false /* type variable access */);
return true;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public boolean checkAccess(BlockScope scope, ReferenceBinding thisType) {
// this/super cannot be used in constructor call
MethodScope methodScope = scope.methodScope();
if (this.evaluationContext.isConstructorCall) {
methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
return false;
}
// static may not refer to this/super
if (this.evaluationContext.declaringTypeName == null || this.evaluationContext.isStatic) {
methodScope.problemReporter().errorThisSuperInStatic(this);
return false;
}
scope.tagAsAccessingEnclosingInstanceStateOf(thisType, false /* type variable access */);
return true;
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public boolean checkAccess(BlockScope scope, ReferenceBinding thisType) {
// this/super cannot be used in constructor call
MethodScope methodScope = scope.methodScope();
if (this.evaluationContext.isConstructorCall) {
methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
return false;
}
// static may not refer to this/super
if (this.evaluationContext.declaringTypeName == null || this.evaluationContext.isStatic) {
methodScope.problemReporter().errorThisSuperInStatic(this);
return false;
}
scope.tagAsAccessingEnclosingInstanceStateOf(thisType, false /* type variable access */);
return true;
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) {
MethodScope methodScope = scope.methodScope();
// this/super cannot be used in constructor call
if (methodScope.isConstructorCall) {
methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
return false;
}
// static may not refer to this/super
if (methodScope.isStatic) {
methodScope.problemReporter().errorThisSuperInStatic(this);
return false;
} else if (this.isUnqualifiedSuper()) {
TypeDeclaration type = methodScope.referenceType();
if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) {
methodScope.problemReporter().errorNoSuperInInterface(this);
return false;
}
}
if (receiverType != null)
scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */);
return true;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// static methods with receiver value never get here
if (this.haveReceiver) {
this.lhs.checkNPE(currentScope, flowContext, flowInfo);
this.lhs.analyseCode(currentScope, flowContext, flowInfo, true);
} else if (isConstructorReference()) {
TypeBinding type = this.receiverType.leafComponentType();
if (type.isNestedType() &&
type instanceof ReferenceBinding && !((ReferenceBinding)type).isStatic()) {
currentScope.tagAsAccessingEnclosingInstanceStateOf((ReferenceBinding)type, false);
this.shouldCaptureInstance = true;
ReferenceBinding allocatedTypeErasure = (ReferenceBinding) type.erasure();
if (allocatedTypeErasure.isLocalType()) {
((LocalTypeBinding) allocatedTypeErasure).addInnerEmulationDependent(currentScope, false);
// request cascade of accesses
}
}
}
manageSyntheticAccessIfNecessary(currentScope, flowInfo);
return flowInfo;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) {
MethodScope methodScope = scope.methodScope();
// this/super cannot be used in constructor call
if (methodScope.isConstructorCall) {
methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
return false;
}
// static may not refer to this/super
if (methodScope.isStatic) {
methodScope.problemReporter().errorThisSuperInStatic(this);
return false;
} else if (this.isUnqualifiedSuper()) {
TypeDeclaration type = methodScope.referenceType();
if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) {
methodScope.problemReporter().errorNoSuperInInterface(this);
return false;
}
}
if (receiverType != null)
scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */);
return true;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) {
MethodScope methodScope = scope.methodScope();
// this/super cannot be used in constructor call
if (methodScope.isConstructorCall) {
methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
return false;
}
// static may not refer to this/super
if (methodScope.isStatic) {
methodScope.problemReporter().errorThisSuperInStatic(this);
return false;
} else if (this.isUnqualifiedSuper()) {
TypeDeclaration type = methodScope.referenceType();
if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) {
methodScope.problemReporter().errorNoSuperInInterface(this);
return false;
}
}
if (receiverType != null)
scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */);
return true;
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) {
MethodScope methodScope = scope.methodScope();
// this/super cannot be used in constructor call
if (methodScope.isConstructorCall) {
methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
return false;
}
// static may not refer to this/super
if (methodScope.isStatic) {
methodScope.problemReporter().errorThisSuperInStatic(this);
return false;
} else if (this.isUnqualifiedSuper()) {
TypeDeclaration type = methodScope.referenceType();
if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) {
methodScope.problemReporter().errorNoSuperInInterface(this);
return false;
}
}
if (receiverType != null)
scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */);
return true;
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) {
MethodScope methodScope = scope.methodScope();
// this/super cannot be used in constructor call
if (methodScope.isConstructorCall) {
methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
return false;
}
// static may not refer to this/super
if (methodScope.isStatic) {
methodScope.problemReporter().errorThisSuperInStatic(this);
return false;
} else if (this.isUnqualifiedSuper()) {
TypeDeclaration type = methodScope.referenceType();
if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) {
methodScope.problemReporter().errorNoSuperInInterface(this);
return false;
}
}
if (receiverType != null)
scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */);
return true;
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// static methods with receiver value never get here
if (this.haveReceiver) {
this.lhs.checkNPE(currentScope, flowContext, flowInfo);
this.lhs.analyseCode(currentScope, flowContext, flowInfo, true);
} else if (isConstructorReference()) {
TypeBinding type = this.receiverType.leafComponentType();
if (type.isNestedType() &&
type instanceof ReferenceBinding && !((ReferenceBinding)type).isStatic()) {
currentScope.tagAsAccessingEnclosingInstanceStateOf((ReferenceBinding)type, false);
this.shouldCaptureInstance = true;
ReferenceBinding allocatedTypeErasure = (ReferenceBinding) type.erasure();
if (allocatedTypeErasure.isLocalType()) {
((LocalTypeBinding) allocatedTypeErasure).addInnerEmulationDependent(currentScope, false);
// request cascade of accesses
}
}
}
manageSyntheticAccessIfNecessary(currentScope, flowInfo);
return flowInfo;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// static methods with receiver value never get here
if (this.haveReceiver) {
this.lhs.checkNPE(currentScope, flowContext, flowInfo);
this.lhs.analyseCode(currentScope, flowContext, flowInfo, true);
} else if (isConstructorReference()) {
TypeBinding type = this.receiverType.leafComponentType();
if (type.isNestedType() &&
type instanceof ReferenceBinding && !((ReferenceBinding)type).isStatic()) {
currentScope.tagAsAccessingEnclosingInstanceStateOf((ReferenceBinding)type, false);
this.shouldCaptureInstance = true;
ReferenceBinding allocatedTypeErasure = (ReferenceBinding) type.erasure();
if (allocatedTypeErasure.isLocalType()) {
((LocalTypeBinding) allocatedTypeErasure).addInnerEmulationDependent(currentScope, false);
// request cascade of accesses
}
}
}
manageSyntheticAccessIfNecessary(currentScope, flowInfo);
return flowInfo;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) {
MethodScope methodScope = scope.methodScope();
// this/super cannot be used in constructor call
if (methodScope.isConstructorCall) {
methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
return false;
}
// static may not refer to this/super
if (methodScope.isStatic) {
methodScope.problemReporter().errorThisSuperInStatic(this);
return false;
} else if (this.isUnqualifiedSuper()) {
TypeDeclaration type = methodScope.referenceType();
if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) {
methodScope.problemReporter().errorNoSuperInInterface(this);
return false;
}
}
if (receiverType != null)
scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */);
return true;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) {
MethodScope methodScope = scope.methodScope();
// this/super cannot be used in constructor call
if (methodScope.isConstructorCall) {
methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
return false;
}
// static may not refer to this/super
if (methodScope.isStatic) {
methodScope.problemReporter().errorThisSuperInStatic(this);
return false;
} else if (this.isUnqualifiedSuper()) {
TypeDeclaration type = methodScope.referenceType();
if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) {
methodScope.problemReporter().errorNoSuperInInterface(this);
return false;
}
}
if (receiverType != null)
scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */);
return true;
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) {
MethodScope methodScope = scope.methodScope();
// this/super cannot be used in constructor call
if (methodScope.isConstructorCall) {
methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
return false;
}
// static may not refer to this/super
if (methodScope.isStatic) {
methodScope.problemReporter().errorThisSuperInStatic(this);
return false;
} else if (this.isUnqualifiedSuper()) {
TypeDeclaration type = methodScope.referenceType();
if (type != null && TypeDeclaration.kind(type.modifiers) == TypeDeclaration.INTERFACE_DECL) {
methodScope.problemReporter().errorNoSuperInInterface(this);
return false;
}
}
if (receiverType != null)
scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */);
return true;
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
scope.tagAsAccessingEnclosingInstanceStateOf(this.currentCompatibleType, false /* type variable access */);
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
return fieldBinding.type;
} else {
scope.tagAsAccessingEnclosingInstanceStateOf(fieldBinding.declaringClass, false /* type variable access */);
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
return fieldBinding.type;
} else {
scope.tagAsAccessingEnclosingInstanceStateOf(fieldBinding.declaringClass, false /* type variable access */);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
return fieldBinding.type;
} else {
scope.tagAsAccessingEnclosingInstanceStateOf(fieldBinding.declaringClass, false /* type variable access */);
内容来源于网络,如有侵权,请联系作者删除!