Tabnine Logo
AbstractMethodDeclaration.isInitializationMethod
Code IndexAdd Tabnine to your IDE (free)

How to use
isInitializationMethod
method
in
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration

Best Java code snippets using org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.isInitializationMethod (Showing top 20 results out of 315)

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: 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.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.scout.sdk.deps/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 (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: com.google.code.maven-play-plugin.org.eclipse.jdt/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 (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/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 (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: 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.tycho/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 (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.scout.sdk.deps/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
}

origin: trylimits/Eclipse-Postfix-Code-Completion

/**
 * 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
}

origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

/**
 * Returns true if the context requires to check initialization of final blank fields.
 * in other words, it is inside an initializer, a constructor or a clinit
 */
public final boolean needBlankFinalFieldInitializationCheck(FieldBinding binding) {
  boolean isStatic = binding.isStatic();
  ReferenceBinding fieldDeclaringClass = binding.declaringClass;
  // loop in enclosing context, until reaching the field declaring context
  MethodScope methodScope = methodScope();
  while (methodScope != null) {
    if (methodScope.isStatic != isStatic)
      return false;
    if (!methodScope.isInsideInitializer() // inside initializer
        && !((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod()) { // inside constructor or clinit
      return false; // found some non-initializer context
    }
    ReferenceBinding enclosingType = methodScope.enclosingReceiverType();
    if (enclosingType == fieldDeclaringClass) {
      return true; // found the field context, no need to check any further
    }
    if (!enclosingType.erasure().isAnonymousType()) {
      return false; // only check inside anonymous type
    }
    methodScope = methodScope.enclosingMethodScope();
  }
  return false;
}

origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core

/**
 * Returns true if the context requires to check initialization of final blank fields.
 * in other words, it is inside an initializer, a constructor or a clinit
 */
public final boolean needBlankFinalFieldInitializationCheck(FieldBinding binding) {
  boolean isStatic = binding.isStatic();
  ReferenceBinding fieldDeclaringClass = binding.declaringClass;
  // loop in enclosing context, until reaching the field declaring context
  MethodScope methodScope = methodScope();
  while (methodScope != null) {
    if (methodScope.isStatic != isStatic)
      return false;
    if (!methodScope.isInsideInitializer() // inside initializer
        && !((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod()) { // inside constructor or clinit
      return false; // found some non-initializer context
    }
    ReferenceBinding enclosingType = methodScope.enclosingReceiverType();
    if (enclosingType == fieldDeclaringClass) {
      return true; // found the field context, no need to check any further
    }
    if (!enclosingType.erasure().isAnonymousType()) {
      return false; // only check inside anonymous type
    }
    methodScope = methodScope.enclosingMethodScope();
  }
  return false;
}

origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Returns true if the context requires to check initialization of final blank fields.
 * in other words, it is inside an initializer, a constructor or a clinit
 */
public final boolean needBlankFinalFieldInitializationCheck(FieldBinding binding) {
  boolean isStatic = binding.isStatic();
  ReferenceBinding fieldDeclaringClass = binding.declaringClass;
  // loop in enclosing context, until reaching the field declaring context
  MethodScope methodScope = methodScope();
  while (methodScope != null) {
    if (methodScope.isStatic != isStatic)
      return false;
    if (!methodScope.isInsideInitializer() // inside initializer
        && !((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod()) { // inside constructor or clinit
      return false; // found some non-initializer context
    }
    ReferenceBinding enclosingType = methodScope.enclosingReceiverType();
    if (enclosingType == fieldDeclaringClass) {
      return true; // found the field context, no need to check any further
    }
    if (!enclosingType.erasure().isAnonymousType()) {
      return false; // only check inside anonymous type
    }
    methodScope = methodScope.enclosingMethodScope();
  }
  return false;
}

origin: org.eclipse.jdt.core.compiler/ecj

/**
 * Returns true if the context requires to check initialization of final blank fields.
 * in other words, it is inside an initializer, a constructor or a clinit
 */
public final boolean needBlankFinalFieldInitializationCheck(FieldBinding binding) {
  boolean isStatic = binding.isStatic();
  ReferenceBinding fieldDeclaringClass = binding.declaringClass;
  // loop in enclosing context, until reaching the field declaring context
  MethodScope methodScope = namedMethodScope();
  while (methodScope != null) {
    if (methodScope.isStatic != isStatic)
      return false;
    if (!methodScope.isInsideInitializer() // inside initializer
        && !((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod()) { // inside constructor or clinit
      return false; // found some non-initializer context
    }
    ReferenceBinding enclosingType = methodScope.enclosingReceiverType();
    if (TypeBinding.equalsEquals(enclosingType, fieldDeclaringClass)) {
      return true; // found the field context, no need to check any further
    }
    if (!enclosingType.erasure().isAnonymousType()) {
      return false; // only check inside anonymous type
    }
    methodScope = methodScope.enclosingMethodScope().namedMethodScope();
  }
  return false;
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

/**
 * Returns true if the context requires to check initialization of final blank fields.
 * in other words, it is inside an initializer, a constructor or a clinit
 */
public final boolean needBlankFinalFieldInitializationCheck(FieldBinding binding) {
  boolean isStatic = binding.isStatic();
  ReferenceBinding fieldDeclaringClass = binding.declaringClass;
  // loop in enclosing context, until reaching the field declaring context
  MethodScope methodScope = namedMethodScope();
  while (methodScope != null) {
    if (methodScope.isStatic != isStatic)
      return false;
    if (!methodScope.isInsideInitializer() // inside initializer
        && !((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod()) { // inside constructor or clinit
      return false; // found some non-initializer context
    }
    ReferenceBinding enclosingType = methodScope.enclosingReceiverType();
    if (TypeBinding.equalsEquals(enclosingType, fieldDeclaringClass)) {
      return true; // found the field context, no need to check any further
    }
    if (!enclosingType.erasure().isAnonymousType()) {
      return false; // only check inside anonymous type
    }
    methodScope = methodScope.enclosingMethodScope().namedMethodScope();
  }
  return false;
}

origin: org.eclipse.scout.sdk.deps/ecj

/**
 * Returns true if the context requires to check initialization of final blank fields.
 * in other words, it is inside an initializer, a constructor or a clinit
 */
public final boolean needBlankFinalFieldInitializationCheck(FieldBinding binding) {
  boolean isStatic = binding.isStatic();
  ReferenceBinding fieldDeclaringClass = binding.declaringClass;
  // loop in enclosing context, until reaching the field declaring context
  MethodScope methodScope = namedMethodScope();
  while (methodScope != null) {
    if (methodScope.isStatic != isStatic)
      return false;
    if (!methodScope.isInsideInitializer() // inside initializer
        && !((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod()) { // inside constructor or clinit
      return false; // found some non-initializer context
    }
    ReferenceBinding enclosingType = methodScope.enclosingReceiverType();
    if (TypeBinding.equalsEquals(enclosingType, fieldDeclaringClass)) {
      return true; // found the field context, no need to check any further
    }
    if (!enclosingType.erasure().isAnonymousType()) {
      return false; // only check inside anonymous type
    }
    methodScope = methodScope.enclosingMethodScope().namedMethodScope();
  }
  return false;
}

origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Returns true if the context requires to check initialization of final blank fields.
 * in other words, it is inside an initializer, a constructor or a clinit
 */
public final boolean needBlankFinalFieldInitializationCheck(FieldBinding binding) {
  boolean isStatic = binding.isStatic();
  ReferenceBinding fieldDeclaringClass = binding.declaringClass;
  // loop in enclosing context, until reaching the field declaring context
  MethodScope methodScope = methodScope();
  while (methodScope != null) {
    if (methodScope.isStatic != isStatic)
      return false;
    if (methodScope.isLambdaScope())
      return false;
    if (!methodScope.isInsideInitializer() // inside initializer
        && !((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod()) { // inside constructor or clinit
      return false; // found some non-initializer context
    }
    ReferenceBinding enclosingType = methodScope.enclosingReceiverType();
    if (TypeBinding.equalsEquals(enclosingType, fieldDeclaringClass)) {
      return true; // found the field context, no need to check any further
    }
    if (!enclosingType.erasure().isAnonymousType()) {
      return false; // only check inside anonymous type
    }
    methodScope = methodScope.enclosingMethodScope();
  }
  return false;
}
 
origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Returns true if the context requires to check initialization of final blank fields.
 * in other words, it is inside an initializer, a constructor or a clinit
 */
public final boolean needBlankFinalFieldInitializationCheck(FieldBinding binding) {
  boolean isStatic = binding.isStatic();
  ReferenceBinding fieldDeclaringClass = binding.declaringClass;
  // loop in enclosing context, until reaching the field declaring context
  MethodScope methodScope = namedMethodScope();
  while (methodScope != null) {
    if (methodScope.isStatic != isStatic)
      return false;
    if (!methodScope.isInsideInitializer() // inside initializer
        && !((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod()) { // inside constructor or clinit
      return false; // found some non-initializer context
    }
    ReferenceBinding enclosingType = methodScope.enclosingReceiverType();
    if (TypeBinding.equalsEquals(enclosingType, fieldDeclaringClass)) {
      return true; // found the field context, no need to check any further
    }
    if (!enclosingType.erasure().isAnonymousType()) {
      return false; // only check inside anonymous type
    }
    methodScope = methodScope.enclosingMethodScope().namedMethodScope();
  }
  return false;
}

origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * Returns true if the context requires to check initialization of final blank fields.
 * in other words, it is inside an initializer, a constructor or a clinit
 */
public final boolean needBlankFinalFieldInitializationCheck(FieldBinding binding) {
  boolean isStatic = binding.isStatic();
  ReferenceBinding fieldDeclaringClass = binding.declaringClass;
  // loop in enclosing context, until reaching the field declaring context
  MethodScope methodScope = namedMethodScope();
  while (methodScope != null) {
    if (methodScope.isStatic != isStatic)
      return false;
    if (!methodScope.isInsideInitializer() // inside initializer
        && !((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod()) { // inside constructor or clinit
      return false; // found some non-initializer context
    }
    ReferenceBinding enclosingType = methodScope.enclosingReceiverType();
    if (TypeBinding.equalsEquals(enclosingType, fieldDeclaringClass)) {
      return true; // found the field context, no need to check any further
    }
    if (!enclosingType.erasure().isAnonymousType()) {
      return false; // only check inside anonymous type
    }
    methodScope = methodScope.enclosingMethodScope().namedMethodScope();
  }
  return false;
}

org.eclipse.jdt.internal.compiler.astAbstractMethodDeclarationisInitializationMethod

Popular methods of AbstractMethodDeclaration

  • isConstructor
  • typeParameters
  • traverse
  • isAbstract
  • isClinit
  • abort
  • bindArguments
    Bind and add argument's binding into the scope of the method
  • bindThrownExceptions
    Record the thrown exception type bindings in the corresponding type references.
  • checkArgumentsSize
  • compilationResult
  • generateCode
    Bytecode generation for a method
  • isAnnotationMethod
  • generateCode,
  • isAnnotationMethod,
  • isDefaultConstructor,
  • isMethod,
  • isStatic,
  • parseStatements,
  • print,
  • printAnnotations,
  • printBody

Popular in Java

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getApplicationContext (Context)
  • getSystemService (Context)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Path (java.nio.file)
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • JOptionPane (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now