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

org.pure4j.model.ClassInitHandle Maven / Gradle / Ivy

Go to download

Parses Byte-code to check the purity semantics defined using pure4j-core annotations

The newest version!
package org.pure4j.model;

import java.lang.annotation.Annotation;
import java.lang.reflect.AccessibleObject;

public class ClassInitHandle extends MemberHandle implements ImplementationHandle {

	public ClassInitHandle(String className, String desc, int line) {
		super(className, "", desc, line);
	}

	public AccessibleObject hydrate(ClassLoader cl) {
	    return null;
	}
	
	public Class hydrateClass(ClassLoader cl) {
	    return hydrateClass(className, cl);
	}

	public String getDeclaringClass() {
		return className;
	}

	public  T getAnnotation(ClassLoader cl, Class c) {
		Class con = hydrateClass(cl);
		return con.getAnnotation(c);
	}
	
	@Override
	public Class getDeclaringClass(ClassLoader cl) {
		return hydrateClass(cl);
	}

	@Override
	public java.lang.reflect.Type[] getGenericTypes(ClassLoader cl) {
		return new java.lang.reflect.Type[] {};
	}

	public Class[] getRawTypes(ClassLoader cl) {
		return new Class[] {};
	}
	
	@Override
	public int getModifiers(ClassLoader cl) {
		return hydrateClass(cl).getModifiers();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy