Package org.oorexx.language.directive

Examples of org.oorexx.language.directive.OORexxAttribute


   
   
    if(line.toLowerCase().contains("::method"))
      return convertMethodAttribute(line);
   
    OORexxAttribute attribute = new OORexxAttribute();
    String[] words = line.split(" +");
   
    for(int i = 0 ; i < words.length ; i++){
      if(words[i].toLowerCase().equals("::attribute"))
        attribute.setName(words[i+1]);
      else if(words[i].toLowerCase().equals("get"))
        attribute.setMutator(OORexxMutator.GET);
      else if(words[i].toLowerCase().equals("set"))
        attribute.setMutator(OORexxMutator.SET);
      else if(words[i].toLowerCase().equals("public"))
        attribute.setAccessModifier(OORexxAccessModifier.PUBLIC);
      else if(words[i].toLowerCase().equals("private"))
        attribute.setAccessModifier(OORexxAccessModifier.PRIVATE);
      else
        try{
          if(Arrays.asList(OORexxDirectiveOption.values()).contains(OORexxDirectiveOption.valueOf(words[i].toUpperCase())))
            attribute.addOption(OORexxDirectiveOption.valueOf(words[i].toUpperCase()));
        }catch(IllegalArgumentException ex){
         
        }
    }
   
    if(attribute.hasOption(OORexxDirectiveOption.EXTERNAL))
      attribute.setExternalLibrary(LibraryExtractor.extractExternalLibrary(line));
   
   
    return attribute;
  }
View Full Code Here


  }
 

 
  private static OORexxAttribute convertMethodAttribute(String line){
    OORexxAttribute attribute = new OORexxAttribute();
   
    String[] words = line.split(" +");
   
    attribute.setName(words[1]);
   
    for(String word: words){
      if(word.toLowerCase().equals("private"))
        attribute.setAccessModifier(OORexxAccessModifier.PRIVATE);
      if(word.toLowerCase().equals("public"))
        attribute.setAccessModifier(OORexxAccessModifier.PUBLIC);
    }
   
    return attribute;
  }
View Full Code Here

TOP

Related Classes of org.oorexx.language.directive.OORexxAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.