public ExpressionTree newClassCreator(TypeTree qualifiedIdentifier, NewClassTreeImpl classCreatorRest) { classCreatorRest.prependChildren((AstNode) qualifiedIdentifier); return classCreatorRest.completeWithIdentifier(qualifiedIdentifier); }
public ExpressionTree newClassCreator(Optional<TypeArgumentListTreeImpl> typeArguments, TypeTree qualifiedIdentifier, NewClassTreeImpl classCreatorRest) { if (typeArguments.isPresent()) { classCreatorRest.completeWithTypeArguments(typeArguments.get()); } return classCreatorRest.completeWithIdentifier(qualifiedIdentifier); }
public ExpressionTree newClassCreator(Optional<TypeArgumentListTreeImpl> typeArguments, TypeTree qualifiedIdentifier, NewClassTreeImpl classCreatorRest) { if (typeArguments.isPresent()) { classCreatorRest.completeWithTypeArguments(typeArguments.get()); } return classCreatorRest.completeWithIdentifier(qualifiedIdentifier); }
public ExpressionTree newClassCreator(Optional<TypeArgumentListTreeImpl> typeArguments, TypeTree qualifiedIdentifier, NewClassTreeImpl classCreatorRest) { if (typeArguments.isPresent()) { classCreatorRest.completeWithTypeArguments(typeArguments.get()); } return classCreatorRest.completeWithIdentifier(qualifiedIdentifier); }
public EnumConstantTreeImpl newEnumConstant( Optional<List<AnnotationTreeImpl>> annotations, InternalSyntaxToken identifierToken, Optional<ArgumentListTreeImpl> arguments, Optional<ClassTreeImpl> classBody, Optional<InternalSyntaxToken> commaToken) { IdentifierTreeImpl identifier = new IdentifierTreeImpl(identifierToken); ArgumentListTreeImpl defaultArguments = new ArgumentListTreeImpl(ImmutableList.<ExpressionTree>of(), ImmutableList.<SyntaxToken>of()); NewClassTreeImpl newClass = new NewClassTreeImpl(arguments.or(defaultArguments), classBody.orNull()); newClass.completeWithIdentifier(identifier); return new EnumConstantTreeImpl(modifiers((Optional<List<ModifierTree>>) (Optional<?>) annotations), identifier, newClass, commaToken.orNull()); }
public EnumConstantTreeImpl newEnumConstant( Optional<List<AnnotationTreeImpl>> annotations, InternalSyntaxToken identifierToken, Optional<ArgumentListTreeImpl> arguments, Optional<ClassTreeImpl> classBody, Optional<InternalSyntaxToken> commaToken) { IdentifierTreeImpl identifier = new IdentifierTreeImpl(identifierToken); ArgumentListTreeImpl defaultArguments = new ArgumentListTreeImpl(ImmutableList.<ExpressionTree>of(), ImmutableList.<SyntaxToken>of()); NewClassTreeImpl newClass = new NewClassTreeImpl(arguments.or(defaultArguments), classBody.orNull()); newClass.completeWithIdentifier(identifier); return new EnumConstantTreeImpl(modifiers((Optional<List<ModifierTree>>) (Optional<?>) annotations), identifier, newClass, commaToken.orNull()); }
public EnumConstantTreeImpl newEnumConstant( Optional<List<AnnotationTreeImpl>> annotations, InternalSyntaxToken identifierToken, Optional<ArgumentListTreeImpl> arguments, Optional<ClassTreeImpl> classBody, Optional<InternalSyntaxToken> commaToken) { IdentifierTreeImpl identifier = new IdentifierTreeImpl(identifierToken); ArgumentListTreeImpl defaultArguments = new ArgumentListTreeImpl(ImmutableList.<ExpressionTree>of(), ImmutableList.<SyntaxToken>of()); NewClassTreeImpl newClass = new NewClassTreeImpl(arguments.or(defaultArguments), classBody.orNull()); newClass.completeWithIdentifier(identifier); return new EnumConstantTreeImpl(modifiers((Optional<List<ModifierTree>>) (Optional<?>) annotations), identifier, newClass, commaToken.orNull()); }
public EnumConstantTreeImpl newEnumConstant( Optional<List<AnnotationTreeImpl>> annotations, AstNode identifierAstNode, Optional<ArgumentListTreeImpl> arguments, Optional<ClassTreeImpl> classBody, Optional<AstNode> semicolonTokenAstNode) { IdentifierTreeImpl identifier = new IdentifierTreeImpl(InternalSyntaxToken.create(identifierAstNode)); if (annotations.isPresent()) { identifier.prependChildren(annotations.get()); } List<AstNode> children = Lists.newArrayList(); if (arguments.isPresent()) { children.add(arguments.get()); } if (classBody.isPresent()) { children.add(classBody.get()); } NewClassTreeImpl newClass = new NewClassTreeImpl( arguments.isPresent() ? arguments.get() : Collections.emptyList(), classBody.isPresent() ? classBody.get() : null, children.toArray(new AstNode[0])); newClass.completeWithIdentifier(identifier); @SuppressWarnings("unchecked") EnumConstantTreeImpl result = new EnumConstantTreeImpl(modifiers((Optional<List<ModifierTree>>)(Optional<?>)annotations), identifier, newClass); result.addChild(identifier); result.addChild(newClass); if (semicolonTokenAstNode.isPresent()) { result.addChild(semicolonTokenAstNode.get()); } return result; }