mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-28 10:19:23 +00:00 
			
		
		
		
	Merge pull request #1073 from chaserhkj/funcdecl-translate-java
Add translate method for FuncDecl in java api
This commit is contained in:
		
						commit
						90a38c9a35
					
				
					 1 changed files with 25 additions and 7 deletions
				
			
		|  | @ -59,6 +59,24 @@ public class FuncDecl extends AST | |||
|         return Native.getFuncDeclId(getContext().nCtx(), getNativeObject()); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * Translates (copies) the function declaration to the Context {@code ctx}. | ||||
|      * @param ctx A context | ||||
|      * | ||||
|      * @return A copy of the function declaration which is associated with {@code ctx} | ||||
|      * @throws Z3Exception on error | ||||
|      **/ | ||||
|     public FuncDecl translate(Context ctx) | ||||
|     { | ||||
| 
 | ||||
|         if (getContext() == ctx) { | ||||
|             return this; | ||||
|         } else { | ||||
|             return new FuncDecl(ctx, Native.translate(getContext().nCtx(), | ||||
|                 getNativeObject(), ctx.nCtx())); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * The arity of the function declaration | ||||
|      **/ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue