-
Notifications
You must be signed in to change notification settings - Fork 850
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add getStructured default method, add empty StructuredConfigProperties (
- Loading branch information
Showing
3 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
...java/io/opentelemetry/sdk/autoconfigure/spi/internal/EmptyStructuredConfigProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.sdk.autoconfigure.spi.internal; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.Set; | ||
import javax.annotation.Nullable; | ||
|
||
/** Empty instance of {@link StructuredConfigProperties}. */ | ||
final class EmptyStructuredConfigProperties implements StructuredConfigProperties { | ||
|
||
private static final EmptyStructuredConfigProperties INSTANCE = | ||
new EmptyStructuredConfigProperties(); | ||
|
||
private EmptyStructuredConfigProperties() {} | ||
|
||
static EmptyStructuredConfigProperties getInstance() { | ||
return INSTANCE; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public String getString(String name) { | ||
return null; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public Boolean getBoolean(String name) { | ||
return null; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public Integer getInt(String name) { | ||
return null; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public Long getLong(String name) { | ||
return null; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public Double getDouble(String name) { | ||
return null; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public <T> List<T> getScalarList(String name, Class<T> scalarType) { | ||
return null; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public StructuredConfigProperties getStructured(String name) { | ||
return null; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public List<StructuredConfigProperties> getStructuredList(String name) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Set<String> getPropertyKeys() { | ||
return Collections.emptySet(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters