Using annotations

Since 1.0.4 version you can use annotations for a finger tuning tuning of the protection process.

By default, if there are no @secured annotations all class files will be protected in accordance with include/exlude filter.

If you have @secured annotations in a project only classes and/or its elements with @secure annotation will be protected.

You can use @secured on the different levels of hierarchy:

Class - whole class will be protected:

package test;

import com.licel.stringer.annotations.secured;

@secured
public class App {
	public static void main(String[] args) {
		SomeClass world = new SomeClass();
		System.out.println("Hello "+world.getName()+" World! "+AnotherClass.STRINGER_HELLO);
	}

}
Class field - just field will be protected:

package test;

import com.licel.stringer.annotations.secured;

public class AnotherClass {
    @secured
    static final String STRINGER_HELLO = "I'm protected by Stringer Java Obfuscation Toolkit.";
}
Class method - method body will be protected:

package test;

import com.licel.stringer.annotations.secured;

public class SomeClass {

	final String NAME = "C#";

	@secured
	public String getName(){
		return "Java";
	}

}

You should add stringer-annotations.jar (from distribution) in your class path to use @secured annotation in your projects.

In case of using Maven: add Maven-repository Stringer Java Obfuscation Toolkit and add dependency artifact com.licel.stringer-annotations:

   <repositories>
     <repository>
         <id>licel</id>
         <url>https://licelus.com/m2</url>
         <snapshots>
            <enabled>false</enabled>
         </snapshots>
     </repository>
   </repositories>

   <dependencies>
       <dependency>
           <groupId>com.licel.</groupId>
           <artifactId>stringer-annotations</artifactId>
           <version>1.0</version>
           <scope>compile</scope>
       </dependency>
   </dependencies>

Example of how to use annotations you can find in distribution: samples/HelloWorldAnnotations.