org.apache.qpid.agent.binding
Class ClassBinding

java.lang.Object
  extended by org.apache.qpid.agent.binding.ClassBinding
All Implemented Interfaces:
TypeBinding
Direct Known Subclasses:
EnumBinding

public class ClassBinding
extends Object
implements TypeBinding

Binding information from a custom java class to a QMF schema


Field Summary
protected  BindingContext bctx
           
protected  boolean exposeBehaviour
           
protected  byte[] hash
           
protected  Class javaClass
           
protected  short kind
           
protected  ArrayList<MethodBinding> methods
           
protected  Map<String,MethodBinding> methodsByName
           
protected  String name
           
protected  String pkg
           
protected  ArrayList<PropertyBinding> properties
           
protected  ClassBinding superType
           
 
Constructor Summary
ClassBinding(String pkg, String name, Class cls, boolean exposeBehaviour, BindingContext bctx)
           
 
Method Summary
protected  org.apache.qpid.agent.binding.ClassBinding.MethodType classify(Class<?> cls, Method m)
           
 Object decode(org.apache.qpid.transport.codec.Decoder dec)
           
protected  Object decodeWithNoHeaders(org.apache.qpid.transport.codec.Decoder dec)
           
 void encode(org.apache.qpid.transport.codec.Encoder enc)
           
 void encode(org.apache.qpid.transport.codec.Encoder enc, Object value)
           
 List<PropertyBinding> getAllProperties()
           
 short getCode()
           
 Class<?> getJavaClass()
           
 short getKind()
           
 MethodBinding getMethod(String name)
           
 List<MethodBinding> getMethods()
           
protected  ArrayList<Method> getMethods(Class cls)
           
 String getName()
           
 String getPackage()
           
 List<PropertyBinding> getProperties()
           
 String getRefClass()
           
 String getRefPackage()
           
 byte[] getSchemaHash()
           
protected  boolean hasQMFSupertype(Class cls)
           
 boolean isEvent()
           
 boolean isNative()
           
protected  boolean isOptional(Method m, TypeBinding type)
           
 boolean optionalDefault()
           
 ClassBinding parse()
           
protected  List<String> processPresenceMasks(org.apache.qpid.transport.codec.Decoder dec)
           
protected  String property(Method m)
           
 void setKind(short kind)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exposeBehaviour

protected boolean exposeBehaviour

pkg

protected String pkg

bctx

protected BindingContext bctx

name

protected String name

properties

protected ArrayList<PropertyBinding> properties

methods

protected ArrayList<MethodBinding> methods

methodsByName

protected Map<String,MethodBinding> methodsByName

javaClass

protected Class javaClass

kind

protected short kind

hash

protected byte[] hash

superType

protected ClassBinding superType
Constructor Detail

ClassBinding

public ClassBinding(String pkg,
                    String name,
                    Class cls,
                    boolean exposeBehaviour,
                    BindingContext bctx)
Method Detail

classify

protected org.apache.qpid.agent.binding.ClassBinding.MethodType classify(Class<?> cls,
                                                                         Method m)

property

protected String property(Method m)

getMethods

protected ArrayList<Method> getMethods(Class cls)

hasQMFSupertype

protected boolean hasQMFSupertype(Class cls)

isOptional

protected boolean isOptional(Method m,
                             TypeBinding type)

parse

public ClassBinding parse()

getPackage

public String getPackage()

getName

public String getName()

getProperties

public List<PropertyBinding> getProperties()

getAllProperties

public List<PropertyBinding> getAllProperties()

getMethods

public List<MethodBinding> getMethods()

getMethod

public MethodBinding getMethod(String name)

getSchemaHash

public byte[] getSchemaHash()

encode

public void encode(org.apache.qpid.transport.codec.Encoder enc)

getCode

public short getCode()
Specified by:
getCode in interface TypeBinding

getJavaClass

public Class<?> getJavaClass()
Specified by:
getJavaClass in interface TypeBinding

decode

public Object decode(org.apache.qpid.transport.codec.Decoder dec)
Specified by:
decode in interface TypeBinding

decodeWithNoHeaders

protected Object decodeWithNoHeaders(org.apache.qpid.transport.codec.Decoder dec)

processPresenceMasks

protected List<String> processPresenceMasks(org.apache.qpid.transport.codec.Decoder dec)

encode

public void encode(org.apache.qpid.transport.codec.Encoder enc,
                   Object value)
Specified by:
encode in interface TypeBinding

isNative

public boolean isNative()
Specified by:
isNative in interface TypeBinding

optionalDefault

public boolean optionalDefault()
Specified by:
optionalDefault in interface TypeBinding

getRefClass

public String getRefClass()
Specified by:
getRefClass in interface TypeBinding

getRefPackage

public String getRefPackage()
Specified by:
getRefPackage in interface TypeBinding

getKind

public short getKind()

isEvent

public boolean isEvent()

setKind

public void setKind(short kind)


Licensed to the Apache Software Foundation