// Generated by Haxe 4.3.3
package code;

import haxe.root.*;

@SuppressWarnings(value={"rawtypes", "unchecked"})
public class Code extends haxe.lang.HxObject
{
	public Code(haxe.lang.EmptyObject empty)
	{
	}
	
	
	public Code()
	{
		//line 5 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
		code.Code.__hx_ctor_code_Code(this);
	}
	
	
	protected static void __hx_ctor_code_Code(code.Code __hx_this)
	{
	}
	
	
	public static java.lang.String extractFieldName(java.lang.String accessorName, java.lang.Object prefixLength)
	{
		//line 7 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
		int prefixLength1 = ( (haxe.lang.Runtime.eq(prefixLength, null)) ? (3) : (((int) (haxe.lang.Runtime.toInt(prefixLength)) )) );
		//line 7 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
		return ( haxe.lang.StringExt.charAt(accessorName, prefixLength1).toLowerCase() + haxe.lang.StringExt.substr(accessorName, ( prefixLength1 + 1 ), null) );
	}
	
	
	public static boolean overrides(model.Set set, model.Method method)
	{
		//line 11 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
		boolean value = false;
		//line 12 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
		if (( method.isStatic || ( set.superset == null ) )) 
		{
			//line 13 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
			value = false;
		}
		else
		{
			//line 15 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
			if (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.root.Lambda.exists(((java.lang.Object) (set.superset.methods) ), ((haxe.lang.Function) (new code.Code_overrides_15__Fun(method)) ))) ))) 
			{
				//line 16 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
				value = true;
			}
			else
			{
				//line 18 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
				value = code.Code.overrides(set.superset, method);
			}
			
		}
		
		//line 21 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
		return value;
	}
	
	
	public static java.lang.String getDefaultValue(java.lang.String classType, java.lang.String newArray, java.lang.String nullValue)
	{
		//line 24 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
		if (( nullValue == null )) 
		{
			//line 24 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
			nullValue = "null";
		}
		
		//line 25 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
		java.lang.String value = "";
		//line 26 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
		if (haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(classType, 0, 5), "Array")) 
		{
			//line 27 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
			value = newArray;
		}
		else
		{
			//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
			{
				//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
				java.lang.String __temp_svar1 = (classType);
				//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
				int __temp_hash3 = __temp_svar1.hashCode();
				//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
				boolean __temp_executeDef2 = true;
				//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
				if (( __temp_svar1 != null )) 
				{
					//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
					switch (__temp_hash3)
					{
						case 2076426:
						{
							//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
							if (__temp_svar1.equals("Bool")) 
							{
								//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
								__temp_executeDef2 = false;
								//line 32 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
								value = "false";
							}
							
							//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
							break;
						}
						
						
						case -1808118735:
						{
							//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
							if (__temp_svar1.equals("String")) 
							{
								//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
								__temp_executeDef2 = false;
								//line 30 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
								value = "\"\"";
							}
							
							//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
							break;
						}
						
						
						case 73679:
						case 67973692:
						case 2052876273:
						{
							//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
							if (( (( ( __temp_hash3 == 73679 ) && __temp_svar1.equals("Int") )) || ( (( ( __temp_hash3 == 67973692 ) && __temp_svar1.equals("Float") )) || __temp_svar1.equals("Double") ) )) 
							{
								//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
								__temp_executeDef2 = false;
								//line 31 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
								value = "0";
							}
							
							//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
							break;
						}
						
						
					}
					
				}
				
				//line 33 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
				if (__temp_executeDef2) 
				{
					//line 33 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
					value = nullValue;
				}
				
			}
			
		}
		
		//line 36 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/code/Code.hx"
		return value;
	}
	
	
}


