
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
org.cubeengine:reflect
Advanced tools

Typesafe serialization of data
(replace
${reflectVersion} with this version)
To add the dependency using Maven just add the following section to your dependencies:
<dependency>
<groupId>de.cubeisland.engine</groupId>
<artifactId>reflect</artifactId>
<version>${reflectVersion}</version>
</dependency>
To add the dependency using Gradle just add the following line to your dependencies:
compile 'de.cubeisland.engine:reflect:${reflectVersion}'
Using this library with Android is a little more difficult as the snakeyaml dependency doesn't work with Android. Nevertheless you can use it by following these steps:
<dependency>
<groupId>de.cubeisland.engine</groupId>
<artifactId>reflect</artifactId>
<version>${reflectVersion}</version>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>org.yaml</artifactId>
<groupId>snakeyaml</groupId>
<version>1.14</version>
<scope>system</scope>
<systemPath>${basedir}/RELATIVE_PATH_TO_SNAKEYAML_ANDROID_JAR</systemPath>
</dependency>
compile ('de.cubeisland.engine:reflect:${reflectVersion}')
{
exclude group: 'org.yaml', module: 'snakeyaml'
}
compile files('RELATIVE_PATH_TO_SNAKEYAML_ANDROID_JAR')
(Please note: edit the "RELATIVE_PATH_TO_SNAKEYAML_ANDROID_JAR" part!)
public class ExamplePlugin extends JavaPlugin
{
// Create the Factory
private Reflector factory = new Reflector();
private MyConfig config;
public void onEnable()
{
File file = new File(this.getDataFolder(), "config.yml");
// load the reflected using the factory (this will also save after loading)
config = factory.load(MyConfig.class, file);
// at any time you can reload the reflected object
config.reload(); // this will also save the reflected object!
// or save the reflected object
config.save();
}
// The Reflected Class
public class MyConfig extends ReflectedYaml // this is the same as extends Reflected<YamlCodec>
{
public transient boolean noSaving; // fields that are transient are ignored
// the path is generated from the field: lots-of-saving
public boolean lotsOfSaving = true; // set default values (will be set if not loaded OR field is missing in file)
@Name("default")
public String defaultString = "You can define the path with an annotation instead. e.g. if you want to use \"default\"";
// path will be: sub.section
@Comment({"You can comment every field.","Even with multiple lines\nand this linebreak works too"})
public SubSection sub_section; // You do not NEED to set the default here ; it is done automatically
// You can use sections instead of setting the whole path for every field
public class SubSection implements Section
{
// path will be: sub.section.an-int
public int anInt = 42;
// path will be: sub.section.a-long
public long aLong = 666;
}
}
}
FAQs
Typesafe serialization of data
We found that org.cubeengine:reflect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.