コード例 #1
0
    private void retrieveAllPrivateFunctions(AstNode classDef) {
      for (AstNode functionDef : Clazz.getFunctions(classDef)) {

        if (!Function.isAccessor(functionDef)
            && Modifiers.getModifiers(functionDef.getPreviousAstNode())
                .contains(FlexKeyword.PRIVATE)
            && !Function.isEmptyConstructor(functionDef, Clazz.getName(classDef))) {
          AstNode identifierNode =
              functionDef
                  .getFirstChild(FlexGrammar.FUNCTION_NAME)
                  .getFirstChild(FlexGrammar.IDENTIFIER);

          functions.put(identifierNode.getTokenValue(), new PrivateFunction(identifierNode, 0));
        }
      }
    }
コード例 #2
0
 private boolean isConstructor(AstNode astNode) {
   return isInClass
       && astNode.is(FlexGrammar.FUNCTION_DEF)
       && Function.isConstructor(astNode, classStack.peek().className);
 }