All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.fierioziy.asm.utils.ParticleVersion Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
package com.github.fierioziy.asm.utils;

import com.github.fierioziy.api.Particles_1_13;
import com.github.fierioziy.api.Particles_1_8;
import org.objectweb.asm.Type;

/**
 * 

An enum used by ParticleNode class to store * particle version.

* *

It also provides interface class associated with certain * particle version.

*/ public enum ParticleVersion { V1_7(Particles_1_8.class), V1_8(Particles_1_8.class), V1_13(Particles_1_13.class); private Class particleTypesClass; private Type superType; private Type implType; ParticleVersion(Class particleTypesClass) { this.particleTypesClass = particleTypesClass; superType = Type.getType(particleTypesClass); implType = Type.getObjectType(superType.getInternalName() + "_Impl"); } /** *

Gets interface class associated with particle version.

* @return an interface class. */ public Class getParticleTypesClass() { return particleTypesClass; } /** *

Gets Type object associated with interface class.

* @return a Type object representing interface class. */ public Type getSuperType() { return superType; } /** *

Gets Type object associated with class implementing interface.

* @return a Type object representing class implementing interface. */ public Type getImplType() { return implType; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy