Codota Logo
AbstractMethodDeclaration.isInitializationMethod
Code IndexAdd Codota 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)

  • Common ways to obtain AbstractMethodDeclaration
private void myMethod () {
AbstractMethodDeclaration a =
  • Codota Icon(AbstractMethodDeclaration) methodScope.referenceContext
  • Codota IconMethodBinding methodBinding;methodBinding.sourceMethod()
  • Codota Icon(AbstractMethodDeclaration) exceptionContext.associatedNode
  • Smart code suggestions by Codota
}
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

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • requestLocationUpdates (LocationManager)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now