Package ca.ubc.stat.blang.jvmmodel
Class SingleBlangModelInferrer
java.lang.Object
ca.ubc.stat.blang.jvmmodel.SingleBlangModelInferrer
public class SingleBlangModelInferrer
extends java.lang.Object
SingleBlangModelInferrer gets instantiated for each model being inferred.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SingleBlangModelInferrer.ConstructorArgument
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BUILDER_NAME
static java.lang.String
COMPONENTS_LIST_NAME
-
Constructor Summary
Constructors Constructor Description SingleBlangModelInferrer(BlangModel model, org.eclipse.xtext.common.types.JvmDeclaredType output, org.eclipse.xtext.xbase.jvmmodel.JvmTypesBuilder _typeBuilder, org.eclipse.xtext.xbase.jvmmodel.JvmAnnotationReferenceBuilder _annotationTypesBuilder, org.eclipse.xtext.xbase.jvmmodel.JvmTypeReferenceBuilder _typeReferenceBuilder)
-
Method Summary
Modifier and Type Method Description protected java.util.List<SingleBlangModelInferrer.ConstructorArgument>
_constructorParameters(BlangDist distribution)
For technical reasons, we need to look into other model's constructors to find out which variables are param and which are random.protected java.util.List<SingleBlangModelInferrer.ConstructorArgument>
_constructorParameters(JavaDist distribution)
org.eclipse.xtext.common.types.JvmTypeReference
adaptorType()
static java.util.List<SingleBlangModelInferrer.ConstructorArgument>
blangConstructorParameters(BlangDist distribution)
java.util.List<SingleBlangModelInferrer.ConstructorArgument>
constructorParameters(DistributionTypeSpecification distribution)
org.eclipse.xtext.common.types.JvmTypeReference
distributionType()
org.eclipse.xtext.common.types.JvmTypeReference
extractSupplierType(java.lang.reflect.Parameter supplier)
void
infer()
boolean
isRealOrIntDistributionType()
org.eclipse.xtext.common.types.JvmTypeReference
optionalize(org.eclipse.xtext.common.types.JvmTypeReference deboxedType, boolean makeOptional)
boolean
setupMain(org.eclipse.xtext.common.types.JvmGenericType type)
java.lang.String
varName(ForLoop component)
java.lang.String
varName(VariableDeclarationComponent component)
org.eclipse.xtext.common.types.JvmTypeReference
writableVariableImpl()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
COMPONENTS_LIST_NAME
public static final java.lang.String COMPONENTS_LIST_NAME- See Also:
- Constant Field Values
-
BUILDER_NAME
public static final java.lang.String BUILDER_NAME- See Also:
- Constant Field Values
-
-
Constructor Details
-
SingleBlangModelInferrer
public SingleBlangModelInferrer(BlangModel model, org.eclipse.xtext.common.types.JvmDeclaredType output, org.eclipse.xtext.xbase.jvmmodel.JvmTypesBuilder _typeBuilder, org.eclipse.xtext.xbase.jvmmodel.JvmAnnotationReferenceBuilder _annotationTypesBuilder, org.eclipse.xtext.xbase.jvmmodel.JvmTypeReferenceBuilder _typeReferenceBuilder)
-
-
Method Details
-
infer
public void infer() -
setupMain
public boolean setupMain(org.eclipse.xtext.common.types.JvmGenericType type) -
optionalize
public org.eclipse.xtext.common.types.JvmTypeReference optionalize(org.eclipse.xtext.common.types.JvmTypeReference deboxedType, boolean makeOptional) -
varName
-
varName
-
adaptorType
public org.eclipse.xtext.common.types.JvmTypeReference adaptorType() -
distributionType
public org.eclipse.xtext.common.types.JvmTypeReference distributionType() -
writableVariableImpl
public org.eclipse.xtext.common.types.JvmTypeReference writableVariableImpl() -
isRealOrIntDistributionType
public boolean isRealOrIntDistributionType() -
_constructorParameters
protected java.util.List<SingleBlangModelInferrer.ConstructorArgument> _constructorParameters(BlangDist distribution)For technical reasons, we need to look into other model's constructors to find out which variables are param and which are random. The following deal with this aspect. -
blangConstructorParameters
public static java.util.List<SingleBlangModelInferrer.ConstructorArgument> blangConstructorParameters(BlangDist distribution) -
_constructorParameters
protected java.util.List<SingleBlangModelInferrer.ConstructorArgument> _constructorParameters(JavaDist distribution) -
extractSupplierType
public org.eclipse.xtext.common.types.JvmTypeReference extractSupplierType(java.lang.reflect.Parameter supplier) -
constructorParameters
public java.util.List<SingleBlangModelInferrer.ConstructorArgument> constructorParameters(DistributionTypeSpecification distribution)
-