list of dots

User Manual    [Previous]   [Next]   

W1012 Method Not Found Injection

Umple semantic warning issued when an injection is called on a method that cannot be found

Injecting code before or after a method must be done on an existing method. The injection will otherwise be ignored.

Example

//getAttr does not exist in the class
//which generates the warning
class A {
  before getAttr {
    doSomething();
  }
  
  doSomething(){/* Implementation */}
}
      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

//By declaring the attribute attr
//the getAttr method can now be used
class A {
  attr;
  
  before getAttr {
    doSomething();
  }
  
  doSomething(){/* Implementation */}
}
      

Load the above code into UmpleOnline