trait ReflectiveInvoker extends DefaultJavaObjectToDomainValueConversion with AsJavaObject
Support the invocation of methods (using Java reflection) of Java objects that represent concrete domain values.
This greatly facilitates the implementation of methods that need to simulate the logic of a specific object.
- Self Type
- ReflectiveInvoker with Domain
- Source
- ReflectiveInvoker.scala
- Alphabetic
- By Inheritance
- ReflectiveInvoker
- AsJavaObject
- DefaultJavaObjectToDomainValueConversion
- AsDomainValue
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def invokeReflective(pc: PC, declaringClass: ReferenceType, name: String, descriptor: MethodDescriptor, operands: (ReflectiveInvoker.this)#Operands): Option[(ReflectiveInvoker.this)#MethodCallResult]
Performs a reflective call to the specified method.
Performs a reflective call to the specified method. The declaring class needs to be in the classpath of the analyzing JavaVM.
- returns
None
when the reflective invocation has failed.
- See also
DefaultJavaObjectToDomainValueConversion for details.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toDomainValue(pc: Int, value: AnyRef): (ReflectiveInvoker.this)#DomainReferenceValue
Converts the given Java object to a corresponding
DomainValue
by creating anDomainValue
that represents an initialized (array/object) value.Converts the given Java object to a corresponding
DomainValue
by creating anDomainValue
that represents an initialized (array/object) value.- pc
The program counter of the instruction that was responsible for creating the respective value. (This is in – in general – not the instruction where the transformation is performed.)
- value
The object.
- returns
A
DomainReferenceValue
.
- Definition Classes
- DefaultJavaObjectToDomainValueConversion → AsDomainValue
- def toJavaObject(pc: Int, value: (ReflectiveInvoker.this)#DomainValue): Option[AnyRef]
Converts – if possible – a given
DomainValue
to a Java object that is appropriately initialized.Converts – if possible – a given
DomainValue
to a Java object that is appropriately initialized.Implementation
Every domain that supports the creation of a Java object's based on a domain value is expected to implement this method and to test if it can create a precise representation of the given value. If not, the implementation has to delegate the responsibility to the super method to creat an abstract representation.
abstract override def toJavaObject(value : DomainValue): Option[Object] = { if(value...) // create and return Java object else super.toJavaObject(value) }
- returns
Some(Object) is returned if it was possible to create a compatible corresponding Java object; otherwise
None
is returned. Default:None
unless thevalue
is null. In the latter caseSome(null)
is returned.
- Definition Classes
- AsJavaObject
- Note
This operation is generally only possible if the domain value maintains enough state information to completely initialize the Java object.
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def warnOnFailedReflectiveCalls: Boolean
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated