本文整理了Java中org.eclipse.jdt.internal.compiler.lookup.BlockScope.enclosingReceiverType()
方法的一些代码示例,展示了BlockScope.enclosingReceiverType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BlockScope.enclosingReceiverType()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.lookup.BlockScope
类名称:BlockScope
方法名:enclosingReceiverType
暂无
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
if (!isImplicitThis() &&!checkAccess(scope.methodScope())) {
return null;
}
return this.resolvedType = scope.enclosingReceiverType();
}
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
if (!isImplicitThis() &&!checkAccess(scope.methodScope())) {
return null;
}
return this.resolvedType = scope.enclosingReceiverType();
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
if (!isImplicitThis() &&!checkAccess(scope.methodScope())) {
return null;
}
return this.resolvedType = scope.enclosingReceiverType();
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
if (!checkAccess(scope, enclosingReceiverType))
return null;
if (enclosingReceiverType.id == T_JavaLangObject) {
scope.problemReporter().cannotUseSuperInJavaLangObject(this);
return null;
}
return this.resolvedType = enclosingReceiverType.superclass();
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
if (!checkAccess(scope, enclosingReceiverType))
return null;
if (enclosingReceiverType.id == T_JavaLangObject) {
scope.problemReporter().cannotUseSuperInJavaLangObject(this);
return null;
}
return this.resolvedType = enclosingReceiverType.superclass();
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
if (!checkAccess(scope, enclosingReceiverType))
return null;
if (enclosingReceiverType.id == T_JavaLangObject) {
scope.problemReporter().cannotUseSuperInJavaLangObject(this);
return null;
}
return this.resolvedType = enclosingReceiverType.superclass();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
if (!checkAccess(scope, enclosingReceiverType))
return null;
if (enclosingReceiverType.id == T_JavaLangObject) {
scope.problemReporter().cannotUseSuperInJavaLangObject(this);
return null;
}
return this.resolvedType = enclosingReceiverType.superclass();
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
if (!checkAccess(scope, enclosingReceiverType))
return null;
if (enclosingReceiverType.id == T_JavaLangObject) {
scope.problemReporter().cannotUseSuperInJavaLangObject(this);
return null;
}
return this.resolvedType = enclosingReceiverType.superclass();
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
if (!checkAccess(scope, enclosingReceiverType))
return null;
if (enclosingReceiverType.id == T_JavaLangObject) {
scope.problemReporter().cannotUseSuperInJavaLangObject(this);
return null;
}
return this.resolvedType = enclosingReceiverType.superclass();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
if (!checkAccess(scope, enclosingReceiverType))
return null;
if (enclosingReceiverType.id == T_JavaLangObject) {
scope.problemReporter().cannotUseSuperInJavaLangObject(this);
return null;
}
return this.resolvedType = enclosingReceiverType.superclass();
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
if (!checkAccess(scope, enclosingReceiverType))
return null;
if (enclosingReceiverType.id == T_JavaLangObject) {
scope.problemReporter().cannotUseSuperInJavaLangObject(this);
return null;
}
return this.resolvedType = enclosingReceiverType.superclass();
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Answer true if the receiver is suitable for assigning final blank fields.
* in other words, it is inside an initializer, a constructor or a clinit
*/
public final boolean allowBlankFinalFieldAssignment(FieldBinding binding) {
if (enclosingReceiverType() != binding.declaringClass)
return false;
MethodScope methodScope = methodScope();
if (methodScope.isStatic != binding.isStatic())
return false;
return methodScope.isInsideInitializer() // inside initializer
|| ((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod(); // inside constructor or clinit
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
/**
* Answer true if the receiver is suitable for assigning final blank fields.
* in other words, it is inside an initializer, a constructor or a clinit
*/
public final boolean allowBlankFinalFieldAssignment(FieldBinding binding) {
if (enclosingReceiverType() != binding.declaringClass)
return false;
MethodScope methodScope = methodScope();
if (methodScope.isStatic != binding.isStatic())
return false;
return methodScope.isInsideInitializer() // inside initializer
|| ((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod(); // inside constructor or clinit
}
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
/**
* Answer true if the receiver is suitable for assigning final blank fields.
* in other words, it is inside an initializer, a constructor or a clinit
*/
public final boolean allowBlankFinalFieldAssignment(FieldBinding binding) {
if (enclosingReceiverType() != binding.declaringClass)
return false;
MethodScope methodScope = methodScope();
if (methodScope.isStatic != binding.isStatic())
return false;
return methodScope.isInsideInitializer() // inside initializer
|| ((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod(); // inside constructor or clinit
}
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
if (!checkAccess(scope.methodScope()))
return null;
ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
if (enclosingReceiverType.id == T_JavaLangObject) {
scope.problemReporter().cannotUseSuperInJavaLangObject(this);
return null;
}
return this.resolvedType = enclosingReceiverType.superclass();
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
if (!checkAccess(scope.methodScope()))
return null;
ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
if (enclosingReceiverType.id == T_JavaLangObject) {
scope.problemReporter().cannotUseSuperInJavaLangObject(this);
return null;
}
return this.resolvedType = enclosingReceiverType.superclass();
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
if (!checkAccess(scope.methodScope()))
return null;
ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
if (enclosingReceiverType.id == T_JavaLangObject) {
scope.problemReporter().cannotUseSuperInJavaLangObject(this);
return null;
}
return this.resolvedType = enclosingReceiverType.superclass();
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
if (!isImplicitThis() &&!checkAccess(scope, enclosingReceiverType)) {
return null;
}
this.resolvedType = enclosingReceiverType;
MethodScope methodScope = scope.namedMethodScope();
if (methodScope != null) {
MethodBinding method = methodScope.referenceMethodBinding();
if (method != null && method.receiver != null && TypeBinding.equalsEquals(method.receiver, this.resolvedType))
this.resolvedType = method.receiver;
}
return this.resolvedType;
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
/**
* Answer true if the receiver is suitable for assigning final blank fields.
* in other words, it is inside an initializer, a constructor or a clinit
*/
public final boolean allowBlankFinalFieldAssignment(FieldBinding binding) {
if (TypeBinding.notEquals(enclosingReceiverType(), binding.declaringClass))
return false;
MethodScope methodScope = methodScope();
if (methodScope.isStatic != binding.isStatic())
return false;
if (methodScope.isLambdaScope())
return false;
return methodScope.isInsideInitializer() // inside initializer
|| ((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod(); // inside constructor or clinit
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
/**
* Answer true if the receiver is suitable for assigning final blank fields.
* in other words, it is inside an initializer, a constructor or a clinit
*/
public final boolean allowBlankFinalFieldAssignment(FieldBinding binding) {
if (TypeBinding.notEquals(enclosingReceiverType(), binding.declaringClass))
return false;
MethodScope methodScope = methodScope();
if (methodScope.isStatic != binding.isStatic())
return false;
if (methodScope.isLambdaScope())
return false;
return methodScope.isInsideInitializer() // inside initializer
|| ((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod(); // inside constructor or clinit
}
内容来源于网络,如有侵权,请联系作者删除!