-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AppliedInitializer and AppliedMemberInitializer
Part of #750
- Loading branch information
1 parent
e452f0f
commit ae935ac
Showing
5 changed files
with
400 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
156 changes: 156 additions & 0 deletions
156
runtime/com/redhat/ceylon/compiler/java/runtime/metamodel/AppliedInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
package com.redhat.ceylon.compiler.java.runtime.metamodel; | ||
|
||
import ceylon.language.Entry; | ||
import ceylon.language.Iterable; | ||
import ceylon.language.Map; | ||
import ceylon.language.Sequence; | ||
import ceylon.language.Sequential; | ||
import ceylon.language.String; | ||
import ceylon.language.meta.declaration.CallableConstructorDeclaration; | ||
import ceylon.language.meta.declaration.TypeParameter; | ||
import ceylon.language.meta.model.CallableConstructor; | ||
import ceylon.language.meta.model.Class; | ||
import ceylon.language.meta.model.ClassModel; | ||
|
||
public class AppliedInitializer<Type, Arguments extends Sequential<? extends Object>> implements CallableConstructor<Type, Arguments>{ | ||
|
||
private Class<Type, Arguments> clazz; | ||
|
||
public AppliedInitializer(Class<Type, Arguments> clazz) { | ||
this.clazz = clazz; | ||
} | ||
|
||
@Override | ||
public Sequential<? extends ceylon.language.meta.model.Type<? extends Object>> getTypeArgumentList() { | ||
return clazz.getTypeArgumentList(); | ||
} | ||
|
||
@Override | ||
public Sequential<? extends Sequence<? extends Object>> getTypeArgumentWithVarianceList() { | ||
return clazz.getTypeArgumentWithVarianceList(); | ||
} | ||
|
||
@Override | ||
public Map<? extends TypeParameter, ? extends Sequence<? extends Object>> getTypeArgumentWithVariances() { | ||
return clazz.getTypeArgumentWithVariances(); | ||
} | ||
|
||
@Override | ||
public Map<? extends TypeParameter, ? extends ceylon.language.meta.model.Type<? extends Object>> getTypeArguments() { | ||
return clazz.getTypeArguments(); | ||
} | ||
|
||
@Override | ||
public Sequential<? extends ceylon.language.meta.model.Type<? extends Object>> getParameterTypes() { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public Type apply() { | ||
return clazz.apply(); | ||
} | ||
|
||
@Override | ||
public Type apply(Sequential<? extends Object> arg0) { | ||
return clazz.apply(arg0); | ||
} | ||
|
||
@Override | ||
public Type namedApply( | ||
Iterable<? extends Entry<? extends String, ? extends Object>, ? extends Object> arg0) { | ||
return clazz.namedApply(arg0); | ||
} | ||
|
||
@Override | ||
public Type $call$() { | ||
return clazz.$call$(); | ||
} | ||
|
||
@Override | ||
public Type $callvariadic$() { | ||
return clazz.$callvariadic$(); | ||
} | ||
|
||
@Override | ||
public Type $callvariadic$(Sequential<?> varargs) { | ||
return clazz.$callvariadic$(varargs); | ||
} | ||
|
||
@Override | ||
public Type $call$(Object arg0) { | ||
return clazz.$call$(arg0); | ||
} | ||
|
||
@Override | ||
public Type $callvariadic$(Object arg0) { | ||
return clazz.$callvariadic$(arg0); | ||
} | ||
|
||
@Override | ||
public Type $callvariadic$(Object arg0, Sequential<?> varargs) { | ||
return clazz.$callvariadic$(arg0, varargs); | ||
} | ||
|
||
@Override | ||
public Type $call$(Object arg0, Object arg1) { | ||
return clazz.$call$(arg0, arg1); | ||
} | ||
|
||
@Override | ||
public Type $callvariadic$(Object arg0, Object arg1) { | ||
return clazz.$callvariadic$(arg0, arg1); | ||
} | ||
|
||
@Override | ||
public Type $callvariadic$(Object arg0, Object arg1, Sequential<?> varargs) { | ||
return clazz.$callvariadic$(arg0, arg1, varargs); | ||
} | ||
|
||
@Override | ||
public Type $call$(Object arg0, Object arg1, Object arg2) { | ||
return clazz.$call$(arg0, arg1, arg2); | ||
} | ||
|
||
@Override | ||
public Type $callvariadic$(Object arg0, Object arg1, Object arg2) { | ||
return clazz.$callvariadic$(arg0, arg1, arg2); | ||
} | ||
|
||
@Override | ||
public Type $callvariadic$(Object arg0, Object arg1, Object arg2, | ||
Sequential<?> varargs) { | ||
return clazz.$callvariadic$(arg0, arg1, arg2, varargs); | ||
} | ||
|
||
@Override | ||
public Type $call$(Object... args) { | ||
return clazz.$call$(args); | ||
} | ||
|
||
@Override | ||
public Type $callvariadic$(Object... argsAndVarargs) { | ||
return clazz.$callvariadic$(argsAndVarargs); | ||
} | ||
|
||
@Override | ||
public short $getVariadicParameterIndex$() { | ||
return clazz.$getVariadicParameterIndex$(); | ||
} | ||
|
||
@Override | ||
public ClassModel getContainer() { | ||
return clazz; | ||
} | ||
|
||
@Override | ||
public CallableConstructorDeclaration getDeclaration() { | ||
return (CallableConstructorDeclaration)clazz.getDefaultConstructor(); | ||
} | ||
|
||
@Override | ||
public ClassModel getType() { | ||
return clazz; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.