Class IllegalBHDescriptor
- java.lang.Object
 - 
- jetbrains.mps.core.aspects.behaviour.IllegalBHDescriptor
 
 
- 
- All Implemented Interfaces:
 BHDescriptor
public final class IllegalBHDescriptor extends Object implements BHDescriptor
 
- 
- 
Constructor Summary
Constructors Constructor Description IllegalBHDescriptor(SAbstractConcept concept) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SAbstractConceptgetConcept()List<SMethod<?>>getDeclaredMethods()Returns list ofSMethodobjects reflecting all the methods (from private to public) of the concept represented by this descriptor EXCLUDING those inherited from super concepts.SMethod<?>getMethod(SMethodId methodId)Returns aSMethodhandle that reflects the public (!) behavior method of the concept represented by the owningSAbstractConceptNote that for all the methods #getConcept returns the concept of their hierarchy which contains the implementation of this methodList<SMethod<?>>getMethods()Returns list ofSMethodobjects reflecting all the public (!) methods of the concept represented by this descriptor INCLUDING those declared by the concept itself and including those inherited from super concepts.<T> Tinvoke(SAbstractConcept operand, SMethod<T> method, Object... parameters)invokes a static method (trying to resolve the right method on runtime if it is virtual)<T> Tinvoke(SNode operand, SMethod<T> method, Object... parameters)invokes a method (trying to resolve the right method on runtime if it is virtual) one could ask why we have three concepts accessible from here? the answer: suppose we haveconcepts A extends B extends C C has a virtual method #foo declared (which is abstract and overridden both in A and B) node n = new node(); n.foo();then we have BHDescriptor#getConcept == A, operand.getConcept == B, method.getConcept == A|B|C (any of this yields the same)<T> TinvokeSpecial(SAbstractConcept operand, SMethod<T> method, Object... parameters)invokes a method without dynamic binding (not trying to resolve the right method on runtime if it is virtual) E.g.<T> TinvokeSpecial(SNode operand, SMethod<T> method, Object... parameters)invokes a method without dynamic binding (not trying to resolve the right method on runtime if it is virtual) E.g.<T> TinvokeSuper(SAbstractConcept operand, SMethod<T> method, Object... parameters)invokes a virtual static method, see above for details<T> TinvokeSuper(SNode operand, SMethod<T> method, Object... parameters)invokes a virtual method, selecting from the ancestors of the given node concept.SNodenewNode(SModel model, SConstructor constructor, Object... parameters)invokes the behavior constructorStringtoString()- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface jetbrains.mps.core.aspects.behaviour.api.BHDescriptor
getDeclaredMethod 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
IllegalBHDescriptor
public IllegalBHDescriptor(@NotNull SAbstractConcept concept)
 
 - 
 
- 
Method Detail
- 
newNode
@NotNull public SNode newNode(@Nullable SModel model, @NotNull SConstructor constructor, Object... parameters)
Description copied from interface:BHDescriptorinvokes the behavior constructor- Specified by:
 newNodein interfaceBHDescriptor- Parameters:
 model- a container for the new nodeconstructor- constructor to invokeparameters- parameters to pass- Returns:
 - new SNode which is initialized and constructed
 
 
- 
invoke
public <T> T invoke(@NotNull SNode operand, @NotNull SMethod<T> method, Object... parameters)
Description copied from interface:BHDescriptorinvokes a method (trying to resolve the right method on runtime if it is virtual) one could ask why we have three concepts accessible from here? the answer: suppose we haveconcepts A extends B extends C C has a virtual method #foo declared (which is abstract and overridden both in A and B) node n = new node(); n.foo();then we have BHDescriptor#getConcept == A, operand.getConcept == B, method.getConcept == A|B|C (any of this yields the same)- Specified by:
 invokein interfaceBHDescriptor
 
- 
invoke
public <T> T invoke(@NotNull SAbstractConcept operand, @NotNull SMethod<T> method, Object... parameters)
Description copied from interface:BHDescriptorinvokes a static method (trying to resolve the right method on runtime if it is virtual)- Specified by:
 invokein interfaceBHDescriptor
 
- 
invokeSuper
public <T> T invokeSuper(@NotNull SNode operand, @NotNull SMethod<T> method, Object... parameters)
Description copied from interface:BHDescriptorinvokes a virtual method, selecting from the ancestors of the given node concept. the difference with the#invokemethod is only that we do not include the node concept itself in the scope.- Specified by:
 invokeSuperin interfaceBHDescriptor
 
- 
invokeSuper
public <T> T invokeSuper(@NotNull SAbstractConcept operand, @NotNull SMethod<T> method, Object... parameters)
Description copied from interface:BHDescriptorinvokes a virtual static method, see above for details- Specified by:
 invokeSuperin interfaceBHDescriptor
 
- 
invokeSpecial
public <T> T invokeSpecial(@NotNull SNode operand, @NotNull SMethod<T> method, Object... parameters)
Description copied from interface:BHDescriptorinvokes a method without dynamic binding (not trying to resolve the right method on runtime if it is virtual) E.g. used when calling 'this' or 'super' non-virtual method from the behavior or calling a private method- Specified by:
 invokeSpecialin interfaceBHDescriptor
 
- 
invokeSpecial
public <T> T invokeSpecial(@NotNull SAbstractConcept operand, @NotNull SMethod<T> method, Object... parameters)
Description copied from interface:BHDescriptorinvokes a method without dynamic binding (not trying to resolve the right method on runtime if it is virtual) E.g. used when calling 'this' or 'super' non-virtual method from the behavior or calling a private method- Specified by:
 invokeSpecialin interfaceBHDescriptor
 
- 
getMethods
@NotNull public List<SMethod<?>> getMethods()
Description copied from interface:BHDescriptorReturns list ofSMethodobjects reflecting all the public (!) methods of the concept represented by this descriptor INCLUDING those declared by the concept itself and including those inherited from super concepts.- Specified by:
 getMethodsin interfaceBHDescriptor
 
- 
getDeclaredMethods
@NotNull public List<SMethod<?>> getDeclaredMethods()
Description copied from interface:BHDescriptorReturns list ofSMethodobjects reflecting all the methods (from private to public) of the concept represented by this descriptor EXCLUDING those inherited from super concepts.- Specified by:
 getDeclaredMethodsin interfaceBHDescriptor
 
- 
getMethod
@Nullable public SMethod<?> getMethod(@NotNull SMethodId methodId)
Description copied from interface:BHDescriptorReturns aSMethodhandle that reflects the public (!) behavior method of the concept represented by the owningSAbstractConceptNote that for all the methods #getConcept returns the concept of their hierarchy which contains the implementation of this method- Specified by:
 getMethodin interfaceBHDescriptor- Returns:
 - null if the method was not found
 - See Also:
 BHDescriptor.getMethods()
 
- 
getConcept
@NotNull public SAbstractConcept getConcept()
- Specified by:
 getConceptin interfaceBHDescriptor- Returns:
 - owning concept of this descriptor
 
 
 - 
 
 -