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

Alachisoft.NCache.Common.AssemblyBrowser.AssemblyReflector Maven / Gradle / Ivy

There is a newer version: 5.3.3
Show newest version
package Alachisoft.NCache.Common.AssemblyBrowser;

/*
 * Mansoor: Assemblies does not exist in java. In java we have JAR files can have one
 * or multiple classes.
 **/

public class AssemblyReflector {
//	private java.util.ArrayList _classes = null;
//	private Assembly[] _assembly;
////C# TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes:
//	//[CLSCompliant(false)]
//	public ClassTypeFilter _readThruTypefilter;
//	public ClassTypeFilter _writeThruTypefilter;
//	public AssemblyReflector(String[] filenames, ClassTypeFilter readThruFilter, ClassTypeFilter writeThruFilter) {
//		_assembly = new Assembly[filenames.length];
//		LoadAssemblies(filenames);
//		_readThruTypefilter = readThruFilter;
//		_writeThruTypefilter = writeThruFilter;
//	}
//
//	private void LoadAssemblies(String[] filenames) {
//		int index = 0;
//		for (String filename : filenames) {
//			ProxyDomain pd = new ProxyDomain();
//			_assembly[index] = pd.GetAssembly(filename);
//
//			//_assembly[index] = Assembly.LoadFile(filename);
//			index++;
//		}
//	}
//
//	public final java.util.ArrayList GetClasses() {
//		try {
//			if (_assembly != null) {
//				for (Assembly asm : _assembly) {
//
//					java.lang.Class[] type = asm.GetTypes();
//					_classes = new java.util.ArrayList();
//					//_classes = new string[type.Length];
//					java.util.Iterator enu = type.iterator();
//					while (enu.hasNext()) {
//						if (_readThruTypefilter != null) {
//							if (!_readThruTypefilter.FilterType((java.lang.Class)enu.next())) {
//								continue;
//							}
//						}
//						if (_writeThruTypefilter != null) {
//							if (!_writeThruTypefilter.FilterType((java.lang.Class)enu.next())) {
//								continue;
//							}
//						}
//						//if (_readThruTypefilter != null && _writeThruTypefilter != null)
//						//    if (!_writeThruTypefilter.FilterType((Type)enu.Current) && !_readThruTypefilter.FilterType((Type)enu.Current))
//						//        continue;
//						String innerClass = enu.next().toString();
//						if (innerClass.contains("+")) {
//							innerClass = innerClass.replace("+", ".");
//						}
//						_classes.add(innerClass);
//
//					}
//				}
//
//				return _classes;
//			}
//		} catch (RuntimeException e) {
//			throw e;
//		}
//		return null;
//
//	}
//
//	public final String[] getFullName() {
//		String[] names = new String[_assembly.length];
//		int index = 0;
//		for (Assembly asm : _assembly) {
//			names[index] = asm.FullName;
//			index++;
//		}
//		return names;
//	}
//	public final String getGetfirstItem() {
//		try {
//			return _classes.get(0);
//		} catch (RuntimeException e) {
//			throw new RuntimeException("Provider class not found.");
//		}
//	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy