Package jadex.bridge
Class ClassInfo
- java.lang.Object
- 
- jadex.bridge.ClassInfo
 
- 
 public class ClassInfo extends java.lang.ObjectThe class info struct serves for saving class information. A class info may hold a class itself or the class name for resolving the class. This struct should be used at all places where classes are meant to be send to remote nodes. In this case the class info will only transfer the class name forcing the receiver to lookup the class itself. The class loader for resolving a class info can be found by using the corresponding resource identifier (rid) of the component or service that uses the class.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.ClassLoaderclassloaderThe classloader with which this info was loaded.static ClassInfo[]EMPYT_CLASSINFO_ARRAYEmpty class info array.protected java.lang.StringgeninfoThe generic type info (e.g.protected java.lang.Class<?>typeThe service interface type.protected java.lang.StringtypenameThe service interface type as string.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Test if object is equal to this.java.lang.StringgetClassNameOnly()Get class info in class name notation, i.e.java.lang.StringgetGenericTypeName()Get the generic type name.java.lang.StringgetGeninfo()Get the geninfo.java.lang.StringgetPrefixNotation()Get class info in prefix notation, i.e.java.lang.Class<?>getType(java.lang.ClassLoader cl)Get the type.java.lang.Class<?>getType(java.lang.ClassLoader cl, java.lang.String[] imports)Get the type.java.lang.Class<?>getType0()Get the type, if availablejava.lang.StringgetTypeName()Get the type name.inthashCode()Get the hashcode.voidsetGeninfo(java.lang.String geninfo)The geninfo to set.voidsetTheType(java.lang.Class<?> type)Set the type.voidsetTypeName(java.lang.String typename)Set the name.java.lang.StringtoString()Get the string representation.
 
- 
- 
- 
Field Detail- 
EMPYT_CLASSINFO_ARRAYpublic static final ClassInfo[] EMPYT_CLASSINFO_ARRAY Empty class info array.
 - 
typenameprotected java.lang.String typename The service interface type as string.
 - 
typeprotected java.lang.Class<?> type The service interface type.
 - 
geninfoprotected java.lang.String geninfo The generic type info (e.g. when obtained via method parameter).
 - 
classloaderprotected java.lang.ClassLoader classloader The classloader with which this info was loaded. Note 1: This must not be the same as method.getClass().getClassLoader() because the latter returns the loader responsible for the class which could be higher in the parent hierarchy. Note 2: The check current_cl==last_cl is not perfect because when invoked with a parent classloader it will reload the class (although not necessary)
 
- 
 - 
Constructor Detail- 
ClassInfopublic ClassInfo() Create a new class info.
 - 
ClassInfopublic ClassInfo(java.lang.Class<?> type) Create a new class info.- Parameters:
- type- The class info.
 
 - 
ClassInfopublic ClassInfo(java.lang.reflect.Type type) Create a new class info.- Parameters:
- type- The class info.
 
 - 
ClassInfopublic ClassInfo(java.lang.String typename) Create a new class info.- Parameters:
- typename- The class name.
 
 
- 
 - 
Method Detail- 
getTypeNamepublic java.lang.String getTypeName() Get the type name.- Returns:
- the type name.
 
 - 
setTypeNamepublic void setTypeName(java.lang.String typename) Set the name.- Parameters:
- typename- The name to set.
 
 - 
getTypepublic java.lang.Class<?> getType(java.lang.ClassLoader cl) Get the type.- Returns:
- The type.
 
 - 
getTypepublic java.lang.Class<?> getType(java.lang.ClassLoader cl, java.lang.String[] imports)Get the type.- Returns:
- The type.
 
 - 
getType0public java.lang.Class<?> getType0() Get the type, if available- Returns:
- The type or null if not yet resolved.
 
 - 
setTheTypepublic void setTheType(java.lang.Class<?> type) Set the type.- Parameters:
- type- The type to set.
 
 - 
getGenericTypeNamepublic java.lang.String getGenericTypeName() Get the generic type name.- Returns:
- The type name.
 
 - 
getGeninfopublic java.lang.String getGeninfo() Get the geninfo.- Returns:
- The geninfo
 
 - 
setGeninfopublic void setGeninfo(java.lang.String geninfo) The geninfo to set.- Parameters:
- geninfo- The geninfo to set
 
 - 
hashCodepublic int hashCode() Get the hashcode.- Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) Test if object is equal to this.- Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() Get the string representation.- Overrides:
- toStringin class- java.lang.Object
 
 - 
getPrefixNotationpublic java.lang.String getPrefixNotation() Get class info in prefix notation, i.e. String - java.lang
 - 
getClassNameOnlypublic java.lang.String getClassNameOnly() Get class info in class name notation, i.e. String
 
- 
 
-