Skip to content

Commit

Permalink
Code generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Thrameos committed Nov 16, 2020
1 parent 7fbc10b commit 472b300
Show file tree
Hide file tree
Showing 5 changed files with 546 additions and 28 deletions.
31 changes: 31 additions & 0 deletions native/java/org/jpype/extension/Base.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/** ***************************************************************************
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* See NOTICE file for details.
**************************************************************************** */
package org.jpype.extension;

/**
*
* @author nelson85
*/
public abstract class Base
{
public Base(String name)
{

}

public abstract String call(String s);

}
14 changes: 14 additions & 0 deletions native/java/org/jpype/extension/ClassDecl.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package org.jpype.extension;

import java.util.ArrayList;
import java.util.List;

/**
*
Expand All @@ -29,6 +30,9 @@ public class ClassDecl
ArrayList<MethodDecl> methods = new ArrayList<>();
ArrayList<FieldDecl> fields = new ArrayList<>();
Class[] bases;
Class base;
List<Class> interfaces;
String internalName;

public ClassDecl(String name, Class[] bases)
{
Expand Down Expand Up @@ -56,4 +60,14 @@ public MethodDecl addMethod(String name, Class ret, Class[] arguments, Class[] e
this.ctors.add(method);
return method;
}

void setBase(Class base)
{
this.base = base;
}

void setInterfaces(List<Class> interfaces)
{
this.interfaces = interfaces;
}
}
Loading

0 comments on commit 472b300

Please sign in to comment.