Package org.codehaus.janino

# Class Java.Located

java.lang.Object
org.codehaus.janino.Java.Located

All Implemented Interfaces:
  `Java.Locatable`

Direct Known Subclasses:
  `Java.AbstractCompilationUnit.ImportDeclaration`, `Java.AbstractTypeBodyDeclaration`, `Java.AccessModifier`, `Java.ArrayInitializer`, `Java.Atom`, `Java.CatchClause`, `Java.CatchParameter`, `Java.ElementValueArrayInitializer`, `Java.ExportsModuleDirective`, `Java.FunctionDeclarator.FormalParameter`, `Java.FunctionDeclarator.FormalParameters`, `Java.ModuleDeclaration`, `Java.OpensModuleDirective`, `Java.PackageDeclaration`, `Java.ProvidesModuleDirective`, `Java.RequiresModuleDirective`, `Java.Statement`, `Java.SwitchStatement.SwitchBlockStatementGroup`, `Java.TryStatement.Resource`, `Java.UsesModuleDirective`, `Java.VariableDeclarator`

Enclosing class:
  `Java`

public abstract static class Java.Located extends Object implements Java.Locatable
Abstract implementation of `Java.Locatable`.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final Java.Located`
`NOWHERE`
Indication of "no" or "unknown" location.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`Located(Location location)`

## Method Summary

Modifier and Type
Method
Description
`Location`
`getLocation()`
`void`
`throwCompileException(String message)`
Throws a `CompileException` with the given message and this object's location.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### NOWHERE

public static final Java.Located NOWHERE
Indication of "no" or "unknown" location.

## Constructor Details

### Located

protected Located(Location location)

## Method Details

### getLocation

public Location getLocation()

Specified by:
  `getLocation` in interface `Java.Locatable`
Returns:
  The location of this object

### throwCompileException

public void throwCompileException(String message) throws CompileException
Description copied from interface: `Java.Locatable`
Throws a `CompileException` with the given message and this object's location.

Specified by:
  `throwCompileException` in interface `Java.Locatable`
Parameters:
  `message` - The message to report
Throws:
  `CompileException`