Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
1261d872
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1261d872
编写于
5月 02, 2011
作者:
M
Maxim Shafirov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Assorted fixes to inheritance/delegation codegen
上级
42a36e0c
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
233 addition
and
94 deletion
+233
-94
idea/src/org/jetbrains/jet/codegen/ClassCodegen.java
idea/src/org/jetbrains/jet/codegen/ClassCodegen.java
+117
-46
idea/src/org/jetbrains/jet/codegen/ExpressionCodegen.java
idea/src/org/jetbrains/jet/codegen/ExpressionCodegen.java
+18
-0
idea/src/org/jetbrains/jet/codegen/JetTypeMapper.java
idea/src/org/jetbrains/jet/codegen/JetTypeMapper.java
+12
-12
idea/src/org/jetbrains/jet/codegen/OwnerKind.java
idea/src/org/jetbrains/jet/codegen/OwnerKind.java
+25
-5
idea/src/org/jetbrains/jet/codegen/PropertyCodegen.java
idea/src/org/jetbrains/jet/codegen/PropertyCodegen.java
+57
-28
idea/testData/codegen/inheritance.jet
idea/testData/codegen/inheritance.jet
+3
-3
idea/tests/org/jetbrains/jet/codegen/ClassGenTest.java
idea/tests/org/jetbrains/jet/codegen/ClassGenTest.java
+1
-0
未找到文件。
idea/src/org/jetbrains/jet/codegen/ClassCodegen.java
浏览文件 @
1261d872
...
...
@@ -179,6 +179,8 @@ public class ClassCodegen {
ExpressionCodegen
codegen
=
new
ExpressionCodegen
(
mv
,
bindingContext
,
frameMap
,
typeMapper
,
Type
.
VOID_TYPE
,
classDescriptor
,
kind
);
String
classname
=
JetTypeMapper
.
jvmName
(
classDescriptor
,
kind
);
final
Type
classType
=
Type
.
getType
(
"L"
+
classname
+
";"
);
if
(
kind
==
OwnerKind
.
DELEGATING_IMPLEMENTATION
)
{
String
interfaceDesc
=
JetTypeMapper
.
jetInterfaceType
(
classDescriptor
).
getDescriptor
();
v
.
visitField
(
Opcodes
.
ACC_PRIVATE
,
"$this"
,
interfaceDesc
,
/*TODO*/
null
,
null
);
...
...
@@ -202,67 +204,85 @@ public class ClassCodegen {
int
n
=
0
;
for
(
JetDelegationSpecifier
specifier
:
specifiers
)
{
boolean
instanceOnStack
=
pushDelegateInstance
(
specifier
,
kind
,
codegen
,
iv
,
n
);
if
(
instanceOnStack
)
{
JetType
superType
=
bindingContext
.
resolveTypeReference
(
specifier
.
getTypeReference
());
ClassDescriptor
superClassDescriptor
=
(
ClassDescriptor
)
superType
.
getConstructor
().
getDeclarationDescriptor
();
String
delegateField
=
"$delegate_"
+
n
;
String
fieldDesc
=
JetTypeMapper
.
jetInterfaceType
(
superClassDescriptor
).
getDescriptor
();
v
.
visitField
(
Opcodes
.
ACC_PRIVATE
,
delegateField
,
fieldDesc
,
/*TODO*/
null
,
null
);
iv
.
putfield
(
classname
,
delegateField
,
fieldDesc
);
}
boolean
delegateOnStack
=
specifier
instanceof
JetDelegatorToSuperCall
&&
n
>
0
||
specifier
instanceof
JetDelegatorByExpressionSpecifier
;
n
++;
if
(
delegateOnStack
)
{
iv
.
load
(
0
,
classType
);
}
generateInitializers
(
aClass
,
kind
,
codegen
,
iv
);
iv
.
visitInsn
(
Opcodes
.
RETURN
);
mv
.
visitMaxs
(
0
,
0
);
mv
.
visitEnd
();
}
private
boolean
pushDelegateInstance
(
JetDelegationSpecifier
specifier
,
OwnerKind
kind
,
ExpressionCodegen
codegen
,
InstructionAdapter
v
,
int
pos
)
{
boolean
instanceOnStack
=
false
;
if
(
specifier
instanceof
JetDelegatorToSuperCall
)
{
JetDelegatorToSuperCall
superCall
=
(
JetDelegatorToSuperCall
)
specifier
;
ConstructorDescriptor
constructorDescriptor
=
bindingContext
.
resolveSuperConstructor
(
superCall
,
this
);
ConstructorDescriptor
constructorDescriptor1
=
bindingContext
.
resolveSuperConstructor
(
superCall
,
this
);
ClassDescriptor
classDecl
=
constructorDescriptor
.
getContainingDeclaration
();
ClassDescriptor
classDecl
=
constructorDescriptor1
.
getContainingDeclaration
();
boolean
isDelegating
=
kind
==
OwnerKind
.
DELEGATING_IMPLEMENTATION
;
Type
type
=
isDelegating
?
JetTypeMapper
.
jetDelegatingImplementationType
(
classDecl
)
:
JetTypeMapper
.
jetImplementationType
(
classDecl
);
if
(
pos
>
0
)
{
if
(
n
>
0
)
{
if
(
kind
==
OwnerKind
.
DELEGATING_IMPLEMENTATION
)
{
codegen
.
thisToStack
();
}
}
Method
method
=
typeMapper
.
mapConstructorSignature
(
constructorDescriptor
,
kind
);
final
Type
[]
argTypes
=
method
.
getArgumentTypes
();
if
(
n
==
0
)
{
iv
.
load
(
0
,
type
);
}
else
{
iv
.
anew
(
type
);
iv
.
dup
();
}
Method
method1
=
typeMapper
.
mapConstructorSignature
(
constructorDescriptor1
,
kind
);
final
Type
[]
argTypes1
=
method1
.
getArgumentTypes
();
List
<
JetArgument
>
args
=
superCall
.
getValueArguments
();
for
(
int
i
=
0
,
argsSize
=
args
.
size
();
i
<
argsSize
;
i
++)
{
JetArgument
arg
=
args
.
get
(
i
);
codegen
.
gen
(
arg
.
getArgumentExpression
(),
argTypes
[
i
]);
codegen
.
gen
(
arg
.
getArgumentExpression
(),
argTypes1
[
i
]);
}
if
(
pos
==
0
)
{
v
.
load
(
0
,
type
);
iv
.
invokespecial
(
type
.
getClassName
(),
"<init>"
,
method1
.
getDescriptor
());
}
else
{
v
.
anew
(
type
);
v
.
dup
();
instanceOnStack
=
true
;
else
if
(
specifier
instanceof
JetDelegatorByExpressionSpecifier
)
{
codegen
.
genToJVMStack
(((
JetDelegatorByExpressionSpecifier
)
specifier
).
getDelegateExpression
());
}
v
.
invokespecial
(
type
.
getClassName
(),
"<init>"
,
method
.
getDescriptor
());
if
(
delegateOnStack
)
{
JetType
superType
=
bindingContext
.
resolveTypeReference
(
specifier
.
getTypeReference
());
ClassDescriptor
superClassDescriptor
=
(
ClassDescriptor
)
superType
.
getConstructor
().
getDeclarationDescriptor
();
String
delegateField
=
"$delegate_"
+
n
;
Type
fieldType
=
JetTypeMapper
.
jetInterfaceType
(
superClassDescriptor
);
String
fieldDesc
=
fieldType
.
getDescriptor
();
v
.
visitField
(
Opcodes
.
ACC_PRIVATE
,
delegateField
,
fieldDesc
,
/*TODO*/
null
,
null
);
iv
.
putfield
(
classname
,
delegateField
,
fieldDesc
);
JetClass
superClass
=
(
JetClass
)
bindingContext
.
getDeclarationPsiElement
(
superClassDescriptor
);
generateDelegates
(
aClass
,
superClass
,
v
,
new
OwnerKind
.
DelegateKind
(
StackValue
.
field
(
fieldType
,
classname
,
delegateField
,
false
),
JetTypeMapper
.
jvmNameForInterface
(
superClassDescriptor
)));
}
else
if
(
specifier
instanceof
JetDelegatorByExpressionSpecifier
)
{
codegen
.
genToJVMStack
(((
JetDelegatorByExpressionSpecifier
)
specifier
).
getDelegateExpression
());
instanceOnStack
=
true
;
n
++;
}
return
instanceOnStack
;
generateInitializers
(
aClass
,
kind
,
codegen
,
iv
);
int
curParam
=
0
;
List
<
JetParameter
>
constructorParameters
=
aClass
.
getPrimaryConstructorParameters
();
for
(
JetParameter
parameter
:
constructorParameters
)
{
if
(
parameter
.
getValOrVarNode
()
!=
null
)
{
VariableDescriptor
descriptor
=
paramDescrs
.
get
(
curParam
);
Type
type
=
typeMapper
.
mapType
(
descriptor
.
getOutType
());
iv
.
load
(
0
,
classType
);
iv
.
load
(
frameMap
.
getIndex
(
descriptor
),
type
);
iv
.
putfield
(
classname
,
descriptor
.
getName
(),
type
.
getDescriptor
());
}
curParam
++;
}
iv
.
visitInsn
(
Opcodes
.
RETURN
);
mv
.
visitMaxs
(
0
,
0
);
mv
.
visitEnd
();
}
private
void
generateInitializers
(
JetClass
aClass
,
OwnerKind
kind
,
ExpressionCodegen
codegen
,
InstructionAdapter
iv
)
{
...
...
@@ -295,5 +315,56 @@ public class ClassCodegen {
functionCodegen
.
gen
((
JetFunction
)
declaration
,
kind
);
}
}
for
(
JetParameter
p
:
aClass
.
getPrimaryConstructorParameters
())
{
if
(
p
.
getValOrVarNode
()
!=
null
)
{
VariableDescriptor
descriptor
=
bindingContext
.
getParameterDescriptor
(
p
);
if
(
descriptor
instanceof
PropertyDescriptor
)
{
PropertyDescriptor
propertyDescriptor
=
(
PropertyDescriptor
)
descriptor
;
propertyCodegen
.
generateDefaultGetter
(
propertyDescriptor
,
Opcodes
.
ACC_PUBLIC
,
kind
);
if
(
propertyDescriptor
.
isVar
())
{
propertyCodegen
.
generateDefaultSetter
(
propertyDescriptor
,
Opcodes
.
ACC_PUBLIC
,
kind
);
}
if
(!(
kind
instanceof
OwnerKind
.
DelegateKind
)
&&
kind
!=
OwnerKind
.
INTERFACE
&&
bindingContext
.
hasBackingField
(
propertyDescriptor
))
{
v
.
visitField
(
Opcodes
.
ACC_PRIVATE
,
p
.
getName
(),
typeMapper
.
mapType
(
propertyDescriptor
.
getOutType
()).
getDescriptor
(),
null
,
null
);
}
}
}
}
}
private
void
generateDelegates
(
JetClass
inClass
,
JetClass
toClass
,
ClassVisitor
v
,
OwnerKind
kind
)
{
final
JetStandardLibrary
standardLibrary
=
JetStandardLibrary
.
getJetStandardLibrary
(
project
);
final
FunctionCodegen
functionCodegen
=
new
FunctionCodegen
(
toClass
,
v
,
standardLibrary
,
bindingContext
);
final
PropertyCodegen
propertyCodegen
=
new
PropertyCodegen
(
v
,
standardLibrary
,
bindingContext
,
functionCodegen
);
/* TODO
for (JetDeclaration declaration : toClass.getDeclarations()) {
if (declaration instanceof JetProperty) {
propertyCodegen.gen((JetProperty) declaration, kind);
}
else if (declaration instanceof JetFunction) {
functionCodegen.gen((JetFunction) declaration, kind);
}
}
*/
for
(
JetParameter
p
:
toClass
.
getPrimaryConstructorParameters
())
{
if
(
p
.
getValOrVarNode
()
!=
null
)
{
VariableDescriptor
descriptor
=
bindingContext
.
getParameterDescriptor
(
p
);
if
(
descriptor
instanceof
PropertyDescriptor
)
{
PropertyDescriptor
propertyDescriptor
=
(
PropertyDescriptor
)
descriptor
;
propertyCodegen
.
generateDefaultGetter
(
propertyDescriptor
,
Opcodes
.
ACC_PUBLIC
,
kind
);
if
(
propertyDescriptor
.
isVar
())
{
propertyCodegen
.
generateDefaultSetter
(
propertyDescriptor
,
Opcodes
.
ACC_PUBLIC
,
kind
);
}
if
(!(
kind
instanceof
OwnerKind
.
DelegateKind
)
&&
kind
!=
OwnerKind
.
INTERFACE
&&
bindingContext
.
hasBackingField
(
propertyDescriptor
))
{
v
.
visitField
(
Opcodes
.
ACC_PRIVATE
,
p
.
getName
(),
typeMapper
.
mapType
(
propertyDescriptor
.
getOutType
()).
getDescriptor
(),
null
,
null
);
}
}
}
}
}
}
idea/src/org/jetbrains/jet/codegen/ExpressionCodegen.java
浏览文件 @
1261d872
...
...
@@ -4,6 +4,7 @@ import com.intellij.openapi.project.Project;
import
com.intellij.psi.*
;
import
com.intellij.psi.search.ProjectScope
;
import
com.intellij.psi.tree.IElementType
;
import
com.intellij.psi.util.PsiTreeUtil
;
import
jet.IntRange
;
import
org.jetbrains.annotations.Nullable
;
import
org.jetbrains.jet.lang.psi.*
;
...
...
@@ -448,6 +449,23 @@ public class ExpressionCodegen extends JetVisitor {
}
else
if
(
descriptor
instanceof
PropertyDescriptor
)
{
final
PropertyDescriptor
propertyDescriptor
=
(
PropertyDescriptor
)
descriptor
;
//TODO: hack, will not need if resolve goes to right descriptor itself
if
(
declaration
instanceof
JetParameter
)
{
if
(
PsiTreeUtil
.
getParentOfType
(
expression
,
JetDelegationSpecifier
.
class
)
!=
null
)
{
JetClass
aClass
=
PsiTreeUtil
.
getParentOfType
(
expression
,
JetClass
.
class
);
ConstructorDescriptor
constructorDescriptor
=
bindingContext
.
getConstructorDescriptor
(
aClass
);
List
<
ValueParameterDescriptor
>
parameters
=
constructorDescriptor
.
getUnsubstitutedValueParameters
();
for
(
ValueParameterDescriptor
parameter
:
parameters
)
{
if
(
parameter
.
getName
().
equals
(
descriptor
.
getName
()))
{
final
JetType
outType
=
((
VariableDescriptor
)
descriptor
).
getOutType
();
myStack
.
push
(
StackValue
.
local
(
myMap
.
getIndex
(
parameter
),
typeMapper
.
mapType
(
outType
)));
return
;
}
}
}
}
boolean
isStatic
=
descriptor
.
getContainingDeclaration
()
instanceof
NamespaceDescriptor
;
final
boolean
directToField
=
expression
.
getReferencedNameElementType
()
==
JetTokens
.
FIELD_IDENTIFIER
;
final
StackValue
iValue
=
intermediateValueForProperty
(
propertyDescriptor
,
directToField
);
...
...
idea/src/org/jetbrains/jet/codegen/JetTypeMapper.java
浏览文件 @
1261d872
...
...
@@ -32,16 +32,16 @@ public class JetTypeMapper {
}
static
String
jvmName
(
ClassDescriptor
jetClass
,
OwnerKind
kind
)
{
switch
(
kind
)
{
case
INTERFACE:
if
(
kind
==
OwnerKind
.
INTERFACE
)
{
return
jvmNameForInterface
(
jetClass
);
case
IMPLEMENTATION:
}
else
if
(
kind
==
OwnerKind
.
IMPLEMENTATION
)
{
return
jvmNameForImplementation
(
jetClass
);
case
DELEGATING_IMPLEMENTATION:
}
else
if
(
kind
==
OwnerKind
.
DELEGATING_IMPLEMENTATION
)
{
return
jvmNameForDelegatingImplementation
(
jetClass
);
default
:
}
else
{
assert
false
:
"Unsuitable kind"
;
return
"java/lang/Object"
;
}
...
...
idea/src/org/jetbrains/jet/codegen/OwnerKind.java
浏览文件 @
1261d872
package
org.jetbrains.jet.codegen
;
import
org.objectweb.asm.Type
;
/**
* @author max
*/
public
enum
OwnerKind
{
NAMESPACE
,
INTERFACE
,
IMPLEMENTATION
,
DELEGATING_IMPLEMENTATION
public
class
OwnerKind
{
public
static
final
OwnerKind
NAMESPACE
=
new
OwnerKind
();
public
static
final
OwnerKind
INTERFACE
=
new
OwnerKind
();
public
static
final
OwnerKind
IMPLEMENTATION
=
new
OwnerKind
();
public
static
final
OwnerKind
DELEGATING_IMPLEMENTATION
=
new
OwnerKind
();
public
static
class
DelegateKind
extends
OwnerKind
{
private
final
StackValue
delegate
;
private
final
String
ownerClass
;
public
DelegateKind
(
StackValue
delegate
,
String
ownerClass
)
{
this
.
delegate
=
delegate
;
this
.
ownerClass
=
ownerClass
;
}
public
StackValue
getDelegate
()
{
return
delegate
;
}
public
String
getOwnerClass
()
{
return
ownerClass
;
}
}
}
idea/src/org/jetbrains/jet/codegen/PropertyCodegen.java
浏览文件 @
1261d872
...
...
@@ -122,33 +122,60 @@ public class PropertyCodegen {
private
void
generateDefaultGetter
(
JetProperty
p
,
JetDeclaration
declaration
,
OwnerKind
kind
)
{
final
PropertyDescriptor
propertyDescriptor
=
(
PropertyDescriptor
)
context
.
getVariableDescriptor
(
p
);
int
flags
=
JetTypeMapper
.
getAccessModifiers
(
declaration
,
Opcodes
.
ACC_PUBLIC
);
generateDefaultGetter
(
propertyDescriptor
,
flags
,
kind
);
}
public
void
generateDefaultGetter
(
PropertyDescriptor
propertyDescriptor
,
int
flags
,
OwnerKind
kind
)
{
if
(
kind
==
OwnerKind
.
NAMESPACE
)
{
flags
|=
Opcodes
.
ACC_STATIC
;
}
else
if
(
kind
==
OwnerKind
.
INTERFACE
)
{
flags
|=
Opcodes
.
ACC_ABSTRACT
;
}
final
String
signature
=
mapper
.
mapGetterSignature
(
propertyDescriptor
).
getDescriptor
();
MethodVisitor
mv
=
v
.
visitMethod
(
flags
,
getterName
(
p
.
getName
()),
signature
,
null
,
null
);
String
getterName
=
getterName
(
propertyDescriptor
.
getName
());
MethodVisitor
mv
=
v
.
visitMethod
(
flags
,
getterName
,
signature
,
null
,
null
);
if
(
kind
!=
OwnerKind
.
INTERFACE
)
{
mv
.
visitCode
();
InstructionAdapter
iv
=
new
InstructionAdapter
(
mv
);
if
(
kind
!=
OwnerKind
.
NAMESPACE
)
{
iv
.
load
(
0
,
JetTypeMapper
.
TYPE_OBJECT
);
}
final
Type
type
=
mapper
.
mapType
(
propertyDescriptor
.
getOutType
());
if
(
kind
instanceof
OwnerKind
.
DelegateKind
)
{
OwnerKind
.
DelegateKind
dk
=
(
OwnerKind
.
DelegateKind
)
kind
;
dk
.
getDelegate
().
put
(
JetTypeMapper
.
TYPE_OBJECT
,
iv
);
iv
.
invokeinterface
(
dk
.
getOwnerClass
(),
getterName
,
signature
);
}
else
{
iv
.
visitFieldInsn
(
kind
==
OwnerKind
.
NAMESPACE
?
Opcodes
.
GETSTATIC
:
Opcodes
.
GETFIELD
,
JetTypeMapper
.
getOwner
(
propertyDescriptor
),
propertyDescriptor
.
getName
(),
type
.
getDescriptor
());
}
iv
.
areturn
(
type
);
mv
.
visitMaxs
(
0
,
0
);
mv
.
visitEnd
();
}
}
private
void
generateDefaultSetter
(
JetProperty
p
,
JetDeclaration
declaration
,
OwnerKind
kind
)
{
final
PropertyDescriptor
propertyDescriptor
=
(
PropertyDescriptor
)
context
.
getVariableDescriptor
(
p
);
int
flags
=
JetTypeMapper
.
getAccessModifiers
(
declaration
,
Opcodes
.
ACC_PUBLIC
);
generateDefaultSetter
(
propertyDescriptor
,
flags
,
kind
);
}
public
void
generateDefaultSetter
(
PropertyDescriptor
propertyDescriptor
,
int
flags
,
OwnerKind
kind
)
{
if
(
kind
==
OwnerKind
.
NAMESPACE
)
{
flags
|=
Opcodes
.
ACC_STATIC
;
}
else
if
(
kind
==
OwnerKind
.
INTERFACE
)
{
flags
|=
Opcodes
.
ACC_ABSTRACT
;
}
final
String
signature
=
mapper
.
mapSetterSignature
(
propertyDescriptor
).
getDescriptor
();
MethodVisitor
mv
=
v
.
visitMethod
(
flags
,
setterName
(
p
.
getName
()),
signature
,
null
,
null
);
MethodVisitor
mv
=
v
.
visitMethod
(
flags
,
setterName
(
propertyDescriptor
.
getName
()),
signature
,
null
,
null
);
if
(
kind
!=
OwnerKind
.
INTERFACE
)
{
mv
.
visitCode
();
InstructionAdapter
iv
=
new
InstructionAdapter
(
mv
);
final
Type
type
=
mapper
.
mapType
(
propertyDescriptor
.
getOutType
());
...
...
@@ -159,6 +186,7 @@ public class PropertyCodegen {
else
{
iv
.
load
(
0
,
type
);
}
//TODO: kind inst Delegate
iv
.
visitFieldInsn
(
kind
==
OwnerKind
.
NAMESPACE
?
Opcodes
.
PUTSTATIC
:
Opcodes
.
PUTFIELD
,
JetTypeMapper
.
getOwner
(
propertyDescriptor
),
propertyDescriptor
.
getName
(),
type
.
getDescriptor
());
...
...
@@ -166,6 +194,7 @@ public class PropertyCodegen {
mv
.
visitMaxs
(
0
,
0
);
mv
.
visitEnd
();
}
}
public
static
String
getterName
(
String
propertyName
)
{
return
"get"
+
StringUtil
.
capitalizeWithJavaBeanConvention
(
propertyName
);
...
...
idea/testData/codegen/inheritance.jet
浏览文件 @
1261d872
class X(val x : Int) {}
class Y(val y : Int) {}
class Point(x : Int, y : Int) : X(x), Y(y) {}
class Point(x : Int, y : Int) : X(x)
, Y(y) {}
class Abstract {}
...
...
@@ -18,10 +18,10 @@ fun box() : String {
if (p.x + p.y != 239) return "FAIL #3"
val y = new Y(-1)
/*
val p1 = new P1(240, y)
if (p1.x + p1.y != 239) return "FAIL #4"
val p2 = new P2(240, y)
if (p2.x + p2.y != 239) return "FAIL #5"
...
...
@@ -30,6 +30,6 @@ fun box() : String {
val p4 = new P4(240, y)
if (p4.x + p4.y != 239) return "FAIL #7"
*/
"OK"
}
\ No newline at end of file
idea/tests/org/jetbrains/jet/codegen/ClassGenTest.java
浏览文件 @
1261d872
...
...
@@ -40,6 +40,7 @@ public class ClassGenTest extends CodegenTestCase {
public
void
testNewInstanceExplicitConstructor
()
throws
Exception
{
loadFile
(
"newInstanceDefaultConstructor.jet"
);
System
.
out
.
println
(
generateToText
());
final
Codegens
codegens
=
generateClassesInFile
();
loadImplementationClass
(
codegens
,
"SimpleClass"
);
Class
ns
=
loadRootNamespaceClass
(
codegens
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录