package generators;
import java.util.List;
import code.ast.*;
import models.algebra.Term;
import models.algebra.Type;
import models.dataConstraintModel.JsonType;
import models.dataConstraintModel.ListType;
import models.dataConstraintModel.MapType;
import models.dataConstraintModel.TupleType;
public interface ILanguageSpecific {
CompilationUnit newCompilationUnit(TypeDeclaration component);
TypeDeclaration newTypeDeclaration(String typeName);
VariableDeclaration newVariableDeclaration(Type type, String varName);
MethodDeclaration newMethodDeclaration(String methodName, Type returnType);
MethodDeclaration newMethodDeclaration(String methodName, boolean isConstructor, Type returnType, List<VariableDeclaration> parameters);
FieldDeclaration newFieldDeclaration(Type fieldType, String fieldName);
FieldDeclaration newFieldDeclaration(Type fieldType, String fieldName, String fieldInitializer);
ListType newListType(Type compType);
ListType newListType(Type compType, Type parentListType);
MapType newMapType(Type keyType, String compTypeName);
MapType newMapType(Type keyType, String compTypeName, Type parentMapType);
MapType newMapType(Type keyType, Type valueType);
MapType newMapType(Type keyType, Type valueType, Type parentMapType);
TupleType newTupleType(List<Type> compTypes);
TupleType newTupleType(List<Type> componentTypes, Type parentTupleType);
JsonType newJsonType();
JsonType newJsonType(Type parentJsonType);
boolean declareField();
String getSelfExp();
String getFieldAccessor(String fieldName);
String getMethodInvocation(String methodName);
String getMethodInvocation(String receiverName, List<String> parameters);
String getMethodInvocation(String receiverName, String methodName);
String getMethodInvocation(String receiverName, String methodName, List<String> parameters);
String getConstructorInvocation(String componentName, List<String> parameters);
ReturnStatement getReturnStatement(String returnValue);
IfStatement getIfStatement(Term condition, Statement block);
ForStatement getForStatementForList(String varName, String list);
EnhancedForStatement getForStatementForCollection(VariableDeclaration varDeclaration, String collection);
EnhancedForStatement getForStatementForMap(String varName, String map);
String getEndForStatement();
String getEndForStatement(String varName);
String toComponentName(String name);
String toVariableName(String name);
String getMainComponentName();
String getAssignment();
String getStatementDelimiter();
String getStringDelimiter();
String getOpeningScoreDelimiter();
String getClosingScoreDelimiter();
String getValueToStringExp(String typeName, String valueExp);
String getStringToValueExp(String typeName, String strExp);
String getPairExp(String first, String second);
String getFirstEntryFromMapExp(String map);
String getTupleGet(String tupleExp, int idx, int length);
String getDecomposedTuple(String tupleExp, VariableDeclaration tupleVar, List<VariableDeclaration> vars);
boolean isValueType(Type type);
boolean isVoidType(Type type);
Type getWrapperType(Type type);
}