All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.jangaroo.jooc.mxml.ast.IsInitMethod Maven / Gradle / Ivy

There is a newer version: 4.1.17
Show newest version
package net.jangaroo.jooc.mxml.ast;

import com.google.common.base.Predicate;
import net.jangaroo.jooc.ast.Directive;
import net.jangaroo.jooc.ast.FunctionDeclaration;

import javax.annotation.Nullable;

class IsInitMethod implements Predicate {
  @Override
  public boolean apply(@Nullable Directive directive) {
    if (directive instanceof FunctionDeclaration) {
      FunctionDeclaration f = (FunctionDeclaration) directive;
      return !f.isGetterOrSetter() && f.isPrivate() && f.getIde().getName().equals("__initialize__");
    }
    return false;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy