|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.model.mapper.internal.Helper
public class Helper
Helper class for the mapper - contains methods processing reflection data.
Constructor Summary | |
---|---|
Helper()
|
Method Summary | |
---|---|
static Method |
getAnnotatedMethod(Class klass,
String linkName)
Return an annotated method whose annotation name is the given parameter. |
static Constructor<Mappable> |
getConstructor(Class<Mappable> klass)
Return default constructor for given class. |
static MapLink |
getLinkData(Class klass,
String linkName)
Return link data (MapLink annotation) for the given mappable and link with given name. |
static pl.edu.agh.cast.model.mapper.internal.AttributeEntry[] |
getMappedAttributes(Class<Mappable> klass)
Get methods with MapAttribute annotations for the given class. |
static pl.edu.agh.cast.model.mapper.internal.LinkEntry[] |
getMappedLinks(Class<Mappable> klass)
Get methods with MapLink annotations for the given class. |
static Method |
getSetter(Mappable object,
Object linkedElement,
String setterName)
Returns the setter methods. |
static boolean |
isSuperMapped(Class klass)
Checks if given class is mapped to metamodel. |
static Method[] |
mappedAttributeMethods(Class klass)
Find all methods which have the MapAttribute annotation present. |
static Class<Mappable> |
mappedClass(String typeName,
Map<String,Class> typeMap)
Returns the class for given type name and type map. |
static Method[] |
mappedLinkMethods(Class klass)
Find all methods which have the MapAttribute annotation present. |
static String |
mappedTypeName(Class klass)
Get mapped type name for given class. |
static String |
objectAccessor(Class klass,
String linkName)
Returns the name of the accessor (i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Helper()
Method Detail |
---|
public static Constructor<Mappable> getConstructor(Class<Mappable> klass) throws SecurityException, NoSuchMethodException
klass
- The class
SecurityException
NoSuchMethodException
public static String objectAccessor(Class klass, String linkName)
klass
- The klass for which the accessor is to be returned.linkName
- The name of the link.
public static String mappedTypeName(Class klass)
klass
- The klass of the mapped object
public static MapLink getLinkData(Class klass, String linkName)
klass
- The class where the link should be looked for.linkName
- The name of the link
public static Method getAnnotatedMethod(Class klass, String linkName)
klass
- The class for which the method is returned.linkName
- The name of the link.
public static Method[] mappedAttributeMethods(Class klass)
klass
- Class which is searched for the methods
public static Method[] mappedLinkMethods(Class klass)
klass
- Class which is searched for the methods
public static boolean isSuperMapped(Class klass)
klass
- Checked class
public static Method getSetter(Mappable object, Object linkedElement, String setterName)
object
- The object whose class is looked for the setter.linkedElement
- The object whose class is used to determine the setters argumentsetterName
- The name of the setter method (with set in it.)
public static pl.edu.agh.cast.model.mapper.internal.LinkEntry[] getMappedLinks(Class<Mappable> klass)
klass
- The class for which methods with annotations are returned.
public static pl.edu.agh.cast.model.mapper.internal.AttributeEntry[] getMappedAttributes(Class<Mappable> klass)
klass
- The class for which methods with annotations are returned.
public static Class<Mappable> mappedClass(String typeName, Map<String,Class> typeMap) throws ClassNotFoundException
typeName
- The name of the type in base model.typeMap
- The type map.
ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |