Package com.bacoder.parser.java.api

Examples of com.bacoder.parser.java.api.LocalVariableDeclaration


    super(adapters);
  }

  @Override
  public LocalVariableDeclaration adapt(LocalVariableDeclarationContext context) {
    LocalVariableDeclaration localVariableDeclaration = createNode(context);

    setModifiers(context, localVariableDeclaration);

    TypeContext typeContext = getChild(context, TypeContext.class);
    if (typeContext != null) {
      localVariableDeclaration.setType(getAdapter(TypeAdapter.class).adapt(typeContext));
    }

    VariableDeclaratorsContext variableDeclaratorsContext =
        getChild(context, VariableDeclaratorsContext.class);
    if (variableDeclaratorsContext != null) {
      localVariableDeclaration.setVariableDeclarations(
          getAdapter(VariableDeclaratorsAdapter.class).adapt(variableDeclaratorsContext,
              localVariableDeclaration.getType(), typeContext));
    }

    return localVariableDeclaration;
  }
View Full Code Here


        getChild(context, LocalVariableDeclarationStatementContext.class);
    if (localVariableDeclarationStatementContext != null) {
      LocalVariableDeclarationContext localVariableDeclarationContext =
          getChild(localVariableDeclarationStatementContext, LocalVariableDeclarationContext.class);
      if (localVariableDeclarationContext != null) {
        LocalVariableDeclaration localVariableDeclaration =
            getAdapter(LocalVariableDeclarationAdapter.class).adapt(
                localVariableDeclarationContext);
        setNodeAttributes(localVariableDeclaration, localVariableDeclarationStatementContext);
        return localVariableDeclaration;
      }
View Full Code Here

TOP

Related Classes of com.bacoder.parser.java.api.LocalVariableDeclaration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.