// Generated by Haxe 4.3.3
package model;

import haxe.root.*;

@SuppressWarnings(value={"rawtypes", "unchecked"})
public class Method extends model.Field
{
	public Method(haxe.lang.EmptyObject empty)
	{
		//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		super(haxe.lang.EmptyObject.EMPTY);
	}
	
	
	public Method(java.lang.String name, java.lang.String type, java.lang.Object visibility, java.lang.Object isStatic)
	{
		//line 7 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		super(haxe.lang.EmptyObject.EMPTY);
		//line 7 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		model.Method.__hx_ctor_model_Method(this, name, type, visibility, isStatic);
	}
	
	
	protected static void __hx_ctor_model_Method(model.Method __hx_this, java.lang.String name, java.lang.String type, java.lang.Object visibility, java.lang.Object isStatic)
	{
		//line 6 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		boolean isStatic1 = ( (haxe.lang.Runtime.eq(isStatic, null)) ? (false) : (haxe.lang.Runtime.toBool(((java.lang.Boolean) (isStatic) ))) );
		//line 6 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		int visibility1 = ( (haxe.lang.Runtime.eq(visibility, null)) ? (0) : (((int) (haxe.lang.Runtime.toInt(visibility)) )) );
		//line 7 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		model.Field.__hx_ctor_model_Field(__hx_this, name, type, visibility1, isStatic1);
		//line 8 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		__hx_this.params = new haxe.root.Array<model.Field>();
	}
	
	
	public haxe.root.Array<model.Field> params;
	
	@Override public java.lang.String toUMLString()
	{
		//line 12 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		java.lang.String str = ( ( ( model.Field.getVisibilitySymbol(this.visibility) + " " ) + this.className ) + "(" );
		//line 13 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		haxe.root.Array<java.lang.String> _g = new haxe.root.Array<java.lang.String>(new java.lang.String[]{});
		//line 13 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		{
			//line 13 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			java.lang.Object x = ((java.lang.Object) (haxe.lang.Runtime.callField(((java.lang.Object) (this.params) ), "iterator", null)) );
			//line 13 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			while (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.lang.Runtime.callField(x, "hasNext", null)) )))
			{
				//line 13 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
				model.Field x1 = ((model.Field) (haxe.lang.Runtime.callField(x, "next", null)) );
				//line 13 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
				_g.push(( ( x1.className + ":" ) + x1.classType ));
			}
			
		}
		
		//line 13 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		str += _g.join(", ");
		//line 14 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		str += ")";
		//line 15 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		if ( ! (haxe.lang.Runtime.valEq(this.classType, "")) ) 
		{
			//line 16 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			str += ( " : " + this.classType );
		}
		
		//line 18 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		return str;
	}
	
	
	public boolean isGeneric()
	{
		//line 22 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		if ( ! ((( ( haxe.lang.StringExt.indexOf(this.classType, "<T>", null) != -1 ) || haxe.lang.Runtime.valEq(this.classType, "T") ))) ) 
		{
			//line 23 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			return haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.root.Lambda.exists(((java.lang.Object) (this.params) ), ((haxe.lang.Function) (( (( model.Method_isGeneric_23__Fun.__hx_current != null )) ? (model.Method_isGeneric_23__Fun.__hx_current) : (model.Method_isGeneric_23__Fun.__hx_current = ((model.Method_isGeneric_23__Fun) (new model.Method_isGeneric_23__Fun()) )) )) ))) ));
		}
		else
		{
			//line 22 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			return true;
		}
		
	}
	
	
	@Override public java.lang.Object __hx_setField(java.lang.String field, java.lang.Object value, boolean handleProperties)
	{
		//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		{
			//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			boolean __temp_executeDef1 = true;
			//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			if (( field != null )) 
			{
				//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
				switch (field.hashCode())
				{
					case -995427962:
					{
						//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
						if (field.equals("params")) 
						{
							//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
							__temp_executeDef1 = false;
							//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
							this.params = ((haxe.root.Array<model.Field>) (value) );
							//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
							return value;
						}
						
						//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
						break;
					}
					
					
				}
				
			}
			
			//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			if (__temp_executeDef1) 
			{
				//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
				return super.__hx_setField(field, value, handleProperties);
			}
			else
			{
				//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
				throw null;
			}
			
		}
		
	}
	
	
	@Override public java.lang.Object __hx_getField(java.lang.String field, boolean throwErrors, boolean isCheck, boolean handleProperties)
	{
		//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		{
			//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			boolean __temp_executeDef1 = true;
			//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			if (( field != null )) 
			{
				//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
				switch (field.hashCode())
				{
					case -659926707:
					{
						//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
						if (field.equals("isGeneric")) 
						{
							//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
							__temp_executeDef1 = false;
							//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
							return ((haxe.lang.Function) (new haxe.lang.Closure(this, "isGeneric")) );
						}
						
						//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
						break;
					}
					
					
					case -995427962:
					{
						//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
						if (field.equals("params")) 
						{
							//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
							__temp_executeDef1 = false;
							//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
							return this.params;
						}
						
						//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
						break;
					}
					
					
					case 629164490:
					{
						//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
						if (field.equals("toUMLString")) 
						{
							//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
							__temp_executeDef1 = false;
							//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
							return ((haxe.lang.Function) (new haxe.lang.Closure(this, "toUMLString")) );
						}
						
						//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
						break;
					}
					
					
				}
				
			}
			
			//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			if (__temp_executeDef1) 
			{
				//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
				return super.__hx_getField(field, throwErrors, isCheck, handleProperties);
			}
			else
			{
				//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
				throw null;
			}
			
		}
		
	}
	
	
	@Override public java.lang.Object __hx_invokeField(java.lang.String field, java.lang.Object[] dynargs)
	{
		//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		{
			//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			boolean __temp_executeDef1 = true;
			//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			if (( field != null )) 
			{
				//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
				switch (field.hashCode())
				{
					case 629164490:
					{
						//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
						if (field.equals("toUMLString")) 
						{
							//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
							__temp_executeDef1 = false;
							//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
							return haxe.lang.Runtime.slowCallField(this, field, dynargs);
						}
						
						//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
						break;
					}
					
					
					case -659926707:
					{
						//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
						if (field.equals("isGeneric")) 
						{
							//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
							__temp_executeDef1 = false;
							//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
							return this.isGeneric();
						}
						
						//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
						break;
					}
					
					
				}
				
			}
			
			//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
			if (__temp_executeDef1) 
			{
				//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
				return super.__hx_invokeField(field, dynargs);
			}
			else
			{
				//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
				throw null;
			}
			
		}
		
	}
	
	
	@Override public void __hx_getFields(haxe.root.Array<java.lang.String> baseArr)
	{
		//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		baseArr.push("params");
		//line 3 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/model/Method.hx"
		super.__hx_getFields(baseArr);
	}
	
	
}


