Skip to content

Commit

Permalink
Remove Experimental annotation for XReflection API
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoMorin committed Jun 19, 2024
1 parent 5cfac2c commit b633d00
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,23 +415,20 @@ public static Class<?> toArrayClass(Class<?> clazz) {
/**
* @since v9.0.0
*/
@ApiStatus.Experimental
public static MinecraftClassHandle ofMinecraft() {
return new MinecraftClassHandle(new ReflectiveNamespace());
}

/**
* @since v9.0.0
*/
@ApiStatus.Experimental
public static DynamicClassHandle classHandle() {
return new DynamicClassHandle(new ReflectiveNamespace());
}

/**
* @since v11.0.0
*/
@ApiStatus.Experimental
public static StaticClassHandle of(Class<?> clazz) {
return new StaticClassHandle(new ReflectiveNamespace(), clazz);
}
Expand All @@ -440,7 +437,6 @@ public static StaticClassHandle of(Class<?> clazz) {
/**
* @since v11.0.0
*/
@ApiStatus.Experimental
public static ReflectiveNamespace namespaced() {
return new ReflectiveNamespace();
}
Expand All @@ -449,7 +445,6 @@ public static ReflectiveNamespace namespaced() {
* @since v9.0.0
*/
@SafeVarargs
@ApiStatus.Experimental
public static <T, H extends Handle<T>> AggregateHandle<T, H> any(H... handles) {
return new AggregateHandle<>(Arrays.stream(handles).map(x -> (Callable<H>) () -> x).collect(Collectors.toList()));
}
Expand All @@ -458,7 +453,6 @@ public static <T, H extends Handle<T>> AggregateHandle<T, H> any(H... handles) {
* @since v9.0.0
*/
@SafeVarargs
@ApiStatus.Experimental
public static <T, H extends Handle<T>> AggregateHandle<T, H> anyOf(Callable<H>... handles) {
return new AggregateHandle<>(Arrays.asList(handles));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.lang.invoke.MethodHandles;
import java.util.*;

@ApiStatus.Experimental
public class ReflectiveNamespace {
private final Map<String, Class<?>> imports = new HashMap<>();
private final MethodHandles.Lookup lookup = MethodHandles.lookup();
Expand Down Expand Up @@ -50,7 +49,6 @@ public MethodHandles.Lookup getLookup() {
/**
* @since v11.0.0
*/
@ApiStatus.Experimental
public StaticClassHandle of(Class<?> clazz) {
imports(clazz);
return new StaticClassHandle(this, clazz);
Expand All @@ -66,13 +64,11 @@ public void unlink(ClassHandle handle) {
this.handles.remove(handle);
}

@ApiStatus.Experimental
public DynamicClassHandle classHandle(@Language("Java") String declaration) {
DynamicClassHandle classHandle = new DynamicClassHandle(this);
return new ReflectionParser(declaration).imports(this).parseClass(classHandle);
}

@ApiStatus.Experimental
public MinecraftClassHandle ofMinecraft(@Language("Java") String declaration) {
MinecraftClassHandle classHandle = new MinecraftClassHandle(this);
return new ReflectionParser(declaration).imports(this).parseClass(classHandle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
import com.cryptomorin.xseries.reflection.jvm.ReflectiveNamespace;
import com.cryptomorin.xseries.reflection.parser.ReflectionParser;
import org.intellij.lang.annotations.Language;
import org.jetbrains.annotations.ApiStatus;

import java.util.Objects;
import java.util.Set;

@ApiStatus.Experimental
public abstract class ClassHandle implements Handle<Class<?>> {
protected final ReflectiveNamespace namespace;

Expand All @@ -35,7 +33,6 @@ public DynamicClassHandle inner(@Language("Java") String declaration) {
return inner(namespace.classHandle(declaration));
}

@ApiStatus.Experimental
public <T extends DynamicClassHandle> T inner(T handle) {
Objects.requireNonNull(handle, "Inner handle is null");
if (this == handle) throw new IllegalArgumentException("Same instance: " + this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
import com.cryptomorin.xseries.reflection.jvm.classes.PackageHandle;
import org.intellij.lang.annotations.Language;
import org.intellij.lang.annotations.Pattern;
import org.jetbrains.annotations.ApiStatus;

@ApiStatus.Experimental
public class MinecraftClassHandle extends DynamicClassHandle {
public MinecraftClassHandle(ReflectiveNamespace namespace) {
super(namespace);
Expand Down

0 comments on commit b633d00

Please sign in to comment.