All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alibaba.qlexpress4.runtime.LeftValue Maven / Gradle / Ivy

package com.alibaba.qlexpress4.runtime;

import com.alibaba.qlexpress4.exception.ErrorReporter;
import com.alibaba.qlexpress4.exception.QLErrorCodes;
import com.alibaba.qlexpress4.runtime.data.convert.ObjTypeConvertor;

/**
 * assignable value
 * 

* Author: DQinYuan */ public interface LeftValue extends Value { Class getDefinedType(); @Override default Class getType() { Class definedType = getDefinedType(); return definedType == null? Value.super.getType(): definedType; } default void set(Object newValue, ErrorReporter errorReporter) { Class defineType = getDefinedType(); ObjTypeConvertor.QConverted result = ObjTypeConvertor.cast(newValue, defineType); if (!result.isConvertible()) { throw errorReporter.reportFormat(QLErrorCodes.INCOMPATIBLE_ASSIGNMENT_TYPE.name(), QLErrorCodes.INCOMPATIBLE_ASSIGNMENT_TYPE.getErrorMsg(), newValue == null? "null": newValue.getClass().getName(), defineType.getName()); } setInner(result.getConverted()); } void setInner(Object newValue); /** * @return Nullable */ String getSymbolName(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy