congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Directory.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.sonar.api.resources.Directory
constructor

Best Java code snippets using org.sonar.api.resources.Directory.<init> (Showing top 13 results out of 315)

origin: stackoverflow.com

 var d = new Directory();
d.addLocation(1, "foo", "foo place");
d.addLocation(2, "bar", "bar place");

console.log(d.locations);
origin: stackoverflow.com

 Directory dir = new Directory(null);
String folderName = dir.folderName;
origin: stackoverflow.com

super(new Directory("." + System.getProperty("path.separator")), new StandardAnalyzer(), MaxFieldLength.UNLIMITED);
origin: stackoverflow.com

 public class CustomWriter extends IndexWriter implements Serializable {
  private Directory lDirectory;
  private IndexWriterConfig iwConfig;

  public CustomWriter() {
    super();
    // Assign default values
    this(new Directory("." + System.getProperty("path.separator")), new IndexWriterConfig());
  }

  public CustomWriter(Directory dir, IndexWriterConfig iwConf) {
    lDirectory = dir;
    iwConfig = iwConf;
  }

  public Directory getDirectory() { return lDirectory; }

  public IndexWriterConfig getConfig() { return iwConfig; }

  public void setDirectory(Directory dir) { lDirectory = dir; }

  public void setConfig(IndexWriterConfig conf) { iwConfig = conf; }

  // ...
}
origin: stackoverflow.com

 private void addName() 
{
  Scanner LocalInput = new Scanner(System.in);
  Directory buffer = null;
  String ID = null;

  System.out.println("Enter Station Designations Below, Enter Stop to quit");
  boolean breaker = false;
  while(breaker ==false)
  {
    System.out.print("Name:  ");
    ID = (LocalInput.nextLine());
    if(ID.equals("Stop"))
      breaker = true;
    else {
      buffer = new Directory(ID); 
      nameList.add(buffer); 
    }
  }
}
origin: stackoverflow.com

 public class DirectoryExamplesMain {

  public static final void main(String[] args) {
    ExpressionParser parser = new SpelExpressionParser();
    org.springframework.expression.Expression exp = null;

    Directory dir = new Directory();

    // Literal
    exp = parser.parseExpression("internetLastModified");
    Date d = exp.getValue(dir, Date.class);
    System.out.format("internetLastModified", d);


  }
}
origin: stackoverflow.com

 public void parseLine(String line) {
  if (isComment.matcher(line).matches()) {
    return; // comment, skip line
  }

  Matcher m = dirPattern.matcher(line);
  if (!m.matches()) {
    throw new InvalidSyntaxException("line " + line + " does not follow dir syntax.");
  }

  String dirName = m.group(0);
  String parentDirName = m.group(1);
  if (parentDirName == "?") {
    directories.put(dirName, new Directory(dirName));
  } else {
    Directory parentDir = directories.get(parentDirName);
    if (parentDir == null) {
      throw new DirectoryNotFoundException("Directory " + parentDir + " not found");
    }
    directories.put(dirName, new Directory(dirName, parentDir));
  }
}
origin: org.codehaus.sonar/sonar-plugin-api

/**
 * Internal use only.
 * @deprecated since 5.1 use {@link FileSystem#inputDir(java.io.File)}
 */
@Deprecated
public static Directory create(String relativePathFromBaseDir) {
 Directory d = new Directory();
 String normalizedPath = normalize(relativePathFromBaseDir);
 d.setKey(normalizedPath);
 d.setPath(normalizedPath);
 return d;
}
origin: stackoverflow.com

DirectoryComponent directory = new Directory(file, path);
allDirectory.add(directory);
origin: stackoverflow.com

Directory d = new Directory(directoryDataFile);
Scanner stdin = new Scanner(System.in);
System.out.println("Directory Server is Ready!");
origin: stackoverflow.com

if (new Directory("/proc").exists())
else if (new Directory("/Applications").exists()) {
 localOS = new MacOSX();
} else {
origin: stackoverflow.com

 import java.util.Date;

import org.springframework.expression.AccessException;
import org.springframework.expression.BeanResolver;
import org.springframework.expression.EvaluationContext;
import org.springframework.expression.ExpressionParser;
import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.StandardEvaluationContext;

public class DirectoryExamplesMain {

  public static final void main(String[] args) {
    final ExpressionParser parser = new SpelExpressionParser();

  // Bean references
  final StandardEvaluationContext context = new StandardEvaluationContext();
  context.setBeanResolver(
    new BeanResolver() {
    @Override
    public Object resolve(EvaluationContext arg0, String arg1)
      throws AccessException {
       return new Directory();
  }});

  System.out.format("%s [%s]%n","@directory.internetLastModified",  parser.parseExpression("@directory.internetLastModified").getValue(context));
}
origin: org.codehaus.sonar.plugins/sonar-xoo-plugin

@Override
public void analyse(Project module, org.sonar.api.batch.SensorContext context) {
 createIssueOnDir(new Directory(""));
 File src = module.getFileSystem().getSourceDirs().get(0);
 for (File f : fileSystem.files(FileQuery.onMain().onLanguage(Xoo.KEY))) {
  String relativePathFromSourceDir = new PathResolver().relativePath(src, f);
  org.sonar.api.resources.File sonarFile = new org.sonar.api.resources.File(relativePathFromSourceDir);
  Issuable issuable = perspectives.as(Issuable.class, sonarFile);
  issuable.addIssue(issuable.newIssueBuilder()
   .ruleKey(RuleKey.of(XooRulesDefinition.XOO_REPOSITORY, RULE_KEY))
   .message("Issue created using deprecated API")
   .line(1)
   .build());
  sonarFile = context.getResource(sonarFile);
  Directory parent = sonarFile.getParent();
  createIssueOnDir(parent);
 }
}
org.sonar.api.resourcesDirectory<init>

Popular methods of Directory

  • create
    Internal use only.
  • fromIOFile
  • getKey
  • getPath
  • parseKey
  • relativePathFromSourceDir
    Internal.
  • add
  • closeDirectory
  • delete
  • equals
  • inDirectory
  • normalize
  • inDirectory,
  • normalize,
  • setKey,
  • setPath

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • JCheckBox (javax.swing)
  • JComboBox (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now