public class ClassArgParser extends Object
CFMetaDataParser
.
Transforms the information in these args into Class
instances.
Note that when parsing .java files, only the main class in the file
is detected. Other classes defined in the file, such as inner classes,
are not added to the returned classes list.Constructor and Description |
---|
ClassArgParser() |
Modifier and Type | Method and Description |
---|---|
ClassLoader |
getClassLoader()
The class loader with which to load parsed classes.
|
Map<Object,String[]> |
mapTypeNames(MetaDataIterator itr)
Return a mapping of each metadata resource to an array of its contained
class names.
|
Map<Object,Class<?>[]> |
mapTypes(MetaDataIterator itr)
Return a mapping of each metadata resource to an array of its
contained classes.
|
String[] |
parseTypeNames(MetaDataIterator itr)
Return the names of the class(es) from the given metadatas.
|
String[] |
parseTypeNames(String arg)
Return the names of the class(es) from the given arg.
|
Class<?>[] |
parseTypes(MetaDataIterator itr)
Return the
Class representation of the class(es) named in the
given metadatas. |
Class<?>[] |
parseTypes(String arg)
Return the
Class representation of the class(es) named in the
given arg. |
void |
setClassLoader(ClassLoader loader)
The class loader with which to load parsed classes.
|
void |
setMetaDataStructure(String packageElementName,
String packageAttributeName,
String[] classElementNames,
String classAttributeName)
Set the the relevant metadata file structure so that metadata files
containing class names can be parsed.
|
public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader loader)
public void setMetaDataStructure(String packageElementName, String packageAttributeName, String[] classElementNames, String classAttributeName)
public Class<?>[] parseTypes(String arg)
Class
representation of the class(es) named in the
given arg.arg
- a class name, .java file, .class file, or metadata
file naming the type(s) to act onpublic Class<?>[] parseTypes(MetaDataIterator itr)
Class
representation of the class(es) named in the
given metadatas.public Map<Object,Class<?>[]> mapTypes(MetaDataIterator itr)
public String[] parseTypeNames(String arg)
arg
- a class name, .java file, .class file, or metadata
file naming the type(s) to act onIllegalArgumentException
- with appropriate message on errorpublic String[] parseTypeNames(MetaDataIterator itr)
public Map<Object,String[]> mapTypeNames(MetaDataIterator itr)
Copyright © 2006–2019 Apache Software Foundation. All rights reserved.