blob: fbdc9bf343d0e284eef7db3d6e957e82fa84805b [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2009, 2021 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.internal.r.rdata;
import java.util.Collections;
import java.util.List;
import org.eclipse.statet.jcommons.lang.Nullable;
import org.eclipse.statet.ltk.model.core.element.LtkModelElementFilter;
import org.eclipse.statet.r.console.core.RProcess;
import org.eclipse.statet.r.core.data.CombinedRElement;
import org.eclipse.statet.r.core.model.RElementName;
import org.eclipse.statet.rj.data.RList;
import org.eclipse.statet.rj.data.RStore;
public final class VirtualMissingVar extends BasicCombinedRElement {
private final RProcess source;
private final int stamp;
public VirtualMissingVar(final @Nullable RElementName name,
final RProcess source, final int stamp) {
super(null, name);
this.source= source;
this.stamp= stamp;
}
public RProcess getSource() {
return this.source;
}
public int getStamp() {
return this.stamp;
}
@Override
public byte getRObjectType() {
return TYPE_MISSING;
}
@Override
public String getRClassName() {
return "<missing>";
}
@Override
public long getLength() {
return 0;
}
@Override
public @Nullable RStore<?> getData() {
return null;
}
@Override
public @Nullable RList getAttributes() {
return null;
}
@Override
public int getElementType() {
return R_GENERAL_VARIABLE;
}
@Override
public boolean hasModelChildren(final @Nullable LtkModelElementFilter filter) {
return false;
}
@Override
public List<? extends CombinedRElement> getModelChildren(final @Nullable LtkModelElementFilter filter) {
return Collections.emptyList();
}
@Override
public String toString() {
return "RObject type=MISSING";
}
}