class IntersectionType extends Type implements NodeWithAnnotations<IntersectionType> {

    @NonEmptyProperty
    private NodeList<ReferenceType> elements;

    @AllFieldsConstructor
    public IntersectionType(NodeList<ReferenceType> elements) {
        this(null, elements);
    }

    /**
     * This constructor is used by the parser and is considered private.
     */
    @Generated("com.github.javaparser.generator.core.node.MainConstructorGenerator")
    public IntersectionType(TokenRange tokenRange, NodeList<ReferenceType> elements) {
        super(tokenRange);
        setElements(elements);
        customInitialization();
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.AcceptGenerator")
    public <R, A> R accept(final GenericVisitor<R, A> v, final A arg) {
        return v.visit(this, arg);
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.AcceptGenerator")
    public <A> void accept(final VoidVisitor<A> v, final A arg) {
        v.visit(this, arg);
    }

    @Generated("com.github.javaparser.generator.core.node.PropertyGenerator")
    public NodeList<ReferenceType> getElements() {
        return elements;
    }

    @Generated("com.github.javaparser.generator.core.node.PropertyGenerator")
    public IntersectionType setElements(final NodeList<ReferenceType> elements) {
        assertNotNull(elements);
        if (elements == this.elements) {
            return this;
        }
        notifyPropertyChange(ObservableProperty.ELEMENTS, this.elements, elements);
        if (this.elements != null)
            this.elements.setParentNode(null);
        this.elements = elements;
        setAsParentNodeOf(elements);
        return this;
    }

    @Override
    public IntersectionType setAnnotations(NodeList<AnnotationExpr> annotations) {
        return (IntersectionType) super.setAnnotations(annotations);
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.RemoveMethodGenerator")
    public boolean remove(Node node) {
        if (node == null) {
            return false;
        }
        for (int i = 0; i < elements.size(); i++) {
            if (elements.get(i) == node) {
                elements.remove(i);
                return true;
            }
        }
        return super.remove(node);
    }

    @Override
    public String asString() {
        return elements.stream().map(Type::asString).collect(joining("&"));
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.CloneGenerator")
    public IntersectionType clone() {
        return (IntersectionType) accept(new CloneVisitor(), null);
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.GetMetaModelGenerator")
    public IntersectionTypeMetaModel getMetaModel() {
        return JavaParserMetaModel.intersectionTypeMetaModel;
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.ReplaceMethodGenerator")
    public boolean replace(Node node, Node replacementNode) {<FILL_FUNCTION_BODY>}

    @Override
    @Generated("com.github.javaparser.generator.core.node.TypeCastingGenerator")
    public boolean isIntersectionType() {
        return true;
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.TypeCastingGenerator")
    public IntersectionType asIntersectionType() {
        return this;
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.TypeCastingGenerator")
    public void ifIntersectionType(Consumer<IntersectionType> action) {
        action.accept(this);
    }

    @Override
    public ResolvedIntersectionType resolve() {
        return getSymbolResolver().toResolvedType(this, ResolvedIntersectionType.class);
    }

    @Override
    @Generated("com.github.javaparser.generator.core.node.TypeCastingGenerator")
    public Optional<IntersectionType> toIntersectionType() {
        return Optional.of(this);
    }

	@Override
	public ResolvedType convertToUsage(Context context) {
		throw new UnsupportedOperationException(getClass().getCanonicalName());
	}
}

        if (node == null) {
            return false;
        }
        for (int i = 0; i < elements.size(); i++) {
            if (elements.get(i) == node) {
                elements.set(i, (ReferenceType) replacementNode);
                return true;
            }
        }
        return super.replace(node, replacementNode);
    
<methods>public void <init>(NodeList<com.github.javaparser.ast.expr.AnnotationExpr>) ,public void <init>(com.github.javaparser.TokenRange, NodeList<com.github.javaparser.ast.expr.AnnotationExpr>) ,public com.github.javaparser.ast.type.ArrayType asArrayType() ,public com.github.javaparser.ast.type.ClassOrInterfaceType asClassOrInterfaceType() ,public com.github.javaparser.ast.type.IntersectionType asIntersectionType() ,public com.github.javaparser.ast.type.PrimitiveType asPrimitiveType() ,public com.github.javaparser.ast.type.ReferenceType asReferenceType() ,public abstract java.lang.String asString() ,public com.github.javaparser.ast.type.TypeParameter asTypeParameter() ,public com.github.javaparser.ast.type.UnionType asUnionType() ,public com.github.javaparser.ast.type.UnknownType asUnknownType() ,public com.github.javaparser.ast.type.VarType asVarType() ,public com.github.javaparser.ast.type.VoidType asVoidType() ,public com.github.javaparser.ast.type.WildcardType asWildcardType() ,public com.github.javaparser.ast.type.Type clone() ,public com.github.javaparser.ast.expr.AnnotationExpr getAnnotation(int) ,public NodeList<com.github.javaparser.ast.expr.AnnotationExpr> getAnnotations() ,public int getArrayLevel() ,public com.github.javaparser.ast.type.Type getElementType() ,public com.github.javaparser.metamodel.TypeMetaModel getMetaModel() ,public void ifArrayType(Consumer<com.github.javaparser.ast.type.ArrayType>) ,public void ifClassOrInterfaceType(Consumer<com.github.javaparser.ast.type.ClassOrInterfaceType>) ,public void ifIntersectionType(Consumer<com.github.javaparser.ast.type.IntersectionType>) ,public void ifPrimitiveType(Consumer<com.github.javaparser.ast.type.PrimitiveType>) ,public void ifReferenceType(Consumer<com.github.javaparser.ast.type.ReferenceType>) ,public void ifTypeParameter(Consumer<com.github.javaparser.ast.type.TypeParameter>) ,public void ifUnionType(Consumer<com.github.javaparser.ast.type.UnionType>) ,public void ifUnknownType(Consumer<com.github.javaparser.ast.type.UnknownType>) ,public void ifVarType(Consumer<com.github.javaparser.ast.type.VarType>) ,public void ifVoidType(Consumer<com.github.javaparser.ast.type.VoidType>) ,public void ifWildcardType(Consumer<com.github.javaparser.ast.type.WildcardType>) ,public boolean isArrayType() ,public boolean isClassOrInterfaceType() ,public boolean isIntersectionType() ,public boolean isPrimitiveType() ,public boolean isReferenceType() ,public boolean isTypeParameter() ,public boolean isUnionType() ,public boolean isUnknownType() ,public boolean isVarType() ,public boolean isVoidType() ,public boolean isWildcardType() ,public boolean remove(com.github.javaparser.ast.Node) ,public boolean replace(com.github.javaparser.ast.Node, com.github.javaparser.ast.Node) ,public abstract com.github.javaparser.resolution.types.ResolvedType resolve() ,public com.github.javaparser.ast.type.Type setAnnotations(NodeList<com.github.javaparser.ast.expr.AnnotationExpr>) ,public Optional<com.github.javaparser.ast.type.ArrayType> toArrayType() ,public Optional<com.github.javaparser.ast.type.ClassOrInterfaceType> toClassOrInterfaceType() ,public java.lang.String toDescriptor() ,public Optional<com.github.javaparser.ast.type.IntersectionType> toIntersectionType() ,public Optional<com.github.javaparser.ast.type.PrimitiveType> toPrimitiveType() ,public Optional<com.github.javaparser.ast.type.ReferenceType> toReferenceType() ,public Optional<com.github.javaparser.ast.type.TypeParameter> toTypeParameter() ,public Optional<com.github.javaparser.ast.type.UnionType> toUnionType() ,public Optional<com.github.javaparser.ast.type.UnknownType> toUnknownType() ,public Optional<com.github.javaparser.ast.type.VarType> toVarType() ,public Optional<com.github.javaparser.ast.type.VoidType> toVoidType() ,public Optional<com.github.javaparser.ast.type.WildcardType> toWildcardType() <variables>private NodeList<com.github.javaparser.ast.expr.AnnotationExpr> annotations