code
stringlengths 11
173k
| docstring
stringlengths 2
593k
| func_name
stringlengths 2
189
| language
stringclasses 1
value | repo
stringclasses 844
values | path
stringlengths 11
294
| url
stringlengths 60
339
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
private static String filterNumericSugar(String address) {
StringBuilder builder = new StringBuilder();
int len = address.length();
for (int i = 0; i < len; i++) {
char c = address.charAt(i);
int mapIndex = numericCharDialableMap.indexOfKey(c);
if (mapIndex < 0) return null;
if (! numericCharDialableMap.valueAt(mapIndex)) continue;
builder.append(c);
}
return builder.toString();
} |
Given a numeric address string, return the string without
syntactic sugar, meaning parens, spaces, hyphens/minuses, or
plus signs. If the input string contains non-numeric
non-punctuation characters, return null.
| CdmaSmsAddress::filterNumericSugar | java | Reginer/aosp-android-jar | android-32/src/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java | MIT |
private static String filterWhitespace(String address) {
StringBuilder builder = new StringBuilder();
int len = address.length();
for (int i = 0; i < len; i++) {
char c = address.charAt(i);
if ((c == ' ') || (c == '\r') || (c == '\n') || (c == '\t')) continue;
builder.append(c);
}
return builder.toString();
} |
Given a string, return the string without whitespace,
including CR/LF.
| CdmaSmsAddress::filterWhitespace | java | Reginer/aosp-android-jar | android-32/src/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java | MIT |
private void maybeUpdateIconScaleDimens() {
// We do not resize and scale system icons (on the right), only notification icons (on the
// left).
if (mNotification != null || mAlwaysScaleIcon) {
updateIconScaleForNotifications();
} else {
updateIconScaleForSystemIcons();
}
} |
Maximum allowed width or height for an icon drawable, if we can't get byte count
private static final int MAX_IMAGE_SIZE = 5000;
private static final String TAG = "StatusBarIconView";
private static final Property<StatusBarIconView, Float> ICON_APPEAR_AMOUNT
= new FloatProperty<StatusBarIconView>("iconAppearAmount") {
@Override
public void setValue(StatusBarIconView object, float value) {
object.setIconAppearAmount(value);
}
@Override
public Float get(StatusBarIconView object) {
return object.getIconAppearAmount();
}
};
private static final Property<StatusBarIconView, Float> DOT_APPEAR_AMOUNT
= new FloatProperty<StatusBarIconView>("dot_appear_amount") {
@Override
public void setValue(StatusBarIconView object, float value) {
object.setDotAppearAmount(value);
}
@Override
public Float get(StatusBarIconView object) {
return object.getDotAppearAmount();
}
};
private boolean mAlwaysScaleIcon;
private int mStatusBarIconDrawingSizeIncreased = 1;
private int mStatusBarIconDrawingSize = 1;
private int mStatusBarIconSize = 1;
private StatusBarIcon mIcon;
@ViewDebug.ExportedProperty private String mSlot;
private Drawable mNumberBackground;
private Paint mNumberPain;
private int mNumberX;
private int mNumberY;
private String mNumberText;
private StatusBarNotification mNotification;
private final boolean mBlocked;
private int mDensity;
private boolean mNightMode;
private float mIconScale = 1.0f;
private final Paint mDotPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
private float mDotRadius;
private int mStaticDotRadius;
private int mVisibleState = STATE_ICON;
private float mIconAppearAmount = 1.0f;
private ObjectAnimator mIconAppearAnimator;
private ObjectAnimator mDotAnimator;
private float mDotAppearAmount;
private OnVisibilityChangedListener mOnVisibilityChangedListener;
private int mDrawableColor;
private int mIconColor;
private int mDecorColor;
private float mDozeAmount;
private ValueAnimator mColorAnimator;
private int mCurrentSetColor = NO_COLOR;
private int mAnimationStartColor = NO_COLOR;
private final ValueAnimator.AnimatorUpdateListener mColorUpdater
= animation -> {
int newColor = NotificationUtils.interpolateColors(mAnimationStartColor, mIconColor,
animation.getAnimatedFraction());
setColorInternal(newColor);
};
private final NotificationIconDozeHelper mDozer;
private int mContrastedDrawableColor;
private int mCachedContrastBackgroundColor = NO_COLOR;
private float[] mMatrix;
private ColorMatrixColorFilter mMatrixColorFilter;
private boolean mIsInShelf;
private Runnable mLayoutRunnable;
private boolean mDismissed;
private Runnable mOnDismissListener;
private boolean mIncreasedSize;
private boolean mShowsConversation;
public StatusBarIconView(Context context, String slot, StatusBarNotification sbn) {
this(context, slot, sbn, false);
}
public StatusBarIconView(Context context, String slot, StatusBarNotification sbn,
boolean blocked) {
super(context);
mDozer = new NotificationIconDozeHelper(context);
mBlocked = blocked;
mSlot = slot;
mNumberPain = new Paint();
mNumberPain.setTextAlign(Paint.Align.CENTER);
mNumberPain.setColor(context.getColor(R.drawable.notification_number_text_color));
mNumberPain.setAntiAlias(true);
setNotification(sbn);
setScaleType(ScaleType.CENTER);
mDensity = context.getResources().getDisplayMetrics().densityDpi;
Configuration configuration = context.getResources().getConfiguration();
mNightMode = (configuration.uiMode & Configuration.UI_MODE_NIGHT_MASK)
== Configuration.UI_MODE_NIGHT_YES;
initializeDecorColor();
reloadDimens();
maybeUpdateIconScaleDimens();
}
public StatusBarIconView(Context context, AttributeSet attrs) {
super(context, attrs);
mDozer = new NotificationIconDozeHelper(context);
mBlocked = false;
mAlwaysScaleIcon = true;
reloadDimens();
maybeUpdateIconScaleDimens();
mDensity = context.getResources().getDisplayMetrics().densityDpi;
}
/** Should always be preceded by {@link #reloadDimens()} | StatusBarIconView::maybeUpdateIconScaleDimens | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | MIT |
public boolean set(StatusBarIcon icon) {
final boolean iconEquals = mIcon != null && equalIcons(mIcon.icon, icon.icon);
final boolean levelEquals = iconEquals
&& mIcon.iconLevel == icon.iconLevel;
final boolean visibilityEquals = mIcon != null
&& mIcon.visible == icon.visible;
final boolean numberEquals = mIcon != null
&& mIcon.number == icon.number;
mIcon = icon.clone();
setContentDescription(icon.contentDescription);
if (!iconEquals) {
if (!updateDrawable(false /* no clear */)) return false;
// we have to clear the grayscale tag since it may have changed
setTag(R.id.icon_is_grayscale, null);
// Maybe set scale based on icon height
maybeUpdateIconScaleDimens();
}
if (!levelEquals) {
setImageLevel(icon.iconLevel);
}
if (!numberEquals) {
if (icon.number > 0 && getContext().getResources().getBoolean(
R.bool.config_statusBarShowNumber)) {
if (mNumberBackground == null) {
mNumberBackground = getContext().getResources().getDrawable(
R.drawable.ic_notification_overlay);
}
placeNumber();
} else {
mNumberBackground = null;
mNumberText = null;
}
invalidate();
}
if (!visibilityEquals) {
setVisibility(icon.visible && !mBlocked ? VISIBLE : GONE);
}
return true;
} |
Returns whether the set succeeded.
| StatusBarIconView::set | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | MIT |
public static Drawable getIcon(Context sysuiContext,
Context context, StatusBarIcon statusBarIcon) {
int userId = statusBarIcon.user.getIdentifier();
if (userId == UserHandle.USER_ALL) {
userId = UserHandle.USER_SYSTEM;
}
Drawable icon = statusBarIcon.icon.loadDrawableAsUser(context, userId);
TypedValue typedValue = new TypedValue();
sysuiContext.getResources().getValue(R.dimen.status_bar_icon_scale_factor,
typedValue, true);
float scaleFactor = typedValue.getFloat();
// No need to scale the icon, so return it as is.
if (scaleFactor == 1.f) {
return icon;
}
return new ScalingDrawableWrapper(icon, scaleFactor);
} |
Returns the right icon to use for this item
@param sysuiContext Context to use to get scale factor
@param context Context to use to get resources of notification icon
@return Drawable for this item, or null if the package or item could not
be found
| StatusBarIconView::getIcon | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | MIT |
public void setDecorColor(int iconTint) {
mDecorColor = iconTint;
updateDecorColor();
} |
Set the color that is used to draw decoration like the overflow dot. This will not be applied
to the drawable.
| StatusBarIconView::setDecorColor | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | MIT |
public void setStaticDrawableColor(int color) {
mDrawableColor = color;
setColorInternal(color);
updateContrastedStaticColor();
mIconColor = color;
mDozer.setColor(color);
} |
Set the static color that should be used for the drawable of this icon if it's not
transitioning this also immediately sets the color.
| StatusBarIconView::setStaticDrawableColor | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | MIT |
private static void updateTintMatrix(float[] array, int color, float alphaBoost) {
Arrays.fill(array, 0);
array[4] = Color.red(color);
array[9] = Color.green(color);
array[14] = Color.blue(color);
array[18] = Color.alpha(color) / 255f + alphaBoost;
} |
Updates {@param array} such that it represents a matrix that changes RGB to {@param color}
and multiplies the alpha channel with the color's alpha+{@param alphaBoost}.
| StatusBarIconView::updateTintMatrix | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | MIT |
int getContrastedStaticDrawableColor(int backgroundColor) {
if (mCachedContrastBackgroundColor != backgroundColor) {
mCachedContrastBackgroundColor = backgroundColor;
updateContrastedStaticColor();
}
return mContrastedDrawableColor;
} |
A drawable color that passes GAR on a specific background.
This value is cached.
@param backgroundColor Background to test against.
@return GAR safe version of {@link StatusBarIconView#getStaticDrawableColor()}.
| StatusBarIconView::getContrastedStaticDrawableColor | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | MIT |
public void setVisibleState(int visibleState, boolean animate, Runnable endRunnable,
long duration) {
boolean runnableAdded = false;
if (visibleState != mVisibleState) {
mVisibleState = visibleState;
if (mIconAppearAnimator != null) {
mIconAppearAnimator.cancel();
}
if (mDotAnimator != null) {
mDotAnimator.cancel();
}
if (animate) {
float targetAmount = 0.0f;
Interpolator interpolator = Interpolators.FAST_OUT_LINEAR_IN;
if (visibleState == STATE_ICON) {
targetAmount = 1.0f;
interpolator = Interpolators.LINEAR_OUT_SLOW_IN;
}
float currentAmount = getIconAppearAmount();
if (targetAmount != currentAmount) {
mIconAppearAnimator = ObjectAnimator.ofFloat(this, ICON_APPEAR_AMOUNT,
currentAmount, targetAmount);
mIconAppearAnimator.setInterpolator(interpolator);
mIconAppearAnimator.setDuration(duration == 0 ? ANIMATION_DURATION_FAST
: duration);
mIconAppearAnimator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
mIconAppearAnimator = null;
runRunnable(endRunnable);
}
});
mIconAppearAnimator.start();
runnableAdded = true;
}
targetAmount = visibleState == STATE_ICON ? 2.0f : 0.0f;
interpolator = Interpolators.FAST_OUT_LINEAR_IN;
if (visibleState == STATE_DOT) {
targetAmount = 1.0f;
interpolator = Interpolators.LINEAR_OUT_SLOW_IN;
}
currentAmount = getDotAppearAmount();
if (targetAmount != currentAmount) {
mDotAnimator = ObjectAnimator.ofFloat(this, DOT_APPEAR_AMOUNT,
currentAmount, targetAmount);
mDotAnimator.setInterpolator(interpolator);;
mDotAnimator.setDuration(duration == 0 ? ANIMATION_DURATION_FAST
: duration);
final boolean runRunnable = !runnableAdded;
mDotAnimator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
mDotAnimator = null;
if (runRunnable) {
runRunnable(endRunnable);
}
}
});
mDotAnimator.start();
runnableAdded = true;
}
} else {
setIconAppearAmount(visibleState == STATE_ICON ? 1.0f : 0.0f);
setDotAppearAmount(visibleState == STATE_DOT ? 1.0f
: visibleState == STATE_ICON ? 2.0f
: 0.0f);
}
}
if (!runnableAdded) {
runRunnable(endRunnable);
}
} |
Set the visibleState of this view.
@param visibleState The new state.
@param animate Should we animate?
@param endRunnable The runnable to run at the end.
@param duration The duration of an animation or 0 if the default should be taken.
| StatusBarIconView::setVisibleState | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | MIT |
public void setShowsConversation(boolean showsConversation) {
if (mShowsConversation != showsConversation) {
mShowsConversation = showsConversation;
updateIconColor();
}
} |
Sets whether this icon shows a person and should be tinted.
If the state differs from the supplied setting, this
will update the icon colors.
@param showsConversation Whether the icon shows a person
| StatusBarIconView::setShowsConversation | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | MIT |
public boolean showsConversation() {
return mShowsConversation;
} |
@return if this icon shows a conversation
| StatusBarIconView::showsConversation | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java | MIT |
public InferenceInputParcel(@NonNull InferenceInput value) {
this(
new ModelId.Builder()
.setTableId(value.getParams().getKeyValueStore().getTableId())
.setKey(value.getParams().getModelKey())
.build(),
value.getParams().getDelegateType(),
value.getParams().getRecommendedNumThreads(),
ByteArrayParceledListSlice.create(value.getInputData()),
value.getBatchSize(),
value.getParams().getModelType(),
new InferenceOutputParcel(value.getExpectedOutputStructure()));
} |
The empty InferenceOutput representing the expected output structure. For TFLite, the
inference code will verify whether this expected output structure matches model output
signature.
@NonNull private InferenceOutputParcel mExpectedOutputStructure;
/** @hide | InferenceInputParcel::InferenceInputParcel | java | Reginer/aosp-android-jar | android-35/src/android/adservices/ondevicepersonalization/InferenceInputParcel.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/adservices/ondevicepersonalization/InferenceInputParcel.java | MIT |
public Address(Locale locale) {
mLocale = locale;
} |
Constructs a new Address object set to the given Locale and with all
other fields initialized to null or false.
| Address::Address | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public Locale getLocale() {
return mLocale;
} |
Returns the Locale associated with this address.
| Address::getLocale | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public int getMaxAddressLineIndex() {
return mMaxAddressLineIndex;
} |
Returns the largest index currently in use to specify an address line.
If no address lines are specified, -1 is returned.
| Address::getMaxAddressLineIndex | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getAddressLine(int index) {
if (index < 0) {
throw new IllegalArgumentException("index = " + index + " < 0");
}
return mAddressLines == null? null : mAddressLines.get(index);
} |
Returns a line of the address numbered by the given index
(starting at 0), or null if no such line is present.
@throws IllegalArgumentException if index < 0
| Address::getAddressLine | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setAddressLine(int index, String line) {
if (index < 0) {
throw new IllegalArgumentException("index = " + index + " < 0");
}
if (mAddressLines == null) {
mAddressLines = new HashMap<Integer, String>();
}
mAddressLines.put(index, line);
if (line == null) {
// We've eliminated a line, recompute the max index
mMaxAddressLineIndex = -1;
for (Integer i : mAddressLines.keySet()) {
mMaxAddressLineIndex = Math.max(mMaxAddressLineIndex, i);
}
} else {
mMaxAddressLineIndex = Math.max(mMaxAddressLineIndex, index);
}
} |
Sets the line of the address numbered by index (starting at 0) to the
given String, which may be null.
@throws IllegalArgumentException if index < 0
| Address::setAddressLine | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getFeatureName() {
return mFeatureName;
} |
Returns the feature name of the address, for example, "Golden Gate Bridge", or null
if it is unknown
| Address::getFeatureName | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setFeatureName(String featureName) {
mFeatureName = featureName;
} |
Sets the feature name of the address to the given String, which may be null
| Address::setFeatureName | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getAdminArea() {
return mAdminArea;
} |
Returns the administrative area name of the address, for example, "CA", or null if
it is unknown
| Address::getAdminArea | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setAdminArea(String adminArea) {
this.mAdminArea = adminArea;
} |
Sets the administrative area name of the address to the given String, which may be null
| Address::setAdminArea | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getSubAdminArea() {
return mSubAdminArea;
} |
Returns the sub-administrative area name of the address, for example, "Santa Clara County",
or null if it is unknown
| Address::getSubAdminArea | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setSubAdminArea(String subAdminArea) {
this.mSubAdminArea = subAdminArea;
} |
Sets the sub-administrative area name of the address to the given String, which may be null
| Address::setSubAdminArea | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getLocality() {
return mLocality;
} |
Returns the locality of the address, for example "Mountain View", or null if it is unknown.
| Address::getLocality | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setLocality(String locality) {
mLocality = locality;
} |
Sets the locality of the address to the given String, which may be null.
| Address::setLocality | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getSubLocality() {
return mSubLocality;
} |
Returns the sub-locality of the address, or null if it is unknown.
For example, this may correspond to the neighborhood of the locality.
| Address::getSubLocality | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setSubLocality(String sublocality) {
mSubLocality = sublocality;
} |
Sets the sub-locality of the address to the given String, which may be null.
| Address::setSubLocality | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getThoroughfare() {
return mThoroughfare;
} |
Returns the thoroughfare name of the address, for example, "1600 Ampitheater Parkway",
which may be null
| Address::getThoroughfare | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setThoroughfare(String thoroughfare) {
this.mThoroughfare = thoroughfare;
} |
Sets the thoroughfare name of the address, which may be null.
| Address::setThoroughfare | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getSubThoroughfare() {
return mSubThoroughfare;
} |
Returns the sub-thoroughfare name of the address, which may be null.
This may correspond to the street number of the address.
| Address::getSubThoroughfare | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setSubThoroughfare(String subthoroughfare) {
this.mSubThoroughfare = subthoroughfare;
} |
Sets the sub-thoroughfare name of the address, which may be null.
| Address::setSubThoroughfare | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getPremises() {
return mPremises;
} |
Returns the premises of the address, or null if it is unknown.
| Address::getPremises | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setPremises(String premises) {
mPremises = premises;
} |
Sets the premises of the address to the given String, which may be null.
| Address::setPremises | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getPostalCode() {
return mPostalCode;
} |
Returns the postal code of the address, for example "94110",
or null if it is unknown.
| Address::getPostalCode | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setPostalCode(String postalCode) {
mPostalCode = postalCode;
} |
Sets the postal code of the address to the given String, which may
be null.
| Address::setPostalCode | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getCountryCode() {
return mCountryCode;
} |
Returns the country code of the address, for example "US",
or null if it is unknown.
| Address::getCountryCode | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setCountryCode(String countryCode) {
mCountryCode = countryCode;
} |
Sets the country code of the address to the given String, which may
be null.
| Address::setCountryCode | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getCountryName() {
return mCountryName;
} |
Returns the localized country name of the address, for example "Iceland",
or null if it is unknown.
| Address::getCountryName | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setCountryName(String countryName) {
mCountryName = countryName;
} |
Sets the country name of the address to the given String, which may
be null.
| Address::setCountryName | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public boolean hasLatitude() {
return mHasLatitude;
} |
Returns true if a latitude has been assigned to this Address,
false otherwise.
| Address::hasLatitude | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public double getLatitude() {
if (mHasLatitude) {
return mLatitude;
} else {
throw new IllegalStateException();
}
} |
Returns the latitude of the address if known.
@throws IllegalStateException if this Address has not been assigned
a latitude.
| Address::getLatitude | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setLatitude(double latitude) {
mLatitude = latitude;
mHasLatitude = true;
} |
Sets the latitude associated with this address.
| Address::setLatitude | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void clearLatitude() {
mHasLatitude = false;
} |
Removes any latitude associated with this address.
| Address::clearLatitude | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public boolean hasLongitude() {
return mHasLongitude;
} |
Returns true if a longitude has been assigned to this Address,
false otherwise.
| Address::hasLongitude | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public double getLongitude() {
if (mHasLongitude) {
return mLongitude;
} else {
throw new IllegalStateException();
}
} |
Returns the longitude of the address if known.
@throws IllegalStateException if this Address has not been assigned
a longitude.
| Address::getLongitude | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setLongitude(double longitude) {
mLongitude = longitude;
mHasLongitude = true;
} |
Sets the longitude associated with this address.
| Address::setLongitude | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void clearLongitude() {
mHasLongitude = false;
} |
Removes any longitude associated with this address.
| Address::clearLongitude | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getPhone() {
return mPhone;
} |
Returns the phone number of the address if known,
or null if it is unknown.
@throws IllegalStateException if this Address has not been assigned
a phone number.
| Address::getPhone | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setPhone(String phone) {
mPhone = phone;
} |
Sets the phone number associated with this address.
| Address::setPhone | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public String getUrl() {
return mUrl;
} |
Returns the public URL for the address if known,
or null if it is unknown.
| Address::getUrl | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setUrl(String Url) {
mUrl = Url;
} |
Sets the public URL associated with this address.
| Address::setUrl | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public Bundle getExtras() {
return mExtras;
} |
Returns additional provider-specific information about the
address as a Bundle. The keys and values are determined
by the provider. If no additional information is available,
null is returned.
<!--
<p> A number of common key/value pairs are listed
below. Providers that use any of the keys on this list must
provide the corresponding value as described below.
<ul>
</ul>
-->
| Address::getExtras | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
public void setExtras(Bundle extras) {
mExtras = (extras == null) ? null : new Bundle(extras);
} |
Sets the extra information associated with this fix to the
given Bundle.
| Address::setExtras | java | Reginer/aosp-android-jar | android-33/src/android/location/Address.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java | MIT |
default void init() {
// Do nothing
} |
Initializes all the SysUI components.
| DependencyProvider::init | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/dagger/SysUIComponent.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/dagger/SysUIComponent.java | MIT |
public void copyFrom(BrightnessEvent that) {
mReason.set(that.getReason());
mDisplayId = that.getDisplayId();
mPhysicalDisplayId = that.getPhysicalDisplayId();
mTime = that.getTime();
// Lux values
mLux = that.getLux();
mPreThresholdLux = that.getPreThresholdLux();
// Brightness values
mInitialBrightness = that.getInitialBrightness();
mBrightness = that.getBrightness();
mRecommendedBrightness = that.getRecommendedBrightness();
mPreThresholdBrightness = that.getPreThresholdBrightness();
// Different brightness modulations
mHbmMode = that.getHbmMode();
mHbmMax = that.getHbmMax();
mRbcStrength = that.getRbcStrength();
mThermalMax = that.getThermalMax();
mPowerFactor = that.getPowerFactor();
mWasShortTermModelActive = that.wasShortTermModelActive();
mFlags = that.getFlags();
mAdjustmentFlags = that.getAdjustmentFlags();
// Auto-brightness setting
mAutomaticBrightnessEnabled = that.isAutomaticBrightnessEnabled();
mDisplayBrightnessStrategyName = that.getDisplayBrightnessStrategyName();
} |
A utility to clone a brightness event into another event
@param that BrightnessEvent which is to be copied
| BrightnessEvent::copyFrom | java | Reginer/aosp-android-jar | android-34/src/com/android/server/display/brightness/BrightnessEvent.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/brightness/BrightnessEvent.java | MIT |
public void reset() {
mReason = new BrightnessReason();
mTime = SystemClock.uptimeMillis();
mPhysicalDisplayId = "";
// Lux values
mLux = 0;
mPreThresholdLux = 0;
// Brightness values
mInitialBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
mBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
mRecommendedBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
mPreThresholdBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
// Different brightness modulations
mHbmMode = BrightnessInfo.HIGH_BRIGHTNESS_MODE_OFF;
mHbmMax = PowerManager.BRIGHTNESS_MAX;
mRbcStrength = 0;
mThermalMax = PowerManager.BRIGHTNESS_MAX;
mPowerFactor = 1f;
mWasShortTermModelActive = false;
mFlags = 0;
mAdjustmentFlags = 0;
// Auto-brightness setting
mAutomaticBrightnessEnabled = true;
mDisplayBrightnessStrategyName = "";
} |
A utility to reset the BrightnessEvent to default values
| BrightnessEvent::reset | java | Reginer/aosp-android-jar | android-34/src/com/android/server/display/brightness/BrightnessEvent.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/brightness/BrightnessEvent.java | MIT |
public boolean equalsMainData(BrightnessEvent that) {
// This equals comparison purposefully ignores time since it is regularly changing and
// we don't want to log a brightness event just because the time changed.
return mReason.equals(that.mReason)
&& mDisplayId == that.mDisplayId
&& mPhysicalDisplayId.equals(that.mPhysicalDisplayId)
&& Float.floatToRawIntBits(mLux) == Float.floatToRawIntBits(that.mLux)
&& Float.floatToRawIntBits(mPreThresholdLux)
== Float.floatToRawIntBits(that.mPreThresholdLux)
&& Float.floatToRawIntBits(mBrightness)
== Float.floatToRawIntBits(that.mBrightness)
&& Float.floatToRawIntBits(mRecommendedBrightness)
== Float.floatToRawIntBits(that.mRecommendedBrightness)
&& Float.floatToRawIntBits(mPreThresholdBrightness)
== Float.floatToRawIntBits(that.mPreThresholdBrightness)
&& mHbmMode == that.mHbmMode
&& Float.floatToRawIntBits(mHbmMax) == Float.floatToRawIntBits(that.mHbmMax)
&& mRbcStrength == that.mRbcStrength
&& Float.floatToRawIntBits(mThermalMax)
== Float.floatToRawIntBits(that.mThermalMax)
&& Float.floatToRawIntBits(mPowerFactor)
== Float.floatToRawIntBits(that.mPowerFactor)
&& mWasShortTermModelActive == that.mWasShortTermModelActive
&& mFlags == that.mFlags
&& mAdjustmentFlags == that.mAdjustmentFlags
&& mAutomaticBrightnessEnabled == that.mAutomaticBrightnessEnabled
&& mDisplayBrightnessStrategyName.equals(that.mDisplayBrightnessStrategyName);
} |
A utility to compare two BrightnessEvents. This purposefully ignores comparing time as the
two events might have been created at different times, but essentially hold the same
underlying values
@param that The brightnessEvent with which the current brightnessEvent is to be compared
@return A boolean value representing if the two events are same or not.
| BrightnessEvent::equalsMainData | java | Reginer/aosp-android-jar | android-34/src/com/android/server/display/brightness/BrightnessEvent.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/brightness/BrightnessEvent.java | MIT |
public String toString(boolean includeTime) {
return (includeTime ? TimeUtils.formatForLogging(mTime) + " - " : "")
+ "BrightnessEvent: "
+ "disp=" + mDisplayId
+ ", physDisp=" + mPhysicalDisplayId
+ ", brt=" + mBrightness + ((mFlags & FLAG_USER_SET) != 0 ? "(user_set)" : "")
+ ", initBrt=" + mInitialBrightness
+ ", rcmdBrt=" + mRecommendedBrightness
+ ", preBrt=" + mPreThresholdBrightness
+ ", lux=" + mLux
+ ", preLux=" + mPreThresholdLux
+ ", hbmMax=" + mHbmMax
+ ", hbmMode=" + BrightnessInfo.hbmToString(mHbmMode)
+ ", rbcStrength=" + mRbcStrength
+ ", thrmMax=" + mThermalMax
+ ", powerFactor=" + mPowerFactor
+ ", wasShortTermModelActive=" + mWasShortTermModelActive
+ ", flags=" + flagsToString()
+ ", reason=" + mReason.toString(mAdjustmentFlags)
+ ", autoBrightness=" + mAutomaticBrightnessEnabled
+ ", strategy=" + mDisplayBrightnessStrategyName;
} |
A utility to stringify a BrightnessEvent
@param includeTime Indicates if the time field is to be added in the stringify version of the
BrightnessEvent
@return A stringified BrightnessEvent
| BrightnessEvent::toString | java | Reginer/aosp-android-jar | android-34/src/com/android/server/display/brightness/BrightnessEvent.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/brightness/BrightnessEvent.java | MIT |
public boolean setWasShortTermModelActive(boolean wasShortTermModelActive) {
return this.mWasShortTermModelActive = wasShortTermModelActive;
} |
Set whether the short term model was active before the brightness event.
| BrightnessEvent::setWasShortTermModelActive | java | Reginer/aosp-android-jar | android-34/src/com/android/server/display/brightness/BrightnessEvent.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/brightness/BrightnessEvent.java | MIT |
public boolean wasShortTermModelActive() {
return this.mWasShortTermModelActive;
} |
Returns whether the short term model was active before the brightness event.
| BrightnessEvent::wasShortTermModelActive | java | Reginer/aosp-android-jar | android-34/src/com/android/server/display/brightness/BrightnessEvent.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/brightness/BrightnessEvent.java | MIT |
public UsbPortStatus(int currentMode, int currentPowerRole, int currentDataRole,
int supportedRoleCombinations, int contaminantProtectionStatus,
int contaminantDetectionStatus) {
mCurrentMode = currentMode;
mCurrentPowerRole = currentPowerRole;
mCurrentDataRole = currentDataRole;
mSupportedRoleCombinations = supportedRoleCombinations;
mContaminantProtectionStatus = contaminantProtectionStatus;
mContaminantDetectionStatus = contaminantDetectionStatus;
} |
Contaminant protection - Port is disabled upon detection of
contaminant presence.
@hide
public static final int CONTAMINANT_PROTECTION_DISABLED =
android.hardware.usb.V1_2.Constants.ContaminantProtectionStatus.DISABLED;
@IntDef(prefix = { "CONTAMINANT_DETECTION_" }, value = {
CONTAMINANT_DETECTION_NOT_SUPPORTED,
CONTAMINANT_DETECTION_DISABLED,
CONTAMINANT_DETECTION_NOT_DETECTED,
CONTAMINANT_DETECTION_DETECTED,
})
@Retention(RetentionPolicy.SOURCE)
@interface ContaminantDetectionStatus{}
@IntDef(prefix = { "CONTAMINANT_PROTECTION_" }, flag = true, value = {
CONTAMINANT_PROTECTION_NONE,
CONTAMINANT_PROTECTION_SINK,
CONTAMINANT_PROTECTION_SOURCE,
CONTAMINANT_PROTECTION_FORCE_DISABLE,
CONTAMINANT_PROTECTION_DISABLED,
})
@Retention(RetentionPolicy.SOURCE)
@interface ContaminantProtectionStatus{}
@IntDef(prefix = { "MODE_" }, value = {
MODE_NONE,
MODE_DFP,
MODE_UFP,
MODE_AUDIO_ACCESSORY,
MODE_DEBUG_ACCESSORY,
})
@Retention(RetentionPolicy.SOURCE)
@interface UsbPortMode{}
/** @hide | UsbPortStatus::UsbPortStatus | java | Reginer/aosp-android-jar | android-31/src/android/hardware/usb/UsbPortStatus.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/usb/UsbPortStatus.java | MIT |
public boolean isConnected() {
return mCurrentMode != 0;
} |
Returns true if there is anything connected to the port.
@return {@code true} iff there is anything connected to the port.
| UsbPortStatus::isConnected | java | Reginer/aosp-android-jar | android-31/src/android/hardware/usb/UsbPortStatus.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/usb/UsbPortStatus.java | MIT |
public @UsbPortMode int getCurrentMode() {
return mCurrentMode;
} |
Gets the current mode of the port.
@return The current mode: {@link #MODE_DFP}, {@link #MODE_UFP},
{@link #MODE_AUDIO_ACCESSORY}, {@link #MODE_DEBUG_ACCESSORY}, or {@link {@link #MODE_NONE} if
nothing is connected.
| UsbPortStatus::getCurrentMode | java | Reginer/aosp-android-jar | android-31/src/android/hardware/usb/UsbPortStatus.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/usb/UsbPortStatus.java | MIT |
public @UsbPowerRole int getCurrentPowerRole() {
return mCurrentPowerRole;
} |
Gets the current power role of the port.
@return The current power role: {@link #POWER_ROLE_SOURCE}, {@link #POWER_ROLE_SINK}, or
{@link #POWER_ROLE_NONE} if nothing is connected.
| UsbPortStatus::getCurrentPowerRole | java | Reginer/aosp-android-jar | android-31/src/android/hardware/usb/UsbPortStatus.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/usb/UsbPortStatus.java | MIT |
public @UsbDataRole int getCurrentDataRole() {
return mCurrentDataRole;
} |
Gets the current data role of the port.
@return The current data role: {@link #DATA_ROLE_HOST}, {@link #DATA_ROLE_DEVICE}, or
{@link #DATA_ROLE_NONE} if nothing is connected.
| UsbPortStatus::getCurrentDataRole | java | Reginer/aosp-android-jar | android-31/src/android/hardware/usb/UsbPortStatus.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/usb/UsbPortStatus.java | MIT |
public boolean isRoleCombinationSupported(@UsbPowerRole int powerRole,
@UsbDataRole int dataRole) {
return (mSupportedRoleCombinations &
UsbPort.combineRolesAsBit(powerRole, dataRole)) != 0;
} |
Returns true if the specified power and data role combination is supported
given what is currently connected to the port.
@param powerRole The power role to check: {@link #POWER_ROLE_SOURCE} or
{@link #POWER_ROLE_SINK}, or {@link #POWER_ROLE_NONE} if no power role.
@param dataRole The data role to check: either {@link #DATA_ROLE_HOST} or
{@link #DATA_ROLE_DEVICE}, or {@link #DATA_ROLE_NONE} if no data role.
| UsbPortStatus::isRoleCombinationSupported | java | Reginer/aosp-android-jar | android-31/src/android/hardware/usb/UsbPortStatus.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/usb/UsbPortStatus.java | MIT |
public int getSupportedRoleCombinations() {
return mSupportedRoleCombinations;
} |
Get the supported role combinations.
| UsbPortStatus::getSupportedRoleCombinations | java | Reginer/aosp-android-jar | android-31/src/android/hardware/usb/UsbPortStatus.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/usb/UsbPortStatus.java | MIT |
public @ContaminantDetectionStatus int getContaminantDetectionStatus() {
return mContaminantDetectionStatus;
} |
Returns contaminant detection status.
@hide
| UsbPortStatus::getContaminantDetectionStatus | java | Reginer/aosp-android-jar | android-31/src/android/hardware/usb/UsbPortStatus.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/usb/UsbPortStatus.java | MIT |
public @ContaminantProtectionStatus int getContaminantProtectionStatus() {
return mContaminantProtectionStatus;
} |
Returns contamiant protection status.
@hide
| UsbPortStatus::getContaminantProtectionStatus | java | Reginer/aosp-android-jar | android-31/src/android/hardware/usb/UsbPortStatus.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/usb/UsbPortStatus.java | MIT |
public void addProvider(@NonNull ResourcesProvider resourcesProvider) {
synchronized (mLock) {
mProviders = ArrayUtils.appendElement(ResourcesProvider.class, mProviders,
resourcesProvider);
notifyProvidersChangedLocked();
}
} |
Appends a provider to the end of the provider list. If the provider is already present in the
loader list, the list will not be modified.
<p>This should only be called from the UI thread to avoid lock contention when propagating
provider changes.
@param resourcesProvider the provider to add
| ResourcesLoader::addProvider | java | Reginer/aosp-android-jar | android-32/src/android/content/res/loader/ResourcesLoader.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/content/res/loader/ResourcesLoader.java | MIT |
public static TestSuite suite() throws Exception {
Class testClass = ClassLoader.getSystemClassLoader().loadClass(
"org.w3c.domts.level3.validation.alltests");
Constructor testConstructor = testClass
.getConstructor(new Class[]{DOMTestDocumentBuilderFactory.class});
DOMTestDocumentBuilderFactory factory = new BatikTestDocumentBuilderFactory(
new DocumentBuilderSetting[0]);
Object test = testConstructor.newInstance(new Object[]{factory});
return new JUnitTestSuiteAdapter((DOMTestSuite) test);
} |
Factory method for suite.
@return suite
@throws Exception if Batik is not available or could not be instantiated
| TestBatik::suite | java | Reginer/aosp-android-jar | android-32/src/org/w3c/domts/level3/validation/TestBatik.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/level3/validation/TestBatik.java | MIT |
public boolean getDeletionPropagation() {
return mDeletionPropagation;
} |
Class to hold property configuration for one property defined in {@link AppSearchSchema}.
<p>It is defined as same as PropertyConfigProto for the native code to handle different property
types in one class.
<p>Currently it can handle String, long, double, boolean, bytes and document type.
@hide
@SafeParcelable.Class(creator = "PropertyConfigParcelCreator")
public final class PropertyConfigParcel extends AbstractSafeParcelable {
@NonNull
public static final Parcelable.Creator<PropertyConfigParcel> CREATOR =
new PropertyConfigParcelCreator();
@Field(id = 1, getter = "getName")
private final String mName;
@AppSearchSchema.PropertyConfig.DataType
@Field(id = 2, getter = "getDataType")
private final int mDataType;
@AppSearchSchema.PropertyConfig.Cardinality
@Field(id = 3, getter = "getCardinality")
private final int mCardinality;
@Field(id = 4, getter = "getSchemaType")
@Nullable
private final String mSchemaType;
@Field(id = 5, getter = "getStringIndexingConfigParcel")
@Nullable
private final StringIndexingConfigParcel mStringIndexingConfigParcel;
@Field(id = 6, getter = "getDocumentIndexingConfigParcel")
@Nullable
private final DocumentIndexingConfigParcel mDocumentIndexingConfigParcel;
@Field(id = 7, getter = "getIntegerIndexingConfigParcel")
@Nullable
private final IntegerIndexingConfigParcel mIntegerIndexingConfigParcel;
@Field(id = 8, getter = "getJoinableConfigParcel")
@Nullable
private final JoinableConfigParcel mJoinableConfigParcel;
@Field(id = 9, getter = "getDescription")
private final String mDescription;
@Nullable private Integer mHashCode;
/** Constructor for {@link PropertyConfigParcel}.
@Constructor
PropertyConfigParcel(
@Param(id = 1) @NonNull String name,
@Param(id = 2) @DataType int dataType,
@Param(id = 3) @Cardinality int cardinality,
@Param(id = 4) @Nullable String schemaType,
@Param(id = 5) @Nullable StringIndexingConfigParcel stringIndexingConfigParcel,
@Param(id = 6) @Nullable DocumentIndexingConfigParcel documentIndexingConfigParcel,
@Param(id = 7) @Nullable IntegerIndexingConfigParcel integerIndexingConfigParcel,
@Param(id = 8) @Nullable JoinableConfigParcel joinableConfigParcel,
@Param(id = 9) @NonNull String description) {
mName = Objects.requireNonNull(name);
mDataType = dataType;
mCardinality = cardinality;
mSchemaType = schemaType;
mStringIndexingConfigParcel = stringIndexingConfigParcel;
mDocumentIndexingConfigParcel = documentIndexingConfigParcel;
mIntegerIndexingConfigParcel = integerIndexingConfigParcel;
mJoinableConfigParcel = joinableConfigParcel;
mDescription = Objects.requireNonNull(description);
}
/** Creates a {@link PropertyConfigParcel} for String.
@NonNull
public static PropertyConfigParcel createForString(
@NonNull String propertyName,
@NonNull String description,
@Cardinality int cardinality,
@NonNull StringIndexingConfigParcel stringIndexingConfigParcel,
@NonNull JoinableConfigParcel joinableConfigParcel) {
return new PropertyConfigParcel(
Objects.requireNonNull(propertyName),
AppSearchSchema.PropertyConfig.DATA_TYPE_STRING,
cardinality,
/* schemaType= */ null,
Objects.requireNonNull(stringIndexingConfigParcel),
/* documentIndexingConfigParcel= */ null,
/* integerIndexingConfigParcel= */ null,
Objects.requireNonNull(joinableConfigParcel),
Objects.requireNonNull(description));
}
/** Creates a {@link PropertyConfigParcel} for Long.
@NonNull
public static PropertyConfigParcel createForLong(
@NonNull String propertyName,
@NonNull String description,
@Cardinality int cardinality,
@AppSearchSchema.LongPropertyConfig.IndexingType int indexingType) {
return new PropertyConfigParcel(
Objects.requireNonNull(propertyName),
AppSearchSchema.PropertyConfig.DATA_TYPE_LONG,
cardinality,
/* schemaType= */ null,
/* stringIndexingConfigParcel= */ null,
/* documentIndexingConfigParcel= */ null,
new IntegerIndexingConfigParcel(indexingType),
/* joinableConfigParcel= */ null,
Objects.requireNonNull(description));
}
/** Creates a {@link PropertyConfigParcel} for Double.
@NonNull
public static PropertyConfigParcel createForDouble(
@NonNull String propertyName,
@NonNull String description,
@Cardinality int cardinality) {
return new PropertyConfigParcel(
Objects.requireNonNull(propertyName),
AppSearchSchema.PropertyConfig.DATA_TYPE_DOUBLE,
cardinality,
/* schemaType= */ null,
/* stringIndexingConfigParcel= */ null,
/* documentIndexingConfigParcel= */ null,
/* integerIndexingConfigParcel= */ null,
/* joinableConfigParcel= */ null,
Objects.requireNonNull(description));
}
/** Creates a {@link PropertyConfigParcel} for Boolean.
@NonNull
public static PropertyConfigParcel createForBoolean(
@NonNull String propertyName,
@NonNull String description,
@Cardinality int cardinality) {
return new PropertyConfigParcel(
Objects.requireNonNull(propertyName),
AppSearchSchema.PropertyConfig.DATA_TYPE_BOOLEAN,
cardinality,
/* schemaType= */ null,
/* stringIndexingConfigParcel= */ null,
/* documentIndexingConfigParcel= */ null,
/* integerIndexingConfigParcel= */ null,
/* joinableConfigParcel= */ null,
Objects.requireNonNull(description));
}
/** Creates a {@link PropertyConfigParcel} for Bytes.
@NonNull
public static PropertyConfigParcel createForBytes(
@NonNull String propertyName,
@NonNull String description,
@Cardinality int cardinality) {
return new PropertyConfigParcel(
Objects.requireNonNull(propertyName),
AppSearchSchema.PropertyConfig.DATA_TYPE_BYTES,
cardinality,
/* schemaType= */ null,
/* stringIndexingConfigParcel= */ null,
/* documentIndexingConfigParcel= */ null,
/* integerIndexingConfigParcel= */ null,
/* joinableConfigParcel= */ null,
Objects.requireNonNull(description));
}
/** Creates a {@link PropertyConfigParcel} for Document.
@NonNull
public static PropertyConfigParcel createForDocument(
@NonNull String propertyName,
@NonNull String description,
@Cardinality int cardinality,
@NonNull String schemaType,
@NonNull DocumentIndexingConfigParcel documentIndexingConfigParcel) {
return new PropertyConfigParcel(
Objects.requireNonNull(propertyName),
AppSearchSchema.PropertyConfig.DATA_TYPE_DOCUMENT,
cardinality,
Objects.requireNonNull(schemaType),
/* stringIndexingConfigParcel= */ null,
Objects.requireNonNull(documentIndexingConfigParcel),
/* integerIndexingConfigParcel= */ null,
/* joinableConfigParcel= */ null,
Objects.requireNonNull(description));
}
/** Gets name for the property.
@NonNull
public String getName() {
return mName;
}
/** Gets description for the property.
@NonNull
public String getDescription() {
return mDescription;
}
/** Gets data type for the property.
@DataType
public int getDataType() {
return mDataType;
}
/** Gets cardinality for the property.
@Cardinality
public int getCardinality() {
return mCardinality;
}
/** Gets schema type.
@Nullable
public String getSchemaType() {
return mSchemaType;
}
/** Gets the {@link StringIndexingConfigParcel}.
@Nullable
public StringIndexingConfigParcel getStringIndexingConfigParcel() {
return mStringIndexingConfigParcel;
}
/** Gets the {@link DocumentIndexingConfigParcel}.
@Nullable
public DocumentIndexingConfigParcel getDocumentIndexingConfigParcel() {
return mDocumentIndexingConfigParcel;
}
/** Gets the {@link IntegerIndexingConfigParcel}.
@Nullable
public IntegerIndexingConfigParcel getIntegerIndexingConfigParcel() {
return mIntegerIndexingConfigParcel;
}
/** Gets the {@link JoinableConfigParcel}.
@Nullable
public JoinableConfigParcel getJoinableConfigParcel() {
return mJoinableConfigParcel;
}
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
PropertyConfigParcelCreator.writeToParcel(this, dest, flags);
}
@Override
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}
if (!(other instanceof PropertyConfigParcel)) {
return false;
}
PropertyConfigParcel otherProperty = (PropertyConfigParcel) other;
return Objects.equals(mName, otherProperty.mName)
&& Objects.equals(mDescription, otherProperty.mDescription)
&& Objects.equals(mDataType, otherProperty.mDataType)
&& Objects.equals(mCardinality, otherProperty.mCardinality)
&& Objects.equals(mSchemaType, otherProperty.mSchemaType)
&& Objects.equals(
mStringIndexingConfigParcel, otherProperty.mStringIndexingConfigParcel)
&& Objects.equals(
mDocumentIndexingConfigParcel, otherProperty.mDocumentIndexingConfigParcel)
&& Objects.equals(
mIntegerIndexingConfigParcel, otherProperty.mIntegerIndexingConfigParcel)
&& Objects.equals(mJoinableConfigParcel, otherProperty.mJoinableConfigParcel);
}
@Override
public int hashCode() {
if (mHashCode == null) {
mHashCode =
Objects.hash(
mName,
mDescription,
mDataType,
mCardinality,
mSchemaType,
mStringIndexingConfigParcel,
mDocumentIndexingConfigParcel,
mIntegerIndexingConfigParcel,
mJoinableConfigParcel);
}
return mHashCode;
}
@Override
@NonNull
public String toString() {
return "{name: "
+ mName
+ ", description: "
+ mDescription
+ ", dataType: "
+ mDataType
+ ", cardinality: "
+ mCardinality
+ ", schemaType: "
+ mSchemaType
+ ", stringIndexingConfigParcel: "
+ mStringIndexingConfigParcel
+ ", documentIndexingConfigParcel: "
+ mDocumentIndexingConfigParcel
+ ", integerIndexingConfigParcel: "
+ mIntegerIndexingConfigParcel
+ ", joinableConfigParcel: "
+ mJoinableConfigParcel
+ "}";
}
/** Class to hold join configuration for a String type.
@SafeParcelable.Class(creator = "JoinableConfigParcelCreator")
public static class JoinableConfigParcel extends AbstractSafeParcelable {
@NonNull
public static final Parcelable.Creator<JoinableConfigParcel> CREATOR =
new JoinableConfigParcelCreator();
@JoinableValueType
@Field(id = 1, getter = "getJoinableValueType")
private final int mJoinableValueType;
@Field(id = 2, getter = "getDeletionPropagation")
private final boolean mDeletionPropagation;
/** Constructor for {@link JoinableConfigParcel}.
@Constructor
public JoinableConfigParcel(
@Param(id = 1) @JoinableValueType int joinableValueType,
@Param(id = 2) boolean deletionPropagation) {
mJoinableValueType = joinableValueType;
mDeletionPropagation = deletionPropagation;
}
/** Gets {@link JoinableValueType} of the join.
@JoinableValueType
public int getJoinableValueType() {
return mJoinableValueType;
}
/** Gets whether delete will be propagated. | JoinableConfigParcel::getDeletionPropagation | java | Reginer/aosp-android-jar | android-35/src/android/app/appsearch/safeparcel/PropertyConfigParcel.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/app/appsearch/safeparcel/PropertyConfigParcel.java | MIT |
public boolean shouldIndexNestedProperties() {
return mIndexNestedProperties;
} |
Class to hold property configuration for one property defined in {@link AppSearchSchema}.
<p>It is defined as same as PropertyConfigProto for the native code to handle different property
types in one class.
<p>Currently it can handle String, long, double, boolean, bytes and document type.
@hide
@SafeParcelable.Class(creator = "PropertyConfigParcelCreator")
public final class PropertyConfigParcel extends AbstractSafeParcelable {
@NonNull
public static final Parcelable.Creator<PropertyConfigParcel> CREATOR =
new PropertyConfigParcelCreator();
@Field(id = 1, getter = "getName")
private final String mName;
@AppSearchSchema.PropertyConfig.DataType
@Field(id = 2, getter = "getDataType")
private final int mDataType;
@AppSearchSchema.PropertyConfig.Cardinality
@Field(id = 3, getter = "getCardinality")
private final int mCardinality;
@Field(id = 4, getter = "getSchemaType")
@Nullable
private final String mSchemaType;
@Field(id = 5, getter = "getStringIndexingConfigParcel")
@Nullable
private final StringIndexingConfigParcel mStringIndexingConfigParcel;
@Field(id = 6, getter = "getDocumentIndexingConfigParcel")
@Nullable
private final DocumentIndexingConfigParcel mDocumentIndexingConfigParcel;
@Field(id = 7, getter = "getIntegerIndexingConfigParcel")
@Nullable
private final IntegerIndexingConfigParcel mIntegerIndexingConfigParcel;
@Field(id = 8, getter = "getJoinableConfigParcel")
@Nullable
private final JoinableConfigParcel mJoinableConfigParcel;
@Field(id = 9, getter = "getDescription")
private final String mDescription;
@Nullable private Integer mHashCode;
/** Constructor for {@link PropertyConfigParcel}.
@Constructor
PropertyConfigParcel(
@Param(id = 1) @NonNull String name,
@Param(id = 2) @DataType int dataType,
@Param(id = 3) @Cardinality int cardinality,
@Param(id = 4) @Nullable String schemaType,
@Param(id = 5) @Nullable StringIndexingConfigParcel stringIndexingConfigParcel,
@Param(id = 6) @Nullable DocumentIndexingConfigParcel documentIndexingConfigParcel,
@Param(id = 7) @Nullable IntegerIndexingConfigParcel integerIndexingConfigParcel,
@Param(id = 8) @Nullable JoinableConfigParcel joinableConfigParcel,
@Param(id = 9) @NonNull String description) {
mName = Objects.requireNonNull(name);
mDataType = dataType;
mCardinality = cardinality;
mSchemaType = schemaType;
mStringIndexingConfigParcel = stringIndexingConfigParcel;
mDocumentIndexingConfigParcel = documentIndexingConfigParcel;
mIntegerIndexingConfigParcel = integerIndexingConfigParcel;
mJoinableConfigParcel = joinableConfigParcel;
mDescription = Objects.requireNonNull(description);
}
/** Creates a {@link PropertyConfigParcel} for String.
@NonNull
public static PropertyConfigParcel createForString(
@NonNull String propertyName,
@NonNull String description,
@Cardinality int cardinality,
@NonNull StringIndexingConfigParcel stringIndexingConfigParcel,
@NonNull JoinableConfigParcel joinableConfigParcel) {
return new PropertyConfigParcel(
Objects.requireNonNull(propertyName),
AppSearchSchema.PropertyConfig.DATA_TYPE_STRING,
cardinality,
/* schemaType= */ null,
Objects.requireNonNull(stringIndexingConfigParcel),
/* documentIndexingConfigParcel= */ null,
/* integerIndexingConfigParcel= */ null,
Objects.requireNonNull(joinableConfigParcel),
Objects.requireNonNull(description));
}
/** Creates a {@link PropertyConfigParcel} for Long.
@NonNull
public static PropertyConfigParcel createForLong(
@NonNull String propertyName,
@NonNull String description,
@Cardinality int cardinality,
@AppSearchSchema.LongPropertyConfig.IndexingType int indexingType) {
return new PropertyConfigParcel(
Objects.requireNonNull(propertyName),
AppSearchSchema.PropertyConfig.DATA_TYPE_LONG,
cardinality,
/* schemaType= */ null,
/* stringIndexingConfigParcel= */ null,
/* documentIndexingConfigParcel= */ null,
new IntegerIndexingConfigParcel(indexingType),
/* joinableConfigParcel= */ null,
Objects.requireNonNull(description));
}
/** Creates a {@link PropertyConfigParcel} for Double.
@NonNull
public static PropertyConfigParcel createForDouble(
@NonNull String propertyName,
@NonNull String description,
@Cardinality int cardinality) {
return new PropertyConfigParcel(
Objects.requireNonNull(propertyName),
AppSearchSchema.PropertyConfig.DATA_TYPE_DOUBLE,
cardinality,
/* schemaType= */ null,
/* stringIndexingConfigParcel= */ null,
/* documentIndexingConfigParcel= */ null,
/* integerIndexingConfigParcel= */ null,
/* joinableConfigParcel= */ null,
Objects.requireNonNull(description));
}
/** Creates a {@link PropertyConfigParcel} for Boolean.
@NonNull
public static PropertyConfigParcel createForBoolean(
@NonNull String propertyName,
@NonNull String description,
@Cardinality int cardinality) {
return new PropertyConfigParcel(
Objects.requireNonNull(propertyName),
AppSearchSchema.PropertyConfig.DATA_TYPE_BOOLEAN,
cardinality,
/* schemaType= */ null,
/* stringIndexingConfigParcel= */ null,
/* documentIndexingConfigParcel= */ null,
/* integerIndexingConfigParcel= */ null,
/* joinableConfigParcel= */ null,
Objects.requireNonNull(description));
}
/** Creates a {@link PropertyConfigParcel} for Bytes.
@NonNull
public static PropertyConfigParcel createForBytes(
@NonNull String propertyName,
@NonNull String description,
@Cardinality int cardinality) {
return new PropertyConfigParcel(
Objects.requireNonNull(propertyName),
AppSearchSchema.PropertyConfig.DATA_TYPE_BYTES,
cardinality,
/* schemaType= */ null,
/* stringIndexingConfigParcel= */ null,
/* documentIndexingConfigParcel= */ null,
/* integerIndexingConfigParcel= */ null,
/* joinableConfigParcel= */ null,
Objects.requireNonNull(description));
}
/** Creates a {@link PropertyConfigParcel} for Document.
@NonNull
public static PropertyConfigParcel createForDocument(
@NonNull String propertyName,
@NonNull String description,
@Cardinality int cardinality,
@NonNull String schemaType,
@NonNull DocumentIndexingConfigParcel documentIndexingConfigParcel) {
return new PropertyConfigParcel(
Objects.requireNonNull(propertyName),
AppSearchSchema.PropertyConfig.DATA_TYPE_DOCUMENT,
cardinality,
Objects.requireNonNull(schemaType),
/* stringIndexingConfigParcel= */ null,
Objects.requireNonNull(documentIndexingConfigParcel),
/* integerIndexingConfigParcel= */ null,
/* joinableConfigParcel= */ null,
Objects.requireNonNull(description));
}
/** Gets name for the property.
@NonNull
public String getName() {
return mName;
}
/** Gets description for the property.
@NonNull
public String getDescription() {
return mDescription;
}
/** Gets data type for the property.
@DataType
public int getDataType() {
return mDataType;
}
/** Gets cardinality for the property.
@Cardinality
public int getCardinality() {
return mCardinality;
}
/** Gets schema type.
@Nullable
public String getSchemaType() {
return mSchemaType;
}
/** Gets the {@link StringIndexingConfigParcel}.
@Nullable
public StringIndexingConfigParcel getStringIndexingConfigParcel() {
return mStringIndexingConfigParcel;
}
/** Gets the {@link DocumentIndexingConfigParcel}.
@Nullable
public DocumentIndexingConfigParcel getDocumentIndexingConfigParcel() {
return mDocumentIndexingConfigParcel;
}
/** Gets the {@link IntegerIndexingConfigParcel}.
@Nullable
public IntegerIndexingConfigParcel getIntegerIndexingConfigParcel() {
return mIntegerIndexingConfigParcel;
}
/** Gets the {@link JoinableConfigParcel}.
@Nullable
public JoinableConfigParcel getJoinableConfigParcel() {
return mJoinableConfigParcel;
}
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
PropertyConfigParcelCreator.writeToParcel(this, dest, flags);
}
@Override
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}
if (!(other instanceof PropertyConfigParcel)) {
return false;
}
PropertyConfigParcel otherProperty = (PropertyConfigParcel) other;
return Objects.equals(mName, otherProperty.mName)
&& Objects.equals(mDescription, otherProperty.mDescription)
&& Objects.equals(mDataType, otherProperty.mDataType)
&& Objects.equals(mCardinality, otherProperty.mCardinality)
&& Objects.equals(mSchemaType, otherProperty.mSchemaType)
&& Objects.equals(
mStringIndexingConfigParcel, otherProperty.mStringIndexingConfigParcel)
&& Objects.equals(
mDocumentIndexingConfigParcel, otherProperty.mDocumentIndexingConfigParcel)
&& Objects.equals(
mIntegerIndexingConfigParcel, otherProperty.mIntegerIndexingConfigParcel)
&& Objects.equals(mJoinableConfigParcel, otherProperty.mJoinableConfigParcel);
}
@Override
public int hashCode() {
if (mHashCode == null) {
mHashCode =
Objects.hash(
mName,
mDescription,
mDataType,
mCardinality,
mSchemaType,
mStringIndexingConfigParcel,
mDocumentIndexingConfigParcel,
mIntegerIndexingConfigParcel,
mJoinableConfigParcel);
}
return mHashCode;
}
@Override
@NonNull
public String toString() {
return "{name: "
+ mName
+ ", description: "
+ mDescription
+ ", dataType: "
+ mDataType
+ ", cardinality: "
+ mCardinality
+ ", schemaType: "
+ mSchemaType
+ ", stringIndexingConfigParcel: "
+ mStringIndexingConfigParcel
+ ", documentIndexingConfigParcel: "
+ mDocumentIndexingConfigParcel
+ ", integerIndexingConfigParcel: "
+ mIntegerIndexingConfigParcel
+ ", joinableConfigParcel: "
+ mJoinableConfigParcel
+ "}";
}
/** Class to hold join configuration for a String type.
@SafeParcelable.Class(creator = "JoinableConfigParcelCreator")
public static class JoinableConfigParcel extends AbstractSafeParcelable {
@NonNull
public static final Parcelable.Creator<JoinableConfigParcel> CREATOR =
new JoinableConfigParcelCreator();
@JoinableValueType
@Field(id = 1, getter = "getJoinableValueType")
private final int mJoinableValueType;
@Field(id = 2, getter = "getDeletionPropagation")
private final boolean mDeletionPropagation;
/** Constructor for {@link JoinableConfigParcel}.
@Constructor
public JoinableConfigParcel(
@Param(id = 1) @JoinableValueType int joinableValueType,
@Param(id = 2) boolean deletionPropagation) {
mJoinableValueType = joinableValueType;
mDeletionPropagation = deletionPropagation;
}
/** Gets {@link JoinableValueType} of the join.
@JoinableValueType
public int getJoinableValueType() {
return mJoinableValueType;
}
/** Gets whether delete will be propagated.
public boolean getDeletionPropagation() {
return mDeletionPropagation;
}
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
JoinableConfigParcelCreator.writeToParcel(this, dest, flags);
}
@Override
public int hashCode() {
return Objects.hash(mJoinableValueType, mDeletionPropagation);
}
@Override
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}
if (!(other instanceof JoinableConfigParcel)) {
return false;
}
JoinableConfigParcel otherObject = (JoinableConfigParcel) other;
return Objects.equals(mJoinableValueType, otherObject.mJoinableValueType)
&& Objects.equals(mDeletionPropagation, otherObject.mDeletionPropagation);
}
@Override
@NonNull
public String toString() {
return "{joinableValueType: "
+ mJoinableValueType
+ ", deletePropagation "
+ mDeletionPropagation
+ "}";
}
}
/** Class to hold configuration a string type.
@SafeParcelable.Class(creator = "StringIndexingConfigParcelCreator")
public static class StringIndexingConfigParcel extends AbstractSafeParcelable {
@NonNull
public static final Parcelable.Creator<StringIndexingConfigParcel> CREATOR =
new StringIndexingConfigParcelCreator();
@AppSearchSchema.StringPropertyConfig.IndexingType
@Field(id = 1, getter = "getIndexingType")
private final int mIndexingType;
@TokenizerType
@Field(id = 2, getter = "getTokenizerType")
private final int mTokenizerType;
/** Constructor for {@link StringIndexingConfigParcel}.
@Constructor
public StringIndexingConfigParcel(
@Param(id = 1) @AppSearchSchema.StringPropertyConfig.IndexingType int indexingType,
@Param(id = 2) @TokenizerType int tokenizerType) {
mIndexingType = indexingType;
mTokenizerType = tokenizerType;
}
/** Gets the indexing type for this property.
@AppSearchSchema.StringPropertyConfig.IndexingType
public int getIndexingType() {
return mIndexingType;
}
/** Gets the tokenization type for this property.
@TokenizerType
public int getTokenizerType() {
return mTokenizerType;
}
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
StringIndexingConfigParcelCreator.writeToParcel(this, dest, flags);
}
@Override
public int hashCode() {
return Objects.hash(mIndexingType, mTokenizerType);
}
@Override
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}
if (!(other instanceof StringIndexingConfigParcel)) {
return false;
}
StringIndexingConfigParcel otherObject = (StringIndexingConfigParcel) other;
return Objects.equals(mIndexingType, otherObject.mIndexingType)
&& Objects.equals(mTokenizerType, otherObject.mTokenizerType);
}
@Override
@NonNull
public String toString() {
return "{indexingType: " + mIndexingType + ", tokenizerType " + mTokenizerType + "}";
}
}
/** Class to hold configuration for integer property type.
@SafeParcelable.Class(creator = "IntegerIndexingConfigParcelCreator")
public static class IntegerIndexingConfigParcel extends AbstractSafeParcelable {
@NonNull
public static final Parcelable.Creator<IntegerIndexingConfigParcel> CREATOR =
new IntegerIndexingConfigParcelCreator();
@AppSearchSchema.LongPropertyConfig.IndexingType
@Field(id = 1, getter = "getIndexingType")
private final int mIndexingType;
/** Constructor for {@link IntegerIndexingConfigParcel}.
@Constructor
public IntegerIndexingConfigParcel(
@Param(id = 1) @AppSearchSchema.LongPropertyConfig.IndexingType int indexingType) {
mIndexingType = indexingType;
}
/** Gets the indexing type for this integer property.
@AppSearchSchema.LongPropertyConfig.IndexingType
public int getIndexingType() {
return mIndexingType;
}
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
IntegerIndexingConfigParcelCreator.writeToParcel(this, dest, flags);
}
@Override
public int hashCode() {
return Objects.hash(mIndexingType);
}
@Override
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}
if (!(other instanceof IntegerIndexingConfigParcel)) {
return false;
}
IntegerIndexingConfigParcel otherObject = (IntegerIndexingConfigParcel) other;
return Objects.equals(mIndexingType, otherObject.mIndexingType);
}
@Override
@NonNull
public String toString() {
return "{indexingType: " + mIndexingType + "}";
}
}
/** Class to hold configuration for document property type.
@SafeParcelable.Class(creator = "DocumentIndexingConfigParcelCreator")
public static class DocumentIndexingConfigParcel extends AbstractSafeParcelable {
@NonNull
public static final Parcelable.Creator<DocumentIndexingConfigParcel> CREATOR =
new DocumentIndexingConfigParcelCreator();
@Field(id = 1, getter = "shouldIndexNestedProperties")
private final boolean mIndexNestedProperties;
@NonNull
@Field(id = 2, getter = "getIndexableNestedPropertiesList")
private final List<String> mIndexableNestedPropertiesList;
/** Constructor for {@link DocumentIndexingConfigParcel}.
@Constructor
public DocumentIndexingConfigParcel(
@Param(id = 1) boolean indexNestedProperties,
@Param(id = 2) @NonNull List<String> indexableNestedPropertiesList) {
mIndexNestedProperties = indexNestedProperties;
mIndexableNestedPropertiesList = Objects.requireNonNull(indexableNestedPropertiesList);
}
/** Nested properties should be indexed. | DocumentIndexingConfigParcel::shouldIndexNestedProperties | java | Reginer/aosp-android-jar | android-35/src/android/app/appsearch/safeparcel/PropertyConfigParcel.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/app/appsearch/safeparcel/PropertyConfigParcel.java | MIT |
public TransformerFactoryImpl()
{
} |
Constructor TransformerFactoryImpl
| TransformerFactoryImpl::TransformerFactoryImpl | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
String getDOMsystemID()
{
return m_DOMsystemID;
} |
The systemID that was specified in
processFromNode(Node node, String systemID).
@return The systemID, or null.
| TransformerFactoryImpl::getDOMsystemID | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
javax.xml.transform.Templates processFromNode(Node node, String systemID)
throws TransformerConfigurationException
{
m_DOMsystemID = systemID;
return processFromNode(node);
} |
Process the stylesheet from a DOM tree, if the
processor supports the "http://xml.org/trax/features/dom/input"
feature.
@param node A DOM tree which must contain
valid transform instructions that this processor understands.
@param systemID The systemID from where xsl:includes and xsl:imports
should be resolved from.
@return A Templates object capable of being used for transformation purposes.
@throws TransformerConfigurationException
| TransformerFactoryImpl::processFromNode | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public Source getAssociatedStylesheet(
Source source, String media, String title, String charset)
throws TransformerConfigurationException
{
String baseID;
InputSource isource = null;
Node node = null;
XMLReader reader = null;
if (source instanceof DOMSource)
{
DOMSource dsource = (DOMSource) source;
node = dsource.getNode();
baseID = dsource.getSystemId();
}
else
{
isource = SAXSource.sourceToInputSource(source);
baseID = isource.getSystemId();
}
// What I try to do here is parse until the first startElement
// is found, then throw a special exception in order to terminate
// the parse.
StylesheetPIHandler handler = new StylesheetPIHandler(baseID, media,
title, charset);
// Use URIResolver. Patch from Dmitri Ilyin
if (m_uriResolver != null)
{
handler.setURIResolver(m_uriResolver);
}
try
{
if (null != node)
{
TreeWalker walker = new TreeWalker(handler, new org.apache.xml.utils.DOM2Helper(), baseID);
walker.traverse(node);
}
else
{
// Use JAXP1.1 ( if possible )
try
{
javax.xml.parsers.SAXParserFactory factory =
javax.xml.parsers.SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
if (m_isSecureProcessing)
{
try
{
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
}
catch (org.xml.sax.SAXException e) {}
}
javax.xml.parsers.SAXParser jaxpParser = factory.newSAXParser();
reader = jaxpParser.getXMLReader();
}
catch (javax.xml.parsers.ParserConfigurationException ex)
{
throw new org.xml.sax.SAXException(ex);
}
catch (javax.xml.parsers.FactoryConfigurationError ex1)
{
throw new org.xml.sax.SAXException(ex1.toString());
}
catch (NoSuchMethodError ex2){}
catch (AbstractMethodError ame){}
if (null == reader)
{
reader = XMLReaderFactory.createXMLReader();
}
if(m_isSecureProcessing)
{
reader.setFeature("http://xml.org/sax/features/external-general-entities",false);
}
// Need to set options!
reader.setContentHandler(handler);
reader.parse(isource);
}
}
catch (StopParseException spe)
{
// OK, good.
}
catch (org.xml.sax.SAXException se)
{
throw new TransformerConfigurationException(
"getAssociatedStylesheets failed", se);
}
catch (IOException ioe)
{
throw new TransformerConfigurationException(
"getAssociatedStylesheets failed", ioe);
}
return handler.getAssociatedStylesheet();
} |
Get InputSource specification(s) that are associated with the
given document specified in the source param,
via the xml-stylesheet processing instruction
(see http://www.w3.org/TR/xml-stylesheet/), and that matches
the given criteria. Note that it is possible to return several stylesheets
that match the criteria, in which case they are applied as if they were
a list of imports or cascades.
<p>Note that DOM2 has it's own mechanism for discovering stylesheets.
Therefore, there isn't a DOM version of this method.</p>
@param source The XML source that is to be searched.
@param media The media attribute to be matched. May be null, in which
case the prefered templates will be used (i.e. alternate = no).
@param title The value of the title attribute to match. May be null.
@param charset The value of the charset attribute to match. May be null.
@return A Source object capable of being used to create a Templates object.
@throws TransformerConfigurationException
| TransformerFactoryImpl::getAssociatedStylesheet | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public TemplatesHandler newTemplatesHandler()
throws TransformerConfigurationException
{
return new StylesheetHandler(this);
} |
Create a new Transformer object that performs a copy
of the source to the result.
@return A Transformer object that may be used to perform a transformation
in a single thread, never null.
@throws TransformerConfigurationException May throw this during
the parse when it is constructing the
Templates object and fails.
| TransformerFactoryImpl::newTemplatesHandler | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public void setFeature(String name, boolean value)
throws TransformerConfigurationException {
// feature name cannot be null
if (name == null) {
throw new NullPointerException(
XSLMessages.createMessage(
XSLTErrorResources.ER_SET_FEATURE_NULL_NAME, null));
}
// secure processing?
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
m_isSecureProcessing = value;
}
// This implementation does not support the setting of a feature other than
// the secure processing feature.
else
{
throw new TransformerConfigurationException(
XSLMessages.createMessage(
XSLTErrorResources.ER_UNSUPPORTED_FEATURE,
new Object[] {name}));
}
} |
<p>Set a feature for this <code>TransformerFactory</code> and <code>Transformer</code>s
or <code>Template</code>s created by this factory.</p>
<p>
Feature names are fully qualified {@link java.net.URI}s.
Implementations may define their own features.
An {@link TransformerConfigurationException} is thrown if this <code>TransformerFactory</code> or the
<code>Transformer</code>s or <code>Template</code>s it creates cannot support the feature.
It is possible for an <code>TransformerFactory</code> to expose a feature value but be unable to change its state.
</p>
<p>See {@link javax.xml.transform.TransformerFactory} for full documentation of specific features.</p>
@param name Feature name.
@param value Is feature state <code>true</code> or <code>false</code>.
@throws TransformerConfigurationException if this <code>TransformerFactory</code>
or the <code>Transformer</code>s or <code>Template</code>s it creates cannot support this feature.
@throws NullPointerException If the <code>name</code> parameter is null.
| TransformerFactoryImpl::setFeature | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public boolean getFeature(String name) {
// feature name cannot be null
if (name == null)
{
throw new NullPointerException(
XSLMessages.createMessage(
XSLTErrorResources.ER_GET_FEATURE_NULL_NAME, null));
}
// Try first with identity comparison, which
// will be faster.
if ((DOMResult.FEATURE == name) || (DOMSource.FEATURE == name)
|| (SAXResult.FEATURE == name) || (SAXSource.FEATURE == name)
|| (StreamResult.FEATURE == name)
|| (StreamSource.FEATURE == name)
|| (SAXTransformerFactory.FEATURE == name)
|| (SAXTransformerFactory.FEATURE_XMLFILTER == name))
return true;
else if ((DOMResult.FEATURE.equals(name))
|| (DOMSource.FEATURE.equals(name))
|| (SAXResult.FEATURE.equals(name))
|| (SAXSource.FEATURE.equals(name))
|| (StreamResult.FEATURE.equals(name))
|| (StreamSource.FEATURE.equals(name))
|| (SAXTransformerFactory.FEATURE.equals(name))
|| (SAXTransformerFactory.FEATURE_XMLFILTER.equals(name)))
return true;
// secure processing?
else if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING))
return m_isSecureProcessing;
else
// unknown feature
return false;
} |
Look up the value of a feature.
<p>The feature name is any fully-qualified URI. It is
possible for an TransformerFactory to recognize a feature name but
to be unable to return its value; this is especially true
in the case of an adapter for a SAX1 Parser, which has
no way of knowing whether the underlying parser is
validating, for example.</p>
@param name The feature name, which is a fully-qualified URI.
@return The current state of the feature (true or false).
| TransformerFactoryImpl::getFeature | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public void setAttribute(String name, Object value)
throws IllegalArgumentException
{
if (name.equals(FEATURE_INCREMENTAL))
{
if(value instanceof Boolean)
{
// Accept a Boolean object..
m_incremental = ((Boolean)value).booleanValue();
}
else if(value instanceof String)
{
// .. or a String object
m_incremental = (new Boolean((String)value)).booleanValue();
}
else
{
// Give a more meaningful error message
throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_BAD_VALUE, new Object[]{name, value})); //name + " bad value " + value);
}
}
else if (name.equals(FEATURE_OPTIMIZE))
{
if(value instanceof Boolean)
{
// Accept a Boolean object..
m_optimize = ((Boolean)value).booleanValue();
}
else if(value instanceof String)
{
// .. or a String object
m_optimize = (new Boolean((String)value)).booleanValue();
}
else
{
// Give a more meaningful error message
throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_BAD_VALUE, new Object[]{name, value})); //name + " bad value " + value);
}
}
// Custom Xalan feature: annotate DTM with SAX source locator fields.
// This gets used during SAX2DTM instantiation.
//
// %REVIEW% Should the name of this field really be in XalanProperties?
// %REVIEW% I hate that it's a global static, but didn't want to change APIs yet.
else if(name.equals(FEATURE_SOURCE_LOCATION))
{
if(value instanceof Boolean)
{
// Accept a Boolean object..
m_source_location = ((Boolean)value).booleanValue();
}
else if(value instanceof String)
{
// .. or a String object
m_source_location = (new Boolean((String)value)).booleanValue();
}
else
{
// Give a more meaningful error message
throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_BAD_VALUE, new Object[]{name, value})); //name + " bad value " + value);
}
}
else
{
throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_SUPPORTED, new Object[]{name})); //name + "not supported");
}
} |
Allows the user to set specific attributes on the underlying
implementation.
@param name The name of the attribute.
@param value The value of the attribute; Boolean or String="true"|"false"
@throws IllegalArgumentException thrown if the underlying
implementation doesn't recognize the attribute.
| TransformerFactoryImpl::setAttribute | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public Object getAttribute(String name) throws IllegalArgumentException
{
if (name.equals(FEATURE_INCREMENTAL))
{
return new Boolean(m_incremental);
}
else if (name.equals(FEATURE_OPTIMIZE))
{
return new Boolean(m_optimize);
}
else if (name.equals(FEATURE_SOURCE_LOCATION))
{
return new Boolean(m_source_location);
}
else
throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_ATTRIB_VALUE_NOT_RECOGNIZED, new Object[]{name})); //name + " attribute not recognized");
} |
Allows the user to retrieve specific attributes on the underlying
implementation.
@param name The name of the attribute.
@return value The value of the attribute.
@throws IllegalArgumentException thrown if the underlying
implementation doesn't recognize the attribute.
| TransformerFactoryImpl::getAttribute | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public XMLFilter newXMLFilter(Source src)
throws TransformerConfigurationException
{
Templates templates = newTemplates(src);
if( templates==null ) return null;
return newXMLFilter(templates);
} |
Create an XMLFilter that uses the given source as the
transformation instructions.
@param src The source of the transformation instructions.
@return An XMLFilter object, or null if this feature is not supported.
@throws TransformerConfigurationException
| TransformerFactoryImpl::newXMLFilter | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public XMLFilter newXMLFilter(Templates templates)
throws TransformerConfigurationException
{
try
{
return new TrAXFilter(templates);
}
catch( TransformerConfigurationException ex )
{
if( m_errorListener != null)
{
try
{
m_errorListener.fatalError( ex );
return null;
}
catch( TransformerConfigurationException ex1 )
{
throw ex1;
}
catch( TransformerException ex1 )
{
throw new TransformerConfigurationException(ex1);
}
}
throw ex;
}
} |
Create an XMLFilter that uses the given source as the
transformation instructions.
@param templates non-null reference to Templates object.
@return An XMLFilter object, or null if this feature is not supported.
@throws TransformerConfigurationException
| TransformerFactoryImpl::newXMLFilter | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public TransformerHandler newTransformerHandler(Source src)
throws TransformerConfigurationException
{
Templates templates = newTemplates(src);
if( templates==null ) return null;
return newTransformerHandler(templates);
} |
Get a TransformerHandler object that can process SAX
ContentHandler events into a Result, based on the transformation
instructions specified by the argument.
@param src The source of the transformation instructions.
@return TransformerHandler ready to transform SAX events.
@throws TransformerConfigurationException
| TransformerFactoryImpl::newTransformerHandler | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public TransformerHandler newTransformerHandler(Templates templates)
throws TransformerConfigurationException
{
try {
TransformerImpl transformer =
(TransformerImpl) templates.newTransformer();
transformer.setURIResolver(m_uriResolver);
TransformerHandler th =
(TransformerHandler) transformer.getInputContentHandler(true);
return th;
}
catch( TransformerConfigurationException ex )
{
if( m_errorListener != null )
{
try
{
m_errorListener.fatalError( ex );
return null;
}
catch (TransformerConfigurationException ex1 )
{
throw ex1;
}
catch (TransformerException ex1 )
{
throw new TransformerConfigurationException(ex1);
}
}
throw ex;
}
} |
Get a TransformerHandler object that can process SAX
ContentHandler events into a Result, based on the Templates argument.
@param templates The source of the transformation instructions.
@return TransformerHandler ready to transform SAX events.
@throws TransformerConfigurationException
| TransformerFactoryImpl::newTransformerHandler | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public TransformerHandler newTransformerHandler()
throws TransformerConfigurationException
{
return new TransformerIdentityImpl(m_isSecureProcessing);
} |
Get a TransformerHandler object that can process SAX
ContentHandler events into a Result.
@return TransformerHandler ready to transform SAX events.
@throws TransformerConfigurationException
| TransformerFactoryImpl::newTransformerHandler | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public Transformer newTransformer(Source source)
throws TransformerConfigurationException
{
try
{
Templates tmpl=newTemplates( source );
/* this can happen if an ErrorListener is present and it doesn't
throw any exception in fatalError.
The spec says: "a Transformer must use this interface
instead of throwing an exception" - the newTemplates() does
that, and returns null.
*/
if( tmpl==null ) return null;
Transformer transformer = tmpl.newTransformer();
transformer.setURIResolver(m_uriResolver);
return transformer;
}
catch( TransformerConfigurationException ex )
{
if( m_errorListener != null )
{
try
{
m_errorListener.fatalError( ex );
return null; // TODO: but the API promises to never return null...
}
catch( TransformerConfigurationException ex1 )
{
throw ex1;
}
catch( TransformerException ex1 )
{
throw new TransformerConfigurationException( ex1 );
}
}
throw ex;
}
} |
Process the source into a Transformer object. Care must
be given to know that this object can not be used concurrently
in multiple threads.
@param source An object that holds a URL, input stream, etc.
@return A Transformer object capable of
being used for transformation purposes in a single thread.
@throws TransformerConfigurationException May throw this during the parse when it
is constructing the Templates object and fails.
| TransformerFactoryImpl::newTransformer | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public Transformer newTransformer() throws TransformerConfigurationException
{
return new TransformerIdentityImpl(m_isSecureProcessing);
} |
Create a new Transformer object that performs a copy
of the source to the result.
@return A Transformer object capable of
being used for transformation purposes in a single thread.
@throws TransformerConfigurationException May throw this during
the parse when it is constructing the
Templates object and it fails.
| TransformerFactoryImpl::newTransformer | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public Templates newTemplates(Source source)
throws TransformerConfigurationException
{
String baseID = source.getSystemId();
if (null != baseID) {
baseID = SystemIDResolver.getAbsoluteURI(baseID);
}
if (source instanceof DOMSource)
{
DOMSource dsource = (DOMSource) source;
Node node = dsource.getNode();
if (null != node)
return processFromNode(node, baseID);
else
{
String messageStr = XSLMessages.createMessage(
XSLTErrorResources.ER_ILLEGAL_DOMSOURCE_INPUT, null);
throw new IllegalArgumentException(messageStr);
}
}
TemplatesHandler builder = newTemplatesHandler();
builder.setSystemId(baseID);
try
{
InputSource isource = SAXSource.sourceToInputSource(source);
isource.setSystemId(baseID);
XMLReader reader = null;
if (source instanceof SAXSource)
reader = ((SAXSource) source).getXMLReader();
if (null == reader)
{
// Use JAXP1.1 ( if possible )
try
{
javax.xml.parsers.SAXParserFactory factory =
javax.xml.parsers.SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
if (m_isSecureProcessing)
{
try
{
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
}
catch (org.xml.sax.SAXException se) {}
}
javax.xml.parsers.SAXParser jaxpParser = factory.newSAXParser();
reader = jaxpParser.getXMLReader();
}
catch (javax.xml.parsers.ParserConfigurationException ex)
{
throw new org.xml.sax.SAXException(ex);
}
catch (javax.xml.parsers.FactoryConfigurationError ex1)
{
throw new org.xml.sax.SAXException(ex1.toString());
}
catch (NoSuchMethodError ex2){}
catch (AbstractMethodError ame){}
}
if (null == reader)
reader = XMLReaderFactory.createXMLReader();
// If you set the namespaces to true, we'll end up getting double
// xmlns attributes. Needs to be fixed. -sb
// reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
reader.setContentHandler(builder);
reader.parse(isource);
}
catch (org.xml.sax.SAXException se)
{
if (m_errorListener != null)
{
try
{
m_errorListener.fatalError(new TransformerException(se));
}
catch (TransformerConfigurationException ex1)
{
throw ex1;
}
catch (TransformerException ex1)
{
throw new TransformerConfigurationException(ex1);
}
}
else
{
throw new TransformerConfigurationException(se.getMessage(), se);
}
}
catch (Exception e)
{
if (m_errorListener != null)
{
try
{
m_errorListener.fatalError(new TransformerException(e));
return null;
}
catch (TransformerConfigurationException ex1)
{
throw ex1;
}
catch (TransformerException ex1)
{
throw new TransformerConfigurationException(ex1);
}
}
else
{
throw new TransformerConfigurationException(e.getMessage(), e);
}
}
return builder.getTemplates();
} |
Process the source into a Templates object, which is likely
a compiled representation of the source. This Templates object
may then be used concurrently across multiple threads. Creating
a Templates object allows the TransformerFactory to do detailed
performance optimization of transformation instructions, without
penalizing runtime transformation.
@param source An object that holds a URL, input stream, etc.
@return A Templates object capable of being used for transformation purposes.
@throws TransformerConfigurationException May throw this during the parse when it
is constructing the Templates object and fails.
| TransformerFactoryImpl::newTemplates | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public void setURIResolver(URIResolver resolver)
{
m_uriResolver = resolver;
} |
Set an object that will be used to resolve URIs used in
xsl:import, etc. This will be used as the default for the
transformation.
@param resolver An object that implements the URIResolver interface,
or null.
| TransformerFactoryImpl::setURIResolver | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public URIResolver getURIResolver()
{
return m_uriResolver;
} |
Get the object that will be used to resolve URIs used in
xsl:import, etc. This will be used as the default for the
transformation.
@return The URIResolver that was set with setURIResolver.
| TransformerFactoryImpl::getURIResolver | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public ErrorListener getErrorListener()
{
return m_errorListener;
} |
Get the error listener in effect for the TransformerFactory.
@return A non-null reference to an error listener.
| TransformerFactoryImpl::getErrorListener | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public void setErrorListener(ErrorListener listener)
throws IllegalArgumentException
{
if (null == listener)
throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_ERRORLISTENER, null));
// "ErrorListener");
m_errorListener = listener;
} |
Set an error listener for the TransformerFactory.
@param listener Must be a non-null reference to an ErrorListener.
@throws IllegalArgumentException if the listener argument is null.
| TransformerFactoryImpl::setErrorListener | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public boolean isSecureProcessing()
{
return m_isSecureProcessing;
} |
Return the state of the secure processing feature.
@return state of the secure processing feature.
| TransformerFactoryImpl::isSecureProcessing | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/processor/TransformerFactoryImpl.java | MIT |
public static void setCleanerImplAccess(Function<Cleaner, CleanerImpl> access) {
if (cleanerImplAccess == null) {
cleanerImplAccess = access;
} else {
throw new InternalError("cleanerImplAccess");
}
} |
Called by Cleaner static initialization to provide the function
to map from Cleaner to CleanerImpl.
@param access a function to map from Cleaner to CleanerImpl
| CleanerImpl::setCleanerImplAccess | java | Reginer/aosp-android-jar | android-35/src/jdk/internal/ref/CleanerImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/jdk/internal/ref/CleanerImpl.java | MIT |
static CleanerImpl getCleanerImpl(Cleaner cleaner) {
return cleanerImplAccess.apply(cleaner);
} |
Called to get the CleanerImpl for a Cleaner.
@param cleaner the cleaner
@return the corresponding CleanerImpl
| CleanerImpl::getCleanerImpl | java | Reginer/aosp-android-jar | android-35/src/jdk/internal/ref/CleanerImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/jdk/internal/ref/CleanerImpl.java | MIT |
public CleanerImpl() {
queue = new ReferenceQueue<>();
phantomCleanableList = new PhantomCleanableRef();
// Android-removed: WeakCleanable and SoftCleanable. b/198792576
// weakCleanableList = new WeakCleanableRef();
// softCleanableList = new SoftCleanableRef();
} |
Constructor for CleanerImpl.
| CleanerImpl::CleanerImpl | java | Reginer/aosp-android-jar | android-35/src/jdk/internal/ref/CleanerImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/jdk/internal/ref/CleanerImpl.java | MIT |
public CleanerImpl(ReferenceQueue<Object> queue) {
this.queue = queue;
this.phantomCleanableList = new PhantomCleanableRef();
} |
@hide
| CleanerImpl::CleanerImpl | java | Reginer/aosp-android-jar | android-35/src/jdk/internal/ref/CleanerImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/jdk/internal/ref/CleanerImpl.java | MIT |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.