add missed file

This commit is contained in:
Vladimir Krivosheev
2015-01-09 11:36:29 +01:00
parent 96563674d9
commit 73f4d10892
@@ -0,0 +1,60 @@
package org.jetbrains.debugger.values;
import com.intellij.util.BitUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.debugger.ObjectProperty;
import org.jetbrains.debugger.ValueModifier;
import org.jetbrains.debugger.VariableImpl;
public class ObjectPropertyImpl extends VariableImpl implements ObjectProperty {
public static final byte WRITABLE = 0x01;
public static final byte CONFIGURABLE = 0x02;
public static final byte ENUMERABLE = 0x04;
private final FunctionValue getter;
private final FunctionValue setter;
private final int flags;
public ObjectPropertyImpl(@NotNull String name,
@Nullable Value value,
@Nullable FunctionValue getter,
@Nullable FunctionValue setter,
@Nullable ValueModifier valueModifier,
int flags) {
super(name, value, valueModifier);
this.getter = getter;
this.setter = setter;
this.flags = flags;
}
@Nullable
@Override
public final FunctionValue getGetter() {
return getter;
}
@Nullable
@Override
public final FunctionValue getSetter() {
return setter;
}
@Override
public final boolean isWritable() {
return BitUtil.isSet(flags, WRITABLE);
}
@Override
public final boolean isConfigurable() {
return BitUtil.isSet(flags, CONFIGURABLE);
}
@Override
public final boolean isEnumerable() {
return BitUtil.isSet(flags, ENUMERABLE);
}
}