Utility method to determine if an {@link AstNode} contains a specific mixin type.

@param node the AstNode
@param mixinType the target mixin type {@link String}; may not be null;
@return true if the mixinType exists for this node
773185
public boolean hasMixinType( AstNode node,
                                 String mixinType ) {
        CheckArg.isNotNull(node, "node");
        CheckArg.isNotNull(mixinType, "mixinType");
        return node.getMixins().contains(mixinType);
    }
1197057
public static void registerMixinType(Session session, String mixin) throws RepositoryException {
        NodeTypeManager nodeTypeManager = session.getWorkspace().getNodeTypeManager();
        if (!nodeTypeManager.hasNodeType(mixin)) {
            NodeTypeTemplate nodeTypeTemplate = nodeTypeManager.createNodeTypeTemplate();
            nodeTypeTemplate.setMixin(true);
            nodeTypeTemplate.setName(mixin);

            NodeTypeDefinition[] nodeTypes = new NodeTypeDefinition[]{nodeTypeTemplate};
            nodeTypeManager.registerNodeTypes(nodeTypes, true);
        }
    }
227175
public static ArrayList<String> getMixinTypes(String mixinTypes)
   {
      return mixinTypes == null ? new ArrayList<String>() : new ArrayList<String>(Arrays.asList(mixinTypes.split(",")));
   }
842147
private boolean isValidTreeType(Tree t) {
    if (t instanceof LambdaExpressionTree) {
      return true;
    }
    if (t instanceof ClassTree) {
      NestingKind nestingKind = ASTHelpers.getSymbol((ClassTree) t).getNestingKind();
      return nestingKind.equals(NestingKind.ANONYMOUS) || nestingKind.equals(NestingKind.LOCAL);
    }
    return false;
  }
525293
public static boolean isIntLiteral(final RexNode rexNode)
  {
    return rexNode instanceof RexLiteral && SqlTypeName.INT_TYPES.contains(rexNode.getType().getSqlTypeName());
  }
1088552
private static JSType getTypeBeforeCast(Node node) {
    JSType typeBeforeCast = node.getJSTypeBeforeCast();
    // might still return null if node.getJSType() is null (i.e. typechecking hasn't run)
    return typeBeforeCast != null ? typeBeforeCast : node.getJSType();
  }
822800
protected function compileMixinCall(Node $node)
    {

        $name = $node->name;
        $hasBlock = false;

        $interpolatedName = $this->interpolate($name, true);
        $interpolated = $name !== $interpolatedName;
        $name = $interpolatedName;

        if ($interpolated)
            $this->options['compile_uncalled_mixins'] = true;

        if (!$interpolated && !isset($this->mixins[$name]))
            $this->throwException(
                "A mixin with the name [$name] is not defined. Please define it with `mixin $name` before you attempt to call a it".
                "with that name.",
                $node
            );

        if (!$interpolated && !in_array($name, $this->calledMixins, true))
            $this->calledMixins[] = $name;

        $mixin = null;

        if (!$interpolated) {
            
            $mixin = $this->mixins[$name];

            if ($mixin instanceof Node) {
    
                //This is still an unhandled mixin, inside another mixin
                //Make sure to resolve circular references
                $this->handleMixin($mixin);
                $mixin = $this->mixins[$name];
            }
        }


        $phtml = '';

        if (count($node->children) > 0) {

            $hasBlock = true;
            $phtml = $this->createCode(
                '$__block = function(array $__scope) {
                    extract($__scope);
                '
            ).$this->newLine();
            $phtml .= $this->compileChildren($node->children, false).$this->newLine();
            $phtml .= $this->indent().$this->createCode('};').$this->newLine();
        }

        $nodeAttributes = $node->attributes;
        foreach ($node->assignments as $assignment) {

            $attrName = $assignment->name;

            //This line provides compatibility to the offical jade method
            if (($this->isHtml() || $this->isXml()) && $attrName === 'classes')
                $attrName = 'class';

            foreach ($assignment->attributes as $attr) {

                if (!$attr->value)
                    $attr->value = $attr->name;

                $attr->name = $attrName;
                $nodeAttributes[] = $attr;
            }
        }

        $args = [];
        $i = 0;
        foreach ($nodeAttributes as $index => $attr) {

            $value = $attr->value;

            if ($attr->name) {

                if (isset($args[$attr->name])) {

                    if (is_array($args[$attr->name]))
                        $args[$attr->name][] = $value;
                    else
                        $args[$attr->name] = [$args[$attr->name], $value];
                } else {

                    $args[$attr->name] = $value;
                }
                continue;
            }


                $mixinAttributes = !$interpolated ? $mixin['node']->attributes : null;

                if (!$interpolated && isset($mixinAttributes[$i]) && strncmp('...', $mixinAttributes[$i]->name, 3) !== 0) {

                    $args[$mixinAttributes[$i]->name] = $value;
                } else {

                    $args[] = $value;
                }
            $i++;
        }

        $phtml .= (count($node->children) > 0 ? $this->indent() : '').$this->createCode(
                '$__scope = \\Tale\\Jade\\Compiler\\create_scope(get_defined_vars()); '. 
                '$__mixinCallArgs = '.$this->exportArray($args).';'.(
                    $hasBlock ? '$__mixinCallArgs[\'__block\'] = isset($__block) ? $__block : null; ' : ''
                ).'call_user_func($__mixins[\''.$name.'\'], $__mixinCallArgs, $__scope); '.
                'unset($__scope); '.
                'unset($__mixinCallArgs); '.(
                    $hasBlock ? 'unset($__block); ' : ''
                )
            ).$this->newLine();

        return $phtml;
    }
680899
public static boolean isJavaConstantType(TypeMirror type)
    {
        switch (type.getKind())
        {
            case INT:
            case LONG:
            case FLOAT:
            case DOUBLE:
                return true;
            case DECLARED:
                DeclaredType dt = (DeclaredType) type;
                TypeElement te = (TypeElement) dt.asElement();
                return "java.lang.String".contentEquals(te.getQualifiedName());
            default:
                return false;
        }
    }
1093135
public boolean appliesTo(Node node) {
        Label l = Jenkins.getInstance().getLabel(label);
        return l == null || l.contains(node);
    }
624902
function tryClassifyNode(node) {
                if (ts.isJSDocTag(node)) {
                    return true;
                }
                if (ts.nodeIsMissing(node)) {
                    return true;
                }
                var classifiedElementName = tryClassifyJsxElementName(node);
                if (!ts.isToken(node) && node.kind !== 244 /* JsxText */ && classifiedElementName === undefined) {
                    return false;
                }
                var tokenStart = node.kind === 244 /* JsxText */ ? node.pos : classifyLeadingTriviaAndGetTokenStart(node);
                var tokenWidth = node.end - tokenStart;
                ts.Debug.assert(tokenWidth >= 0);
                if (tokenWidth > 0) {
                    var type = classifiedElementName || classifyTokenType(node.kind, node);
                    if (type) {
                        pushClassification(tokenStart, tokenWidth, type);
                    }
                }
                return true;
            }
1290924
function (type) {
            if (typeof type === 'string') {
                type = zn.path(GLOBAL, type);
            }

            if (type) {
                if (this instanceof type) {
                    return true;
                } else {
                    var _mixins = this.constructor._mixins_;
                    for (var i = 0, _len = _mixins.length; i < _len; i++) {
                        var _mixin = _mixins[i];
                        if (type === _mixin) {
                            return true;
                        }
                    }
                }
            }

            return false;
        }
1027878
def contains_if(self, include_loop=True):
        
        if include_loop:
            return self.type in [NodeType.IF, NodeType.IFLOOP]
        return self.type == NodeType.IF
851662
function check(node) {
            if (TARGET_NODE_TYPE.test(node.parent.type) &&
                isMixedWithParent(node) &&
                !shouldIgnore(node)
            ) {
                reportBothOperators(node);
            }
        }
989062
function isPropTypesDeclaration(context, node) {
  // Special case for class properties
  // (babel-eslint does not expose property name so we have to rely on tokens)
  if (node.type === 'ClassProperty') {
    const tokens = context.getFirstTokens(node, 2);
    if (isTypesDecl(tokens[0].value) || isTypesDecl(tokens[1].value)) {
      return true;
    }
    return false;
  }

  return Boolean(node && isTypesDecl(node.name));
}
1095741
MixinMatch match( CssFormatter formatter, List<Expression> paramValues, boolean isDefault ) {
        if( guard == null && formatter.containsRule( this ) ) {
            return null;
        }
        Map<String, Expression> mixinParameters = getMixinParams( formatter, paramValues );
        if( mixinParameters == NO_MATCH ) {
            return null;
        }
        boolean matching = true;

        if( guard != null ) {
            formatter.addGuardParameters( mixinParameters, isDefault );

            matching = guard.booleanValue( formatter );

            formatter.removeGuardParameters( mixinParameters );
        }

        return new MixinMatch( this, mixinParameters, matching, formatter.wasDefaultFunction() );
    }
1146090
public void setNodeType(int nodeType) {
        if (nodeType != Token.VAR
            && nodeType != Token.CONST
            && nodeType != Token.LET)
            throw new IllegalArgumentException("invalid node type");
        setType(nodeType);
    }
997105
public static boolean isWildcardLeftHandSide(final ClassNode node) {
        if (OBJECT_TYPE.equals(node) ||
                STRING_TYPE.equals(node) ||
                boolean_TYPE.equals(node) ||
                Boolean_TYPE.equals(node) ||
                CLASS_Type.equals(node)) {
            return true;
        }
        return false;
    }